diff --git a/socket/START.sh b/socket/START.sh new file mode 100755 index 0000000..82ce50e --- /dev/null +++ b/socket/START.sh @@ -0,0 +1 @@ +node index.js diff --git a/socket/index.js b/socket/index.js new file mode 100644 index 0000000..59a1f90 --- /dev/null +++ b/socket/index.js @@ -0,0 +1,17 @@ + +const express = require('express'); +const app = express(); +const http = require('http').Server(app); +const io = require('socket.io')(http); +const port = process.env.PORT || 3000; + +app.use(express.static(__dirname + '/public')); + +function onConnection(socket){ + socket.on('key', (data) => socket.broadcast.emit('key', data)); + socket.on('slidesLen', (data) => socket.broadcast.emit('slidesLen', data)); +} + +io.on('connection', onConnection); + +http.listen(port, () => console.log('listening on port ' + port)); diff --git a/socket/node_modules/.bin/babylon b/socket/node_modules/.bin/babylon new file mode 120000 index 0000000..c2adc01 --- /dev/null +++ b/socket/node_modules/.bin/babylon @@ -0,0 +1 @@ +../babylon/bin/babylon.js \ No newline at end of file diff --git a/socket/node_modules/.bin/loose-envify b/socket/node_modules/.bin/loose-envify new file mode 120000 index 0000000..ed9009c --- /dev/null +++ b/socket/node_modules/.bin/loose-envify @@ -0,0 +1 @@ +../loose-envify/cli.js \ No newline at end of file diff --git a/socket/node_modules/accepts/HISTORY.md b/socket/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..0508481 --- /dev/null +++ b/socket/node_modules/accepts/HISTORY.md @@ -0,0 +1,74 @@ +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/socket/node_modules/accepts/LICENSE b/socket/node_modules/accepts/LICENSE new file mode 100644 index 0000000..f23dca8 --- /dev/null +++ b/socket/node_modules/accepts/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong + +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. diff --git a/socket/node_modules/accepts/README.md b/socket/node_modules/accepts/README.md new file mode 100644 index 0000000..a9bc28a --- /dev/null +++ b/socket/node_modules/accepts/README.md @@ -0,0 +1,94 @@ +# accepts + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotation based on [negotiator](https://github.com/federomero/negotiator). Extracted from [koa](https://github.com/koajs/koa) for general use. + +In addition to negotatior, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## API + +### var accept = new Accepts(req) + +```js +var accepts = require('accepts') + +http.createServer(function (req, res) { + var accept = accepts(req) +}) +``` + +### accept\[property\]\(\) + +Returns all the explicitly accepted content property as an array in descending priority. + +- `accept.types()` +- `accept.encodings()` +- `accept.charsets()` +- `accept.languages()` + +They are also aliased in singular form such as `accept.type()`. `accept.languages()` is also aliased as `accept.langs()`, etc. + +Note: you should almost never do this in a real app as it defeats the purpose of content negotiation. + +Example: + +```js +// in Google Chrome +var encodings = accept.encodings() // -> ['sdch', 'gzip', 'deflate'] +``` + +Since you probably don't support `sdch`, you should just supply the encodings you support: + +```js +var encoding = accept.encodings('gzip', 'deflate') // -> 'gzip', probably +``` + +### accept\[property\]\(values, ...\) + +You can either have `values` be an array or have an argument list of values. + +If the client does not accept any `values`, `false` will be returned. +If the client accepts any `values`, the preferred `value` will be return. + +For `accept.types()`, shorthand mime types are allowed. + +Example: + +```js +// req.headers.accept = 'application/json' + +accept.types('json') // -> 'json' +accept.types('html', 'json') // -> 'json' +accept.types('html') // -> false + +// req.headers.accept = '' +// which is equivalent to `*` + +accept.types() // -> [], no explicit types +accept.types('text/html', 'text/json') // -> 'text/html', since it was first +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/accepts.svg?style=flat +[npm-url]: https://npmjs.org/package/accepts +[node-version-image]: https://img.shields.io/node/v/accepts.svg?style=flat +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/accepts.svg?style=flat +[travis-url]: https://travis-ci.org/jshttp/accepts +[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts.svg?style=flat +[coveralls-url]: https://coveralls.io/r/jshttp/accepts +[downloads-image]: https://img.shields.io/npm/dm/accepts.svg?style=flat +[downloads-url]: https://npmjs.org/package/accepts diff --git a/socket/node_modules/accepts/index.js b/socket/node_modules/accepts/index.js new file mode 100644 index 0000000..805e33a --- /dev/null +++ b/socket/node_modules/accepts/index.js @@ -0,0 +1,160 @@ +var Negotiator = require('negotiator') +var mime = require('mime-types') + +var slice = [].slice + +module.exports = Accepts + +function Accepts(req) { + if (!(this instanceof Accepts)) + return new Accepts(req) + + this.headers = req.headers + this.negotiator = Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} type(s)... + * @return {String|Array|Boolean} + * @api public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types) { + if (!Array.isArray(types)) types = slice.call(arguments); + var n = this.negotiator; + if (!types.length) return n.mediaTypes(); + if (!this.headers.accept) return types[0]; + var mimes = types.map(extToMime); + var accepts = n.mediaTypes(mimes.filter(validMime)); + var first = accepts[0]; + if (!first) return false; + return types[mimes.indexOf(first)]; +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encoding(s)... + * @return {String|Array} + * @api public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings) { + if (!Array.isArray(encodings)) encodings = slice.call(arguments); + var n = this.negotiator; + if (!encodings.length) return n.encodings(); + return n.encodings(encodings)[0] || false; +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charset(s)... + * @return {String|Array} + * @api public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets) { + if (!Array.isArray(charsets)) charsets = [].slice.call(arguments); + var n = this.negotiator; + if (!charsets.length) return n.charsets(); + if (!this.headers['accept-charset']) return charsets[0]; + return n.charsets(charsets)[0] || false; +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} lang(s)... + * @return {Array|String} + * @api public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (langs) { + if (!Array.isArray(langs)) langs = slice.call(arguments); + var n = this.negotiator; + if (!langs.length) return n.languages(); + if (!this.headers['accept-language']) return langs[0]; + return n.languages(langs)[0] || false; +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @api private + */ + +function extToMime(type) { + if (~type.indexOf('/')) return type; + return mime.lookup(type); +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @api private + */ + +function validMime(type) { + return typeof type === 'string'; +} diff --git a/socket/node_modules/accepts/package.json b/socket/node_modules/accepts/package.json new file mode 100644 index 0000000..01d666e --- /dev/null +++ b/socket/node_modules/accepts/package.json @@ -0,0 +1,71 @@ +{ + "_from": "accepts@~1.1.2", + "_id": "accepts@1.1.4", + "_inBundle": false, + "_integrity": "sha1-1xyW99QdD+2iw4zRToonwEFY30o=", + "_location": "/accepts", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "accepts@~1.1.2", + "name": "accepts", + "escapedName": "accepts", + "rawSpec": "~1.1.2", + "saveSpec": null, + "fetchSpec": "~1.1.2" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.1.4.tgz", + "_shasum": "d71c96f7d41d0feda2c38cd14e8a27c04158df4a", + "_spec": "accepts@~1.1.2", + "_where": "/var/www/htdocs/coze/socket/node_modules/express", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + "bugs": { + "url": "https://github.com/jshttp/accepts/issues" + }, + "bundleDependencies": false, + "dependencies": { + "mime-types": "~2.0.4", + "negotiator": "0.4.9" + }, + "deprecated": false, + "description": "Higher-level content negotiation", + "devDependencies": { + "istanbul": "~0.3.4", + "mocha": "~2.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "homepage": "https://github.com/jshttp/accepts#readme", + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ], + "license": "MIT", + "name": "accepts", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/accepts.git" + }, + "scripts": { + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.1.4" +} diff --git a/socket/node_modules/after/.npmignore b/socket/node_modules/after/.npmignore new file mode 100644 index 0000000..6c78602 --- /dev/null +++ b/socket/node_modules/after/.npmignore @@ -0,0 +1,2 @@ +node_modules +.monitor diff --git a/socket/node_modules/after/.travis.yml b/socket/node_modules/after/.travis.yml new file mode 100644 index 0000000..afd72d0 --- /dev/null +++ b/socket/node_modules/after/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.9 + - 0.10 + - 0.12 + - 4.2.4 + - 5.4.1 + - iojs-1 + - iojs-2 + - iojs-3 diff --git a/socket/node_modules/after/LICENCE b/socket/node_modules/after/LICENCE new file mode 100644 index 0000000..7c35130 --- /dev/null +++ b/socket/node_modules/after/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Raynos. + +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. \ No newline at end of file diff --git a/socket/node_modules/after/README.md b/socket/node_modules/after/README.md new file mode 100644 index 0000000..fc69096 --- /dev/null +++ b/socket/node_modules/after/README.md @@ -0,0 +1,115 @@ +# After [![Build Status][1]][2] + +Invoke callback after n calls + +## Status: production ready + +## Example + +```js +var after = require("after") +var db = require("./db") // some db. + +var updateUser = function (req, res) { + // use after to run two tasks in parallel, + // namely get request body and get session + // then run updateUser with the results + var next = after(2, updateUser) + var results = {} + + getJSONBody(req, res, function (err, body) { + if (err) return next(err) + + results.body = body + next(null, results) + }) + + getSessionUser(req, res, function (err, user) { + if (err) return next(err) + + results.user = user + next(null, results) + }) + + // now do the thing! + function updateUser(err, result) { + if (err) { + res.statusCode = 500 + return res.end("Unexpected Error") + } + + if (!result.user || result.user.role !== "admin") { + res.statusCode = 403 + return res.end("Permission Denied") + } + + db.put("users:" + req.params.userId, result.body, function (err) { + if (err) { + res.statusCode = 500 + return res.end("Unexpected Error") + } + + res.statusCode = 200 + res.end("Ok") + }) + } +} +``` + +## Naive Example + +```js +var after = require("after") + , next = after(3, logItWorks) + +next() +next() +next() // it works + +function logItWorks() { + console.log("it works!") +} +``` + +## Example with error handling + +```js +var after = require("after") + , next = after(3, logError) + +next() +next(new Error("oops")) // logs oops +next() // does nothing + +// This callback is only called once. +// If there is an error the callback gets called immediately +// this avoids the situation where errors get lost. +function logError(err) { + console.log(err) +} +``` + +## Installation + +`npm install after` + +## Tests + +`npm test` + +## Contributors + + - Raynos + - defunctzombie + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/after.png + [2]: http://travis-ci.org/Raynos/after + [3]: http://raynos.org/blog/2/Flow-control-in-node.js + [4]: http://stackoverflow.com/questions/6852059/determining-the-end-of-asynchronous-operations-javascript/6852307#6852307 + [5]: http://stackoverflow.com/questions/6869872/in-javascript-what-are-best-practices-for-executing-multiple-asynchronous-functi/6870031#6870031 + [6]: http://stackoverflow.com/questions/6864397/javascript-performance-long-running-tasks/6889419#6889419 + [7]: http://stackoverflow.com/questions/6597493/synchronous-database-queries-with-node-js/6620091#6620091 + [8]: http://github.com/Raynos/iterators + [9]: http://github.com/Raynos/composite diff --git a/socket/node_modules/after/index.js b/socket/node_modules/after/index.js new file mode 100644 index 0000000..ec24879 --- /dev/null +++ b/socket/node_modules/after/index.js @@ -0,0 +1,28 @@ +module.exports = after + +function after(count, callback, err_cb) { + var bail = false + err_cb = err_cb || noop + proxy.count = count + + return (count === 0) ? callback() : proxy + + function proxy(err, result) { + if (proxy.count <= 0) { + throw new Error('after called too many times') + } + --proxy.count + + // after first error, rest are passed to err_cb + if (err) { + bail = true + callback(err) + // future error callbacks will go to error handler + callback = err_cb + } else if (proxy.count === 0 && !bail) { + callback(null, result) + } + } +} + +function noop() {} diff --git a/socket/node_modules/after/package.json b/socket/node_modules/after/package.json new file mode 100644 index 0000000..d88c772 --- /dev/null +++ b/socket/node_modules/after/package.json @@ -0,0 +1,63 @@ +{ + "_from": "after@0.8.2", + "_id": "after@0.8.2", + "_inBundle": false, + "_integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "_location": "/after", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "after@0.8.2", + "name": "after", + "escapedName": "after", + "rawSpec": "0.8.2", + "saveSpec": null, + "fetchSpec": "0.8.2" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "_shasum": "fedb394f9f0e02aa9768e702bda23b505fae7e1f", + "_spec": "after@0.8.2", + "_where": "/var/www/htdocs/coze/socket/node_modules/engine.io-parser", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/after/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Raynos", + "email": "raynos2@gmail.com", + "url": "http://raynos.org" + } + ], + "deprecated": false, + "description": "after - tiny flow control", + "devDependencies": { + "mocha": "~1.8.1" + }, + "homepage": "https://github.com/Raynos/after#readme", + "keywords": [ + "flowcontrol", + "after", + "flow", + "control", + "arch" + ], + "license": "MIT", + "name": "after", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/after.git" + }, + "scripts": { + "test": "mocha --ui tdd --reporter spec test/*.js" + }, + "version": "0.8.2" +} diff --git a/socket/node_modules/after/test/after-test.js b/socket/node_modules/after/test/after-test.js new file mode 100644 index 0000000..0d63f4c --- /dev/null +++ b/socket/node_modules/after/test/after-test.js @@ -0,0 +1,120 @@ +/*global suite, test*/ + +var assert = require("assert") + , after = require("../") + +test("exists", function () { + assert(typeof after === "function", "after is not a function") +}) + +test("after when called with 0 invokes", function (done) { + after(0, done) +}); + +test("after 1", function (done) { + var next = after(1, done) + next() +}) + +test("after 5", function (done) { + var next = after(5, done) + , i = 5 + + while (i--) { + next() + } +}) + +test("manipulate count", function (done) { + var next = after(1, done) + , i = 5 + + next.count = i + while (i--) { + next() + } +}) + +test("after terminates on error", function (done) { + var next = after(2, function(err) { + assert.equal(err.message, 'test'); + done(); + }) + next(new Error('test')) + next(new Error('test2')) +}) + +test('gee', function(done) { + done = after(2, done) + + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + assert.equal(err.message, 2) + done() + }); + + next() + next(new Error(1)) + next(new Error(2)) +}) + +test('eee', function(done) { + done = after(3, done) + + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + assert.equal(err.message, 2) + done() + }); + + next(new Error(1)) + next(new Error(2)) + next(new Error(2)) +}) + +test('gge', function(done) { + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + // should not happen + assert.ok(false); + }); + + next() + next() + next(new Error(1)) +}) + +test('egg', function(done) { + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + // should not happen + assert.ok(false); + }); + + next(new Error(1)) + next() + next() +}) + +test('throws on too many calls', function(done) { + var next = after(1, done); + next() + assert.throws(next, /after called too many times/); +}); + diff --git a/socket/node_modules/ansi-regex/index.js b/socket/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..b9574ed --- /dev/null +++ b/socket/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/socket/node_modules/ansi-regex/license b/socket/node_modules/ansi-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/socket/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.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. diff --git a/socket/node_modules/ansi-regex/package.json b/socket/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..39d7032 --- /dev/null +++ b/socket/node_modules/ansi-regex/package.json @@ -0,0 +1,109 @@ +{ + "_from": "ansi-regex@^2.0.0", + "_id": "ansi-regex@2.1.1", + "_inBundle": false, + "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_location": "/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^2.0.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/has-ansi", + "/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "_spec": "ansi-regex@^2.0.0", + "_where": "/var/www/htdocs/coze/socket/node_modules/has-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/socket/node_modules/ansi-regex/readme.md b/socket/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..6a928ed --- /dev/null +++ b/socket/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/socket/node_modules/ansi-styles/index.js b/socket/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..7894527 --- /dev/null +++ b/socket/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/socket/node_modules/ansi-styles/license b/socket/node_modules/ansi-styles/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/socket/node_modules/ansi-styles/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.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. diff --git a/socket/node_modules/ansi-styles/package.json b/socket/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..d62c145 --- /dev/null +++ b/socket/node_modules/ansi-styles/package.json @@ -0,0 +1,90 @@ +{ + "_from": "ansi-styles@^2.2.1", + "_id": "ansi-styles@2.2.1", + "_inBundle": false, + "_integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "_location": "/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-styles@^2.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "^2.2.1", + "saveSpec": null, + "fetchSpec": "^2.2.1" + }, + "_requiredBy": [ + "/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe", + "_spec": "ansi-styles@^2.2.1", + "_where": "/var/www/htdocs/coze/socket/node_modules/chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + } + ], + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.2.1" +} diff --git a/socket/node_modules/ansi-styles/readme.md b/socket/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..3f933f6 --- /dev/null +++ b/socket/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/socket/node_modules/arraybuffer.slice/.npmignore b/socket/node_modules/arraybuffer.slice/.npmignore new file mode 100644 index 0000000..cfbee8d --- /dev/null +++ b/socket/node_modules/arraybuffer.slice/.npmignore @@ -0,0 +1,17 @@ +lib-cov +lcov.info +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results +build +.grunt + +node_modules diff --git a/socket/node_modules/arraybuffer.slice/LICENCE b/socket/node_modules/arraybuffer.slice/LICENCE new file mode 100644 index 0000000..35fa375 --- /dev/null +++ b/socket/node_modules/arraybuffer.slice/LICENCE @@ -0,0 +1,18 @@ +Copyright (C) 2013 Rase- + +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. diff --git a/socket/node_modules/arraybuffer.slice/Makefile b/socket/node_modules/arraybuffer.slice/Makefile new file mode 100644 index 0000000..849887f --- /dev/null +++ b/socket/node_modules/arraybuffer.slice/Makefile @@ -0,0 +1,8 @@ + +REPORTER = dot + +test: + @./node_modules/.bin/mocha \ + --reporter $(REPORTER) + +.PHONY: test diff --git a/socket/node_modules/arraybuffer.slice/README.md b/socket/node_modules/arraybuffer.slice/README.md new file mode 100644 index 0000000..15e465e --- /dev/null +++ b/socket/node_modules/arraybuffer.slice/README.md @@ -0,0 +1,17 @@ +# How to +```javascript +var sliceBuffer = require('arraybuffer.slice'); +var ab = (new Int8Array(5)).buffer; +var sliced = sliceBuffer(ab, 1, 3); +sliced = sliceBuffer(ab, 1); +``` + +# Licence (MIT) +Copyright (C) 2013 Rase- + + +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. diff --git a/socket/node_modules/arraybuffer.slice/index.js b/socket/node_modules/arraybuffer.slice/index.js new file mode 100644 index 0000000..11ac556 --- /dev/null +++ b/socket/node_modules/arraybuffer.slice/index.js @@ -0,0 +1,29 @@ +/** + * An abstraction for slicing an arraybuffer even when + * ArrayBuffer.prototype.slice is not supported + * + * @api public + */ + +module.exports = function(arraybuffer, start, end) { + var bytes = arraybuffer.byteLength; + start = start || 0; + end = end || bytes; + + if (arraybuffer.slice) { return arraybuffer.slice(start, end); } + + if (start < 0) { start += bytes; } + if (end < 0) { end += bytes; } + if (end > bytes) { end = bytes; } + + if (start >= bytes || start >= end || bytes === 0) { + return new ArrayBuffer(0); + } + + var abv = new Uint8Array(arraybuffer); + var result = new Uint8Array(end - start); + for (var i = start, ii = 0; i < end; i++, ii++) { + result[ii] = abv[i]; + } + return result.buffer; +}; diff --git a/socket/node_modules/arraybuffer.slice/package.json b/socket/node_modules/arraybuffer.slice/package.json new file mode 100644 index 0000000..bf8c019 --- /dev/null +++ b/socket/node_modules/arraybuffer.slice/package.json @@ -0,0 +1,44 @@ +{ + "_from": "arraybuffer.slice@~0.0.7", + "_id": "arraybuffer.slice@0.0.7", + "_inBundle": false, + "_integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "_location": "/arraybuffer.slice", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arraybuffer.slice@~0.0.7", + "name": "arraybuffer.slice", + "escapedName": "arraybuffer.slice", + "rawSpec": "~0.0.7", + "saveSpec": null, + "fetchSpec": "~0.0.7" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "_shasum": "3bbc4275dd584cc1b10809b89d4e8b63a69e7675", + "_spec": "arraybuffer.slice@~0.0.7", + "_where": "/var/www/htdocs/coze/socket/node_modules/engine.io-parser", + "bugs": { + "url": "https://github.com/rase-/arraybuffer.slice/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Exports a function for slicing ArrayBuffers (no polyfilling)", + "devDependencies": { + "expect.js": "0.2.0", + "mocha": "1.17.1" + }, + "homepage": "https://github.com/rase-/arraybuffer.slice", + "license": "MIT", + "name": "arraybuffer.slice", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/rase-/arraybuffer.slice.git" + }, + "version": "0.0.7" +} diff --git a/socket/node_modules/arraybuffer.slice/test/slice-buffer.js b/socket/node_modules/arraybuffer.slice/test/slice-buffer.js new file mode 100644 index 0000000..4778da6 --- /dev/null +++ b/socket/node_modules/arraybuffer.slice/test/slice-buffer.js @@ -0,0 +1,227 @@ +/* + * Test dependencies + */ + +var sliceBuffer = require('../index.js'); +var expect = require('expect.js'); + +/** + * Tests + */ + +describe('sliceBuffer', function() { + describe('using standard slice', function() { + it('should slice correctly with only start provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 3); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with start and end provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 3, 8); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < 8; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 0, -3); + var sabv = new Uint8Array(sliced); + for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, -6, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with equal start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 1, 1); + expect(sliced.byteLength).to.equal(0); + }); + + it('should slice correctly when end larger than buffer', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 0, 100); + expect(new Uint8Array(sliced)).to.eql(abv); + }); + + it('shoud slice correctly when start larger than end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 6, 5); + expect(sliced.byteLength).to.equal(0); + }); + }); + + describe('using fallback', function() { + it('should slice correctly with only start provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 3); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with start and end provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + + var sliced = sliceBuffer(ab, 3, 8); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < 8; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + + var sliced = sliceBuffer(ab, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 0, -3); + var sabv = new Uint8Array(sliced); + for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, -6, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with equal start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 1, 1); + expect(sliced.byteLength).to.equal(0); + }); + + it('should slice correctly when end larger than buffer', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 0, 100); + var sabv = new Uint8Array(sliced); + for (var i = 0; i < abv.length; i++) { + expect(abv[i]).to.equal(sabv[i]); + } + }); + + it('shoud slice correctly when start larger than end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 6, 5); + expect(sliced.byteLength).to.equal(0); + }); + }); +}); diff --git a/socket/node_modules/asap/CHANGES.md b/socket/node_modules/asap/CHANGES.md new file mode 100644 index 0000000..f105b91 --- /dev/null +++ b/socket/node_modules/asap/CHANGES.md @@ -0,0 +1,70 @@ + +## 2.0.6 + +Version 2.0.4 adds support for React Native by clarifying in package.json that +the browser environment does not support Node.js domains. +Why this is necessary, we leave as an exercise for the user. + +## 2.0.3 + +Version 2.0.3 fixes a bug when adjusting the capacity of the task queue. + +## 2.0.1-2.02 + +Version 2.0.1 fixes a bug in the way redirects were expressed that affected the +function of Browserify, but which Mr would tolerate. + +## 2.0.0 + +Version 2 of ASAP is a full rewrite with a few salient changes. +First, the ASAP source is CommonJS only and designed with [Browserify][] and +[Browserify-compatible][Mr] module loaders in mind. + +[Browserify]: https://github.com/substack/node-browserify +[Mr]: https://github.com/montagejs/mr + +The new version has been refactored in two dimensions. +Support for Node.js and browsers have been separated, using Browserify +redirects and ASAP has been divided into two modules. +The "raw" layer depends on the tasks to catch thrown exceptions and unravel +Node.js domains. + +The full implementation of ASAP is loadable as `require("asap")` in both Node.js +and browsers. + +The raw layer that lacks exception handling overhead is loadable as +`require("asap/raw")`. +The interface is the same for both layers. + +Tasks are no longer required to be functions, but can rather be any object that +implements `task.call()`. +With this feature you can recycle task objects to avoid garbage collector churn +and avoid closures in general. + +The implementation has been rigorously documented so that our successors can +understand the scope of the problem that this module solves and all of its +nuances, ensuring that the next generation of implementations know what details +are essential. + +- [asap.js](https://github.com/kriskowal/asap/blob/master/asap.js) +- [raw.js](https://github.com/kriskowal/asap/blob/master/raw.js) +- [browser-asap.js](https://github.com/kriskowal/asap/blob/master/browser-asap.js) +- [browser-raw.js](https://github.com/kriskowal/asap/blob/master/browser-raw.js) + +The new version has also been rigorously tested across a broad spectrum of +browsers, in both the window and worker context. +The following charts capture the browser test results for the most recent +release. +The first chart shows test results for ASAP running in the main window context. +The second chart shows test results for ASAP running in a web worker context. +Test results are inconclusive (grey) on browsers that do not support web +workers. +These data are captured automatically by [Continuous +Integration][]. + +![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg) + +![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg) + +[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md + diff --git a/socket/node_modules/asap/LICENSE.md b/socket/node_modules/asap/LICENSE.md new file mode 100644 index 0000000..ba18c61 --- /dev/null +++ b/socket/node_modules/asap/LICENSE.md @@ -0,0 +1,21 @@ + +Copyright 2009–2014 Contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + diff --git a/socket/node_modules/asap/README.md b/socket/node_modules/asap/README.md new file mode 100644 index 0000000..452fd8c --- /dev/null +++ b/socket/node_modules/asap/README.md @@ -0,0 +1,237 @@ +# ASAP + +[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap) + +Promise and asynchronous observer libraries, as well as hand-rolled callback +programs and libraries, often need a mechanism to postpone the execution of a +callback until the next available event. +(See [Designing API’s for Asynchrony][Zalgo].) +The `asap` function executes a task **as soon as possible** but not before it +returns, waiting only for the completion of the current event and previously +scheduled tasks. + +```javascript +asap(function () { + // ... +}); +``` + +[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony + +This CommonJS package provides an `asap` module that exports a function that +executes a task function *as soon as possible*. + +ASAP strives to schedule events to occur before yielding for IO, reflow, +or redrawing. +Each event receives an independent stack, with only platform code in parent +frames and the events run in the order they are scheduled. + +ASAP provides a fast event queue that will execute tasks until it is +empty before yielding to the JavaScript engine's underlying event-loop. +When a task gets added to a previously empty event queue, ASAP schedules a flush +event, preferring for that event to occur before the JavaScript engine has an +opportunity to perform IO tasks or rendering, thus making the first task and +subsequent tasks semantically indistinguishable. +ASAP uses a variety of techniques to preserve this invariant on different +versions of browsers and Node.js. + +By design, ASAP prevents input events from being handled until the task +queue is empty. +If the process is busy enough, this may cause incoming connection requests to be +dropped, and may cause existing connections to inform the sender to reduce the +transmission rate or stall. +ASAP allows this on the theory that, if there is enough work to do, there is no +sense in looking for trouble. +As a consequence, ASAP can interfere with smooth animation. +If your task should be tied to the rendering loop, consider using +`requestAnimationFrame` instead. +A long sequence of tasks can also effect the long running script dialog. +If this is a problem, you may be able to use ASAP’s cousin `setImmediate` to +break long processes into shorter intervals and periodically allow the browser +to breathe. +`setImmediate` will yield for IO, reflow, and repaint events. +It also returns a handler and can be canceled. +For a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate]. + +[setImmediate]: https://github.com/YuzuJS/setImmediate + +Take care. +ASAP can sustain infinite recursive calls without warning. +It will not halt from a stack overflow, and it will not consume unbounded +memory. +This is behaviorally equivalent to an infinite loop. +Just as with infinite loops, you can monitor a Node.js process for this behavior +with a heart-beat signal. +As with infinite loops, a very small amount of caution goes a long way to +avoiding problems. + +```javascript +function loop() { + asap(loop); +} +loop(); +``` + +In browsers, if a task throws an exception, it will not interrupt the flushing +of high-priority tasks. +The exception will be postponed to a later, low-priority event to avoid +slow-downs. +In Node.js, if a task throws an exception, ASAP will resume flushing only if—and +only after—the error is handled by `domain.on("error")` or +`process.on("uncaughtException")`. + +## Raw ASAP + +Checking for exceptions comes at a cost. +The package also provides an `asap/raw` module that exports the underlying +implementation which is faster but stalls if a task throws an exception. +This internal version of the ASAP function does not check for errors. +If a task does throw an error, it will stall the event queue unless you manually +call `rawAsap.requestFlush()` before throwing the error, or any time after. + +In Node.js, `asap/raw` also runs all tasks outside any domain. +If you need a task to be bound to your domain, you will have to do it manually. + +```js +if (process.domain) { + task = process.domain.bind(task); +} +rawAsap(task); +``` + +## Tasks + +A task may be any object that implements `call()`. +A function will suffice, but closures tend not to be reusable and can cause +garbage collector churn. +Both `asap` and `rawAsap` accept task objects to give you the option of +recycling task objects or using higher callable object abstractions. +See the `asap` source for an illustration. + + +## Compatibility + +ASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers. +The following charts capture the browser test results for the most recent +release. +The first chart shows test results for ASAP running in the main window context. +The second chart shows test results for ASAP running in a web worker context. +Test results are inconclusive (grey) on browsers that do not support web +workers. +These data are captured automatically by [Continuous +Integration][]. + +[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md + +![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg) + +![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg) + +## Caveats + +When a task is added to an empty event queue, it is not always possible to +guarantee that the task queue will begin flushing immediately after the current +event. +However, once the task queue begins flushing, it will not yield until the queue +is empty, even if the queue grows while executing tasks. + +The following browsers allow the use of [DOM mutation observers][] to access +the HTML [microtask queue][], and thus begin flushing ASAP's task queue +immediately at the end of the current event loop turn, before any rendering or +IO: + +[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue +[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers + +- Android 4–4.3 +- Chrome 26–34 +- Firefox 14–29 +- Internet Explorer 11 +- iPad Safari 6–7.1 +- iPhone Safari 7–7.1 +- Safari 6–7 + +In the absense of mutation observers, there are a few browsers, and situations +like web workers in some of the above browsers, where [message channels][] +would be a useful way to avoid falling back to timers. +Message channels give direct access to the HTML [task queue][], so the ASAP +task queue would flush after any already queued rendering and IO tasks, but +without having the minimum delay imposed by timers. +However, among these browsers, Internet Explorer 10 and Safari do not reliably +dispatch messages, so they are not worth the trouble to implement. + +[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels +[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task + +- Internet Explorer 10 +- Safair 5.0-1 +- Opera 11-12 + +In the absense of mutation observers, these browsers and the following browsers +all fall back to using `setTimeout` and `setInterval` to ensure that a `flush` +occurs. +The implementation uses both and cancels whatever handler loses the race, since +`setTimeout` tends to occasionally skip tasks in unisolated circumstances. +Timers generally delay the flushing of ASAP's task queue for four milliseconds. + +- Firefox 3–13 +- Internet Explorer 6–10 +- iPad Safari 4.3 +- Lynx 2.8.7 + + +## Heritage + +ASAP has been factored out of the [Q][] asynchronous promise library. +It originally had a naïve implementation in terms of `setTimeout`, but +[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be +useful for creating a high-priority, no-delay event dispatch hack. +Since then, Internet Explorer proposed and implemented `setImmediate`. +Robert Katić began contributing to Q by measuring the performance of +the internal implementation of `asap`, paying particular attention to +error recovery. +Domenic, Robert, and Kris Kowal collectively settled on the current strategy of +unrolling the high-priority event queue internally regardless of what strategy +we used to dispatch the potentially lower-priority flush event. +Domenic went on to make ASAP cooperate with Node.js domains. + +[Q]: https://github.com/kriskowal/q +[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html + +For further reading, Nicholas Zakas provided a thorough article on [The +Case for setImmediate][NCZ]. + +[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/ + +Ember’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but +further developed the implentation. +Particularly, The `MessagePort` implementation was abandoned due to interaction +[problems with Mobile Internet Explorer][IE Problems] in favor of an +implementation backed on the newer and more reliable DOM `MutationObserver` +interface. +These changes were back-ported into this library. + +[IE Problems]: https://github.com/cujojs/when/issues/197 +[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js + +In addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained +exception-safe, but `asap/raw` provided a tight kernel that could be used for +tasks that guaranteed that they would not throw exceptions. +This core is useful for promise implementations that capture thrown errors in +rejected promises and do not need a second safety net. +At the same time, the exception handling in `asap` was factored into separate +implementations for Node.js and browsers, using the the [Browserify][Browser +Config] `browser` property in `package.json` to instruct browser module loaders +and bundlers, including [Browserify][], [Mr][], and [Mop][], to use the +browser-only implementation. + +[Browser Config]: https://gist.github.com/defunctzombie/4339901 +[Browserify]: https://github.com/substack/node-browserify +[Mr]: https://github.com/montagejs/mr +[Mop]: https://github.com/montagejs/mop + +## License + +Copyright 2009-2014 by Contributors +MIT License (enclosed) + diff --git a/socket/node_modules/asap/asap.js b/socket/node_modules/asap/asap.js new file mode 100644 index 0000000..f04fcd5 --- /dev/null +++ b/socket/node_modules/asap/asap.js @@ -0,0 +1,65 @@ +"use strict"; + +var rawAsap = require("./raw"); +var freeTasks = []; + +/** + * Calls a task as soon as possible after returning, in its own event, with + * priority over IO events. An exception thrown in a task can be handled by + * `process.on("uncaughtException") or `domain.on("error")`, but will otherwise + * crash the process. If the error is handled, all subsequent tasks will + * resume. + * + * @param {{call}} task A callable object, typically a function that takes no + * arguments. + */ +module.exports = asap; +function asap(task) { + var rawTask; + if (freeTasks.length) { + rawTask = freeTasks.pop(); + } else { + rawTask = new RawTask(); + } + rawTask.task = task; + rawTask.domain = process.domain; + rawAsap(rawTask); +} + +function RawTask() { + this.task = null; + this.domain = null; +} + +RawTask.prototype.call = function () { + if (this.domain) { + this.domain.enter(); + } + var threw = true; + try { + this.task.call(); + threw = false; + // If the task throws an exception (presumably) Node.js restores the + // domain stack for the next event. + if (this.domain) { + this.domain.exit(); + } + } finally { + // We use try/finally and a threw flag to avoid messing up stack traces + // when we catch and release errors. + if (threw) { + // In Node.js, uncaught exceptions are considered fatal errors. + // Re-throw them to interrupt flushing! + // Ensure that flushing continues if an uncaught exception is + // suppressed listening process.on("uncaughtException") or + // domain.on("error"). + rawAsap.requestFlush(); + } + // If the task threw an error, we do not want to exit the domain here. + // Exiting the domain would prevent the domain from catching the error. + this.task = null; + this.domain = null; + freeTasks.push(this); + } +}; + diff --git a/socket/node_modules/asap/browser-asap.js b/socket/node_modules/asap/browser-asap.js new file mode 100644 index 0000000..805c982 --- /dev/null +++ b/socket/node_modules/asap/browser-asap.js @@ -0,0 +1,66 @@ +"use strict"; + +// rawAsap provides everything we need except exception management. +var rawAsap = require("./raw"); +// RawTasks are recycled to reduce GC churn. +var freeTasks = []; +// We queue errors to ensure they are thrown in right order (FIFO). +// Array-as-queue is good enough here, since we are just dealing with exceptions. +var pendingErrors = []; +var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError); + +function throwFirstError() { + if (pendingErrors.length) { + throw pendingErrors.shift(); + } +} + +/** + * Calls a task as soon as possible after returning, in its own event, with priority + * over other events like animation, reflow, and repaint. An error thrown from an + * event will not interrupt, nor even substantially slow down the processing of + * other events, but will be rather postponed to a lower priority event. + * @param {{call}} task A callable object, typically a function that takes no + * arguments. + */ +module.exports = asap; +function asap(task) { + var rawTask; + if (freeTasks.length) { + rawTask = freeTasks.pop(); + } else { + rawTask = new RawTask(); + } + rawTask.task = task; + rawAsap(rawTask); +} + +// We wrap tasks with recyclable task objects. A task object implements +// `call`, just like a function. +function RawTask() { + this.task = null; +} + +// The sole purpose of wrapping the task is to catch the exception and recycle +// the task object after its single use. +RawTask.prototype.call = function () { + try { + this.task.call(); + } catch (error) { + if (asap.onerror) { + // This hook exists purely for testing purposes. + // Its name will be periodically randomized to break any code that + // depends on its existence. + asap.onerror(error); + } else { + // In a web browser, exceptions are not fatal. However, to avoid + // slowing down the queue of pending tasks, we rethrow the error in a + // lower priority turn. + pendingErrors.push(error); + requestErrorThrow(); + } + } finally { + this.task = null; + freeTasks[freeTasks.length] = this; + } +}; diff --git a/socket/node_modules/asap/browser-raw.js b/socket/node_modules/asap/browser-raw.js new file mode 100644 index 0000000..9cee7e3 --- /dev/null +++ b/socket/node_modules/asap/browser-raw.js @@ -0,0 +1,223 @@ +"use strict"; + +// Use the fastest means possible to execute a task in its own turn, with +// priority over other events including IO, animation, reflow, and redraw +// events in browsers. +// +// An exception thrown by a task will permanently interrupt the processing of +// subsequent tasks. The higher level `asap` function ensures that if an +// exception is thrown by a task, that the task queue will continue flushing as +// soon as possible, but if you use `rawAsap` directly, you are responsible to +// either ensure that no exceptions are thrown from your task, or to manually +// call `rawAsap.requestFlush` if an exception is thrown. +module.exports = rawAsap; +function rawAsap(task) { + if (!queue.length) { + requestFlush(); + flushing = true; + } + // Equivalent to push, but avoids a function call. + queue[queue.length] = task; +} + +var queue = []; +// Once a flush has been requested, no further calls to `requestFlush` are +// necessary until the next `flush` completes. +var flushing = false; +// `requestFlush` is an implementation-specific method that attempts to kick +// off a `flush` event as quickly as possible. `flush` will attempt to exhaust +// the event queue before yielding to the browser's own event loop. +var requestFlush; +// The position of the next task to execute in the task queue. This is +// preserved between calls to `flush` so that it can be resumed if +// a task throws an exception. +var index = 0; +// If a task schedules additional tasks recursively, the task queue can grow +// unbounded. To prevent memory exhaustion, the task queue will periodically +// truncate already-completed tasks. +var capacity = 1024; + +// The flush function processes all tasks that have been scheduled with +// `rawAsap` unless and until one of those tasks throws an exception. +// If a task throws an exception, `flush` ensures that its state will remain +// consistent and will resume where it left off when called again. +// However, `flush` does not make any arrangements to be called again if an +// exception is thrown. +function flush() { + while (index < queue.length) { + var currentIndex = index; + // Advance the index before calling the task. This ensures that we will + // begin flushing on the next task the task throws an error. + index = index + 1; + queue[currentIndex].call(); + // Prevent leaking memory for long chains of recursive calls to `asap`. + // If we call `asap` within tasks scheduled by `asap`, the queue will + // grow, but to avoid an O(n) walk for every task we execute, we don't + // shift tasks off the queue after they have been executed. + // Instead, we periodically shift 1024 tasks off the queue. + if (index > capacity) { + // Manually shift all values starting at the index back to the + // beginning of the queue. + for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { + queue[scan] = queue[scan + index]; + } + queue.length -= index; + index = 0; + } + } + queue.length = 0; + index = 0; + flushing = false; +} + +// `requestFlush` is implemented using a strategy based on data collected from +// every available SauceLabs Selenium web driver worker at time of writing. +// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593 + +// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that +// have WebKitMutationObserver but not un-prefixed MutationObserver. +// Must use `global` or `self` instead of `window` to work in both frames and web +// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop. + +/* globals self */ +var scope = typeof global !== "undefined" ? global : self; +var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver; + +// MutationObservers are desirable because they have high priority and work +// reliably everywhere they are implemented. +// They are implemented in all modern browsers. +// +// - Android 4-4.3 +// - Chrome 26-34 +// - Firefox 14-29 +// - Internet Explorer 11 +// - iPad Safari 6-7.1 +// - iPhone Safari 7-7.1 +// - Safari 6-7 +if (typeof BrowserMutationObserver === "function") { + requestFlush = makeRequestCallFromMutationObserver(flush); + +// MessageChannels are desirable because they give direct access to the HTML +// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera +// 11-12, and in web workers in many engines. +// Although message channels yield to any queued rendering and IO tasks, they +// would be better than imposing the 4ms delay of timers. +// However, they do not work reliably in Internet Explorer or Safari. + +// Internet Explorer 10 is the only browser that has setImmediate but does +// not have MutationObservers. +// Although setImmediate yields to the browser's renderer, it would be +// preferrable to falling back to setTimeout since it does not have +// the minimum 4ms penalty. +// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and +// Desktop to a lesser extent) that renders both setImmediate and +// MessageChannel useless for the purposes of ASAP. +// https://github.com/kriskowal/q/issues/396 + +// Timers are implemented universally. +// We fall back to timers in workers in most engines, and in foreground +// contexts in the following browsers. +// However, note that even this simple case requires nuances to operate in a +// broad spectrum of browsers. +// +// - Firefox 3-13 +// - Internet Explorer 6-9 +// - iPad Safari 4.3 +// - Lynx 2.8.7 +} else { + requestFlush = makeRequestCallFromTimer(flush); +} + +// `requestFlush` requests that the high priority event queue be flushed as +// soon as possible. +// This is useful to prevent an error thrown in a task from stalling the event +// queue if the exception handled by Node.js’s +// `process.on("uncaughtException")` or by a domain. +rawAsap.requestFlush = requestFlush; + +// To request a high priority event, we induce a mutation observer by toggling +// the text of a text node between "1" and "-1". +function makeRequestCallFromMutationObserver(callback) { + var toggle = 1; + var observer = new BrowserMutationObserver(callback); + var node = document.createTextNode(""); + observer.observe(node, {characterData: true}); + return function requestCall() { + toggle = -toggle; + node.data = toggle; + }; +} + +// The message channel technique was discovered by Malte Ubl and was the +// original foundation for this library. +// http://www.nonblocking.io/2011/06/windownexttick.html + +// Safari 6.0.5 (at least) intermittently fails to create message ports on a +// page's first load. Thankfully, this version of Safari supports +// MutationObservers, so we don't need to fall back in that case. + +// function makeRequestCallFromMessageChannel(callback) { +// var channel = new MessageChannel(); +// channel.port1.onmessage = callback; +// return function requestCall() { +// channel.port2.postMessage(0); +// }; +// } + +// For reasons explained above, we are also unable to use `setImmediate` +// under any circumstances. +// Even if we were, there is another bug in Internet Explorer 10. +// It is not sufficient to assign `setImmediate` to `requestFlush` because +// `setImmediate` must be called *by name* and therefore must be wrapped in a +// closure. +// Never forget. + +// function makeRequestCallFromSetImmediate(callback) { +// return function requestCall() { +// setImmediate(callback); +// }; +// } + +// Safari 6.0 has a problem where timers will get lost while the user is +// scrolling. This problem does not impact ASAP because Safari 6.0 supports +// mutation observers, so that implementation is used instead. +// However, if we ever elect to use timers in Safari, the prevalent work-around +// is to add a scroll event listener that calls for a flush. + +// `setTimeout` does not call the passed callback if the delay is less than +// approximately 7 in web workers in Firefox 8 through 18, and sometimes not +// even then. + +function makeRequestCallFromTimer(callback) { + return function requestCall() { + // We dispatch a timeout with a specified delay of 0 for engines that + // can reliably accommodate that request. This will usually be snapped + // to a 4 milisecond delay, but once we're flushing, there's no delay + // between events. + var timeoutHandle = setTimeout(handleTimer, 0); + // However, since this timer gets frequently dropped in Firefox + // workers, we enlist an interval handle that will try to fire + // an event 20 times per second until it succeeds. + var intervalHandle = setInterval(handleTimer, 50); + + function handleTimer() { + // Whichever timer succeeds will cancel both timers and + // execute the callback. + clearTimeout(timeoutHandle); + clearInterval(intervalHandle); + callback(); + } + }; +} + +// This is for `asap.js` only. +// Its name will be periodically randomized to break any code that depends on +// its existence. +rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer; + +// ASAP was originally a nextTick shim included in Q. This was factored out +// into this ASAP package. It was later adapted to RSVP which made further +// amendments. These decisions, particularly to marginalize MessageChannel and +// to capture the MutationObserver implementation in a closure, were integrated +// back into ASAP proper. +// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js diff --git a/socket/node_modules/asap/package.json b/socket/node_modules/asap/package.json new file mode 100644 index 0000000..6d153cc --- /dev/null +++ b/socket/node_modules/asap/package.json @@ -0,0 +1,87 @@ +{ + "_from": "asap@~2.0.3", + "_id": "asap@2.0.6", + "_inBundle": false, + "_integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "_location": "/asap", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "asap@~2.0.3", + "name": "asap", + "escapedName": "asap", + "rawSpec": "~2.0.3", + "saveSpec": null, + "fetchSpec": "~2.0.3" + }, + "_requiredBy": [ + "/promise" + ], + "_resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "_shasum": "e50347611d7e690943208bbdafebcbc2fb866d46", + "_spec": "asap@~2.0.3", + "_where": "/var/www/htdocs/coze/socket/node_modules/promise", + "browser": { + "./asap": "./browser-asap.js", + "./asap.js": "./browser-asap.js", + "./raw": "./browser-raw.js", + "./raw.js": "./browser-raw.js", + "./test/domain.js": "./test/browser-domain.js" + }, + "bugs": { + "url": "https://github.com/kriskowal/asap/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "High-priority task queue for Node.js and browsers", + "devDependencies": { + "benchmark": "^1.0.0", + "events": "^1.0.1", + "jshint": "^2.5.1", + "knox": "^0.8.10", + "mr": "^2.0.5", + "opener": "^1.3.0", + "q": "^2.0.3", + "q-io": "^2.0.3", + "saucelabs": "^0.1.1", + "wd": "^0.2.21", + "weak-map": "^1.0.5" + }, + "files": [ + "raw.js", + "asap.js", + "browser-raw.js", + "browser-asap.js" + ], + "homepage": "https://github.com/kriskowal/asap#readme", + "keywords": [ + "event", + "task", + "queue" + ], + "license": "MIT", + "main": "./asap.js", + "name": "asap", + "react-native": { + "domain": false + }, + "repository": { + "type": "git", + "url": "git+https://github.com/kriskowal/asap.git" + }, + "scripts": { + "benchmarks": "node benchmarks", + "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)", + "test": "npm run lint && npm run test-node", + "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", + "test-node": "node test/asap-test.js", + "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", + "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", + "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", + "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", + "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", + "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker" + }, + "version": "2.0.6" +} diff --git a/socket/node_modules/asap/raw.js b/socket/node_modules/asap/raw.js new file mode 100644 index 0000000..ae3b892 --- /dev/null +++ b/socket/node_modules/asap/raw.js @@ -0,0 +1,101 @@ +"use strict"; + +var domain; // The domain module is executed on demand +var hasSetImmediate = typeof setImmediate === "function"; + +// Use the fastest means possible to execute a task in its own turn, with +// priority over other events including network IO events in Node.js. +// +// An exception thrown by a task will permanently interrupt the processing of +// subsequent tasks. The higher level `asap` function ensures that if an +// exception is thrown by a task, that the task queue will continue flushing as +// soon as possible, but if you use `rawAsap` directly, you are responsible to +// either ensure that no exceptions are thrown from your task, or to manually +// call `rawAsap.requestFlush` if an exception is thrown. +module.exports = rawAsap; +function rawAsap(task) { + if (!queue.length) { + requestFlush(); + flushing = true; + } + // Avoids a function call + queue[queue.length] = task; +} + +var queue = []; +// Once a flush has been requested, no further calls to `requestFlush` are +// necessary until the next `flush` completes. +var flushing = false; +// The position of the next task to execute in the task queue. This is +// preserved between calls to `flush` so that it can be resumed if +// a task throws an exception. +var index = 0; +// If a task schedules additional tasks recursively, the task queue can grow +// unbounded. To prevent memory excaustion, the task queue will periodically +// truncate already-completed tasks. +var capacity = 1024; + +// The flush function processes all tasks that have been scheduled with +// `rawAsap` unless and until one of those tasks throws an exception. +// If a task throws an exception, `flush` ensures that its state will remain +// consistent and will resume where it left off when called again. +// However, `flush` does not make any arrangements to be called again if an +// exception is thrown. +function flush() { + while (index < queue.length) { + var currentIndex = index; + // Advance the index before calling the task. This ensures that we will + // begin flushing on the next task the task throws an error. + index = index + 1; + queue[currentIndex].call(); + // Prevent leaking memory for long chains of recursive calls to `asap`. + // If we call `asap` within tasks scheduled by `asap`, the queue will + // grow, but to avoid an O(n) walk for every task we execute, we don't + // shift tasks off the queue after they have been executed. + // Instead, we periodically shift 1024 tasks off the queue. + if (index > capacity) { + // Manually shift all values starting at the index back to the + // beginning of the queue. + for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { + queue[scan] = queue[scan + index]; + } + queue.length -= index; + index = 0; + } + } + queue.length = 0; + index = 0; + flushing = false; +} + +rawAsap.requestFlush = requestFlush; +function requestFlush() { + // Ensure flushing is not bound to any domain. + // It is not sufficient to exit the domain, because domains exist on a stack. + // To execute code outside of any domain, the following dance is necessary. + var parentDomain = process.domain; + if (parentDomain) { + if (!domain) { + // Lazy execute the domain module. + // Only employed if the user elects to use domains. + domain = require("domain"); + } + domain.active = process.domain = null; + } + + // `setImmediate` is slower that `process.nextTick`, but `process.nextTick` + // cannot handle recursion. + // `requestFlush` will only be called recursively from `asap.js`, to resume + // flushing after an error is thrown into a domain. + // Conveniently, `setImmediate` was introduced in the same version + // `process.nextTick` started throwing recursion errors. + if (flushing && hasSetImmediate) { + setImmediate(flush); + } else { + process.nextTick(flush); + } + + if (parentDomain) { + domain.active = process.domain = parentDomain; + } +} diff --git a/socket/node_modules/async-limiter/.travis.yml b/socket/node_modules/async-limiter/.travis.yml new file mode 100644 index 0000000..6cf4a7a --- /dev/null +++ b/socket/node_modules/async-limiter/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "6" + - "node" +script: npm run travis +cache: + yarn: true diff --git a/socket/node_modules/async-limiter/LICENSE b/socket/node_modules/async-limiter/LICENSE new file mode 100644 index 0000000..9c91fb2 --- /dev/null +++ b/socket/node_modules/async-limiter/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2017 Samuel Reed + +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. diff --git a/socket/node_modules/async-limiter/coverage/coverage.json b/socket/node_modules/async-limiter/coverage/coverage.json new file mode 100644 index 0000000..5b4a358 --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/samuelreed/git/forks/async-throttle/index.js":{"path":"/Users/samuelreed/git/forks/async-throttle/index.js","s":{"1":1,"2":7,"3":1,"4":6,"5":6,"6":6,"7":6,"8":6,"9":6,"10":1,"11":1,"12":3,"13":13,"14":13,"15":13,"16":1,"17":19,"18":1,"19":45,"20":6,"21":39,"22":13,"23":13,"24":13,"25":13,"26":39,"27":18,"28":6,"29":6,"30":1,"31":6,"32":6,"33":6,"34":1,"35":13,"36":13,"37":1},"b":{"1":[1,6],"2":[6,5],"3":[6,5],"4":[6,39],"5":[13,26],"6":[18,21],"7":[6,0]},"f":{"1":7,"2":3,"3":13,"4":19,"5":45,"6":6,"7":13},"fnMap":{"1":{"name":"Queue","line":3,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":24}}},"2":{"name":"(anonymous_2)","line":22,"loc":{"start":{"line":22,"column":24},"end":{"line":22,"column":41}}},"3":{"name":"(anonymous_3)","line":23,"loc":{"start":{"line":23,"column":28},"end":{"line":23,"column":39}}},"4":{"name":"(anonymous_4)","line":31,"loc":{"start":{"line":31,"column":7},"end":{"line":31,"column":18}}},"5":{"name":"(anonymous_5)","line":36,"loc":{"start":{"line":36,"column":23},"end":{"line":36,"column":34}}},"6":{"name":"(anonymous_6)","line":55,"loc":{"start":{"line":55,"column":25},"end":{"line":55,"column":38}}},"7":{"name":"done","line":62,"loc":{"start":{"line":62,"column":0},"end":{"line":62,"column":16}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":14,"column":1}},"2":{"start":{"line":4,"column":2},"end":{"line":6,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":5,"column":30}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":26}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":53}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":19}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":17}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":16}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":31}},"10":{"start":{"line":16,"column":0},"end":{"line":20,"column":2}},"11":{"start":{"line":22,"column":0},"end":{"line":28,"column":3}},"12":{"start":{"line":23,"column":2},"end":{"line":27,"column":4}},"13":{"start":{"line":24,"column":4},"end":{"line":24,"column":75}},"14":{"start":{"line":25,"column":4},"end":{"line":25,"column":16}},"15":{"start":{"line":26,"column":4},"end":{"line":26,"column":24}},"16":{"start":{"line":30,"column":0},"end":{"line":34,"column":3}},"17":{"start":{"line":32,"column":4},"end":{"line":32,"column":43}},"18":{"start":{"line":36,"column":0},"end":{"line":53,"column":2}},"19":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"20":{"start":{"line":38,"column":4},"end":{"line":38,"column":11}},"21":{"start":{"line":40,"column":2},"end":{"line":45,"column":3}},"22":{"start":{"line":41,"column":4},"end":{"line":41,"column":32}},"23":{"start":{"line":42,"column":4},"end":{"line":42,"column":19}},"24":{"start":{"line":43,"column":4},"end":{"line":43,"column":20}},"25":{"start":{"line":44,"column":4},"end":{"line":44,"column":16}},"26":{"start":{"line":47,"column":2},"end":{"line":52,"column":3}},"27":{"start":{"line":48,"column":4},"end":{"line":51,"column":5}},"28":{"start":{"line":49,"column":6},"end":{"line":49,"column":30}},"29":{"start":{"line":50,"column":6},"end":{"line":50,"column":27}},"30":{"start":{"line":55,"column":0},"end":{"line":60,"column":2}},"31":{"start":{"line":56,"column":2},"end":{"line":59,"column":3}},"32":{"start":{"line":57,"column":4},"end":{"line":57,"column":22}},"33":{"start":{"line":58,"column":4},"end":{"line":58,"column":16}},"34":{"start":{"line":62,"column":0},"end":{"line":65,"column":1}},"35":{"start":{"line":63,"column":2},"end":{"line":63,"column":17}},"36":{"start":{"line":64,"column":2},"end":{"line":64,"column":14}},"37":{"start":{"line":67,"column":0},"end":{"line":67,"column":23}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":8,"type":"binary-expr","locations":[{"start":{"line":8,"column":12},"end":{"line":8,"column":19}},{"start":{"line":8,"column":23},"end":{"line":8,"column":25}}]},"3":{"line":9,"type":"binary-expr","locations":[{"start":{"line":9,"column":21},"end":{"line":9,"column":40}},{"start":{"line":9,"column":44},"end":{"line":9,"column":52}}]},"4":{"line":37,"type":"if","locations":[{"start":{"line":37,"column":2},"end":{"line":37,"column":2}},{"start":{"line":37,"column":2},"end":{"line":37,"column":2}}]},"5":{"line":40,"type":"if","locations":[{"start":{"line":40,"column":2},"end":{"line":40,"column":2}},{"start":{"line":40,"column":2},"end":{"line":40,"column":2}}]},"6":{"line":47,"type":"if","locations":[{"start":{"line":47,"column":2},"end":{"line":47,"column":2}},{"start":{"line":47,"column":2},"end":{"line":47,"column":2}}]},"7":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":56,"column":2}},{"start":{"line":56,"column":2},"end":{"line":56,"column":2}}]}}}} \ No newline at end of file diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.html b/socket/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.html new file mode 100644 index 0000000..198882b --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for async-throttle/ + + + + + + +
+

Code coverage report for async-throttle/

+

+ Statements: 100% (37 / 37)      + Branches: 92.86% (13 / 14)      + Functions: 100% (7 / 7)      + Lines: 100% (37 / 37)      + Ignored: none      +

+
All files » async-throttle/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(37 / 37)92.86%(13 / 14)100%(7 / 7)100%(37 / 37)
+
+
+ + + + + + diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.js.html b/socket/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.js.html new file mode 100644 index 0000000..adc030f --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.js.html @@ -0,0 +1,246 @@ + + + + Code coverage report for async-throttle/index.js + + + + + + +
+

Code coverage report for async-throttle/index.js

+

+ Statements: 100% (37 / 37)      + Branches: 92.86% (13 / 14)      + Functions: 100% (7 / 7)      + Lines: 100% (37 / 37)      + Ignored: none      +

+
All files » async-throttle/ » index.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68  +  +1 +7 +1 +  +  +6 +6 +6 +6 +6 +6 +  +  +1 +  +  +  +  +  +1 +3 +13 +13 +13 +  +  +  +1 +  +19 +  +  +  +1 +45 +6 +  +39 +13 +13 +13 +13 +  +  +39 +18 +6 +6 +  +  +  +  +1 +6 +6 +6 +  +  +  +1 +13 +13 +  +  +1 + 
'use strict';
+ 
+function Queue(options) {
+  if (!(this instanceof Queue)) {
+    return new Queue(options);
+  }
+ 
+  options = options || {};
+  this.concurrency = options.concurrency || Infinity;
+  this.pending = 0;
+  this.jobs = [];
+  this.cbs = [];
+  this._done = done.bind(this);
+}
+ 
+var arrayAddMethods = [
+  'push',
+  'unshift',
+  'splice'
+];
+ 
+arrayAddMethods.forEach(function(method) {
+  Queue.prototype[method] = function() {
+    var methodResult = Array.prototype[method].apply(this.jobs, arguments);
+    this._run();
+    return methodResult;
+  };
+});
+ 
+Object.defineProperty(Queue.prototype, 'length', {
+  get: function() {
+    return this.pending + this.jobs.length;
+  }
+});
+ 
+Queue.prototype._run = function() {
+  if (this.pending === this.concurrency) {
+    return;
+  }
+  if (this.jobs.length) {
+    var job = this.jobs.shift();
+    this.pending++;
+    job(this._done);
+    this._run();
+  }
+ 
+  if (this.pending === 0) {
+    while (this.cbs.length !== 0) {
+      var cb = this.cbs.pop();
+      process.nextTick(cb);
+    }
+  }
+};
+ 
+Queue.prototype.onDone = function(cb) {
+  Eif (typeof cb === 'function') {
+    this.cbs.push(cb);
+    this._run();
+  }
+};
+ 
+function done() {
+  this.pending--;
+  this._run();
+}
+ 
+module.exports = Queue;
+ 
+ +
+ + + + + + diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/base.css b/socket/node_modules/async-limiter/coverage/lcov-report/base.css new file mode 100644 index 0000000..a6a2f32 --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov-report/base.css @@ -0,0 +1,182 @@ +body, html { + margin:0; padding: 0; +} +body { + font-family: Helvetica Neue, Helvetica,Arial; + font-size: 10pt; +} +div.header, div.footer { + background: #eee; + padding: 1em; +} +div.header { + z-index: 100; + position: fixed; + top: 0; + border-bottom: 1px solid #666; + width: 100%; +} +div.footer { + border-top: 1px solid #666; +} +div.body { + margin-top: 10em; +} +div.meta { + font-size: 90%; + text-align: center; +} +h1, h2, h3 { + font-weight: normal; +} +h1 { + font-size: 12pt; +} +h2 { + font-size: 10pt; +} +pre { + font-family: Consolas, Menlo, Monaco, monospace; + margin: 0; + padding: 0; + line-height: 1.3; + font-size: 14px; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} + +div.path { font-size: 110%; } +div.path a:link, div.path a:visited { color: #000; } +table.coverage { border-collapse: collapse; margin:0; padding: 0 } + +table.coverage td { + margin: 0; + padding: 0; + color: #111; + vertical-align: top; +} +table.coverage td.line-count { + width: 50px; + text-align: right; + padding-right: 5px; +} +table.coverage td.line-coverage { + color: #777 !important; + text-align: right; + border-left: 1px solid #666; + border-right: 1px solid #666; +} + +table.coverage td.text { +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 40px; +} +table.coverage td span.cline-neutral { + background: #eee; +} +table.coverage td span.cline-yes { + background: #b5d592; + color: #999; +} +table.coverage td span.cline-no { + background: #fc8c84; +} + +.cstat-yes { color: #111; } +.cstat-no { background: #fc8c84; color: #111; } +.fstat-no { background: #ffc520; color: #111 !important; } +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +.missing-if-branch { + display: inline-block; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: black; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} + +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} + +.entity, .metric { font-weight: bold; } +.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; } +.metric small { font-size: 80%; font-weight: normal; color: #666; } + +div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; } +div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; } +div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; } +div.coverage-summary th.file { border-right: none !important; } +div.coverage-summary th.pic { border-left: none !important; text-align: right; } +div.coverage-summary th.pct { border-right: none !important; } +div.coverage-summary th.abs { border-left: none !important; text-align: right; } +div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; } +div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; } +div.coverage-summary td.file { border-left: 1px solid #666; white-space: nowrap; } +div.coverage-summary td.pic { min-width: 120px !important; } +div.coverage-summary a:link { text-decoration: none; color: #000; } +div.coverage-summary a:visited { text-decoration: none; color: #777; } +div.coverage-summary a:hover { text-decoration: underline; } +div.coverage-summary tfoot td { border-top: 1px solid #666; } + +div.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +div.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +div.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} + +.high { background: #b5d592 !important; } +.medium { background: #ffe87c !important; } +.low { background: #fc8c84 !important; } + +span.cover-fill, span.cover-empty { + display:inline-block; + border:1px solid #444; + background: white; + height: 12px; +} +span.cover-fill { + background: #ccc; + border-right: 1px solid #444; +} +span.cover-empty { + background: white; + border-left: none; +} +span.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/index.html b/socket/node_modules/async-limiter/coverage/lcov-report/index.html new file mode 100644 index 0000000..782a1cf --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov-report/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for All files + + + + + + +
+

Code coverage report for All files

+

+ Statements: 100% (37 / 37)      + Branches: 92.86% (13 / 14)      + Functions: 100% (7 / 7)      + Lines: 100% (37 / 37)      + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
async-throttle/100%(37 / 37)92.86%(13 / 14)100%(7 / 7)100%(37 / 37)
+
+
+ + + + + + diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/prettify.css b/socket/node_modules/async-limiter/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/prettify.js b/socket/node_modules/async-limiter/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/sort-arrow-sprite.png b/socket/node_modules/async-limiter/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000..03f704a Binary files /dev/null and b/socket/node_modules/async-limiter/coverage/lcov-report/sort-arrow-sprite.png differ diff --git a/socket/node_modules/async-limiter/coverage/lcov-report/sorter.js b/socket/node_modules/async-limiter/coverage/lcov-report/sorter.js new file mode 100644 index 0000000..6afb736 --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov-report/sorter.js @@ -0,0 +1,156 @@ +var addSorting = (function () { + "use strict"; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { return document.querySelector('.coverage-summary table'); } + // returns the thead element of the summary table + function getTableHeader() { return getTable().querySelector('thead tr'); } + // returns the tbody element of the summary table + function getTableBody() { return getTable().querySelector('tbody'); } + // returns the th element for nth column + function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = colNode.innerHTML + ''; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + el = getNthColumn(i).querySelector('.sorter'); + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/socket/node_modules/async-limiter/coverage/lcov.info b/socket/node_modules/async-limiter/coverage/lcov.info new file mode 100644 index 0000000..fbf36aa --- /dev/null +++ b/socket/node_modules/async-limiter/coverage/lcov.info @@ -0,0 +1,74 @@ +TN: +SF:/Users/samuelreed/git/forks/async-throttle/index.js +FN:3,Queue +FN:22,(anonymous_2) +FN:23,(anonymous_3) +FN:31,(anonymous_4) +FN:36,(anonymous_5) +FN:55,(anonymous_6) +FN:62,done +FNF:7 +FNH:7 +FNDA:7,Queue +FNDA:3,(anonymous_2) +FNDA:13,(anonymous_3) +FNDA:19,(anonymous_4) +FNDA:45,(anonymous_5) +FNDA:6,(anonymous_6) +FNDA:13,done +DA:3,1 +DA:4,7 +DA:5,1 +DA:8,6 +DA:9,6 +DA:10,6 +DA:11,6 +DA:12,6 +DA:13,6 +DA:16,1 +DA:22,1 +DA:23,3 +DA:24,13 +DA:25,13 +DA:26,13 +DA:30,1 +DA:32,19 +DA:36,1 +DA:37,45 +DA:38,6 +DA:40,39 +DA:41,13 +DA:42,13 +DA:43,13 +DA:44,13 +DA:47,39 +DA:48,18 +DA:49,6 +DA:50,6 +DA:55,1 +DA:56,6 +DA:57,6 +DA:58,6 +DA:62,1 +DA:63,13 +DA:64,13 +DA:67,1 +LF:37 +LH:37 +BRDA:4,1,0,1 +BRDA:4,1,1,6 +BRDA:8,2,0,6 +BRDA:8,2,1,5 +BRDA:9,3,0,6 +BRDA:9,3,1,5 +BRDA:37,4,0,6 +BRDA:37,4,1,39 +BRDA:40,5,0,13 +BRDA:40,5,1,26 +BRDA:47,6,0,18 +BRDA:47,6,1,21 +BRDA:56,7,0,6 +BRDA:56,7,1,0 +BRF:14 +BRH:13 +end_of_record diff --git a/socket/node_modules/async-limiter/index.js b/socket/node_modules/async-limiter/index.js new file mode 100644 index 0000000..c9bd2f9 --- /dev/null +++ b/socket/node_modules/async-limiter/index.js @@ -0,0 +1,67 @@ +'use strict'; + +function Queue(options) { + if (!(this instanceof Queue)) { + return new Queue(options); + } + + options = options || {}; + this.concurrency = options.concurrency || Infinity; + this.pending = 0; + this.jobs = []; + this.cbs = []; + this._done = done.bind(this); +} + +var arrayAddMethods = [ + 'push', + 'unshift', + 'splice' +]; + +arrayAddMethods.forEach(function(method) { + Queue.prototype[method] = function() { + var methodResult = Array.prototype[method].apply(this.jobs, arguments); + this._run(); + return methodResult; + }; +}); + +Object.defineProperty(Queue.prototype, 'length', { + get: function() { + return this.pending + this.jobs.length; + } +}); + +Queue.prototype._run = function() { + if (this.pending === this.concurrency) { + return; + } + if (this.jobs.length) { + var job = this.jobs.shift(); + this.pending++; + job(this._done); + this._run(); + } + + if (this.pending === 0) { + while (this.cbs.length !== 0) { + var cb = this.cbs.pop(); + process.nextTick(cb); + } + } +}; + +Queue.prototype.onDone = function(cb) { + if (typeof cb === 'function') { + this.cbs.push(cb); + this._run(); + } +}; + +function done() { + this.pending--; + this._run(); +} + +module.exports = Queue; diff --git a/socket/node_modules/async-limiter/package.json b/socket/node_modules/async-limiter/package.json new file mode 100644 index 0000000..b590861 --- /dev/null +++ b/socket/node_modules/async-limiter/package.json @@ -0,0 +1,69 @@ +{ + "_from": "async-limiter@~1.0.0", + "_id": "async-limiter@1.0.0", + "_inBundle": false, + "_integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "_location": "/async-limiter", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "async-limiter@~1.0.0", + "name": "async-limiter", + "escapedName": "async-limiter", + "rawSpec": "~1.0.0", + "saveSpec": null, + "fetchSpec": "~1.0.0" + }, + "_requiredBy": [ + "/ws" + ], + "_resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "_shasum": "78faed8c3d074ab81f22b4e985d79e8738f720f8", + "_spec": "async-limiter@~1.0.0", + "_where": "/var/www/htdocs/coze/socket/node_modules/ws", + "author": { + "name": "Samuel Reed" + }, + "bugs": { + "url": "https://github.com/strml/async-limiter/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "asynchronous function queue with adjustable concurrency", + "devDependencies": { + "coveralls": "^2.11.2", + "eslint": "^4.6.1", + "eslint-plugin-mocha": "^4.11.0", + "intelli-espower-loader": "^1.0.1", + "istanbul": "^0.3.2", + "mocha": "^3.5.2", + "power-assert": "^1.4.4" + }, + "homepage": "https://github.com/strml/async-limiter#readme", + "keywords": [ + "throttle", + "async", + "limiter", + "asynchronous", + "job", + "task", + "concurrency", + "concurrent" + ], + "license": "MIT", + "name": "async-limiter", + "repository": { + "type": "git", + "url": "git+https://github.com/strml/async-limiter.git" + }, + "scripts": { + "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls", + "example": "node example", + "lint": "eslint .", + "test": "mocha --R intelli-espower-loader test/", + "travis": "npm run lint && npm run coverage" + }, + "version": "1.0.0" +} diff --git a/socket/node_modules/async-limiter/readme.md b/socket/node_modules/async-limiter/readme.md new file mode 100644 index 0000000..dcf4932 --- /dev/null +++ b/socket/node_modules/async-limiter/readme.md @@ -0,0 +1,132 @@ +# Async-Limiter + +A module for limiting concurrent asynchronous actions in flight. Forked from [queue](https://github.com/jessetane/queue). + +[![npm](http://img.shields.io/npm/v/async-limiter.svg?style=flat-square)](http://www.npmjs.org/async-limiter) +[![tests](https://img.shields.io/travis/STRML/async-limiter.svg?style=flat-square&branch=master)](https://travis-ci.org/STRML/async-limiter) +[![coverage](https://img.shields.io/coveralls/STRML/async-limiter.svg?style=flat-square&branch=master)](https://coveralls.io/r/STRML/async-limiter) + +This module exports a class `Limiter` that implements some of the `Array` API. +Pass async functions (ones that accept a callback or return a promise) to an instance's additive array methods. + +## Motivation + +Certain functions, like `zlib`, have [undesirable behavior](https://github.com/nodejs/node/issues/8871#issuecomment-250915913) when +run at infinite concurrency. + +In this case, it is actually faster, and takes far less memory, to limit concurrency. + +This module should do the absolute minimum work necessary to queue up functions. PRs are welcome that would +make this module faster or lighter, but new functionality is not desired. + +Style should confirm to nodejs/node style. + +## Example + +``` javascript +var Limiter = require('async-limiter') + +var t = new Limiter({concurrency: 2}); +var results = [] + +// add jobs using the familiar Array API +t.push(function (cb) { + results.push('two') + cb() +}) + +t.push( + function (cb) { + results.push('four') + cb() + }, + function (cb) { + results.push('five') + cb() + } +) + +t.unshift(function (cb) { + results.push('one') + cb() +}) + +t.splice(2, 0, function (cb) { + results.push('three') + cb() +}) + +// Jobs run automatically. If you want a callback when all are done, +// call 'onDone()'. +t.onDone(function () { + console.log('all done:', results) +}) +``` + +## Zlib Example + +```js +const zlib = require('zlib'); +const Limiter = require('async-limiter'); + +const message = {some: "data"}; +const payload = new Buffer(JSON.stringify(message)); + +// Try with different concurrency values to see how this actually +// slows significantly with higher concurrency! +// +// 5: 1398.607ms +// 10: 1375.668ms +// Infinity: 4423.300ms +// +const t = new Limiter({concurrency: 5}); +function deflate(payload, cb) { + t.push(function(done) { + zlib.deflate(payload, function(err, buffer) { + done(); + cb(err, buffer); + }); + }); +} + +console.time('deflate'); +for(let i = 0; i < 30000; ++i) { + deflate(payload, function (err, buffer) {}); +} +q.onDone(function() { + console.timeEnd('deflate'); +}); +``` + +## Install + +`npm install async-limiter` + +## Test + +`npm test` + +## API + +### `var t = new Limiter([opts])` +Constructor. `opts` may contain inital values for: +* `q.concurrency` + +## Instance methods + +### `q.onDone(fn)` +`fn` will be called once and only once, when the queue is empty. + +## Instance methods mixed in from `Array` +Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array). +### `q.push(element1, ..., elementN)` +### `q.unshift(element1, ..., elementN)` +### `q.splice(index , howMany[, element1[, ...[, elementN]]])` + +## Properties +### `q.concurrency` +Max number of jobs the queue should process concurrently, defaults to `Infinity`. + +### `q.length` +Jobs pending + jobs to process (readonly). + diff --git a/socket/node_modules/babel-code-frame/.npmignore b/socket/node_modules/babel-code-frame/.npmignore new file mode 100644 index 0000000..47cdd2c --- /dev/null +++ b/socket/node_modules/babel-code-frame/.npmignore @@ -0,0 +1,3 @@ +src +test +node_modules diff --git a/socket/node_modules/babel-code-frame/README.md b/socket/node_modules/babel-code-frame/README.md new file mode 100644 index 0000000..7ef5368 --- /dev/null +++ b/socket/node_modules/babel-code-frame/README.md @@ -0,0 +1,60 @@ +# babel-code-frame + +> Generate errors that contain a code frame that point to source locations. + +## Install + +```sh +npm install --save-dev babel-code-frame +``` + +## Usage + +```js +import codeFrame from 'babel-code-frame'; + +const rawLines = `class Foo { + constructor() +}`; +const lineNumber = 2; +const colNumber = 16; + +const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ }); + +console.log(result); +``` + +```sh + 1 | class Foo { +> 2 | constructor() + | ^ + 3 | } +``` + +If the column number is not known, you may pass `null` instead. + +## Options + +### `highlightCode` + +`boolean`, defaults to `false`. + +Toggles syntax highlighting the code as JavaScript for terminals. + +### `linesAbove` + +`number`, defaults to `2`. + +Adjust the number of lines to show above the error. + +### `linesBelow` + +`number`, defaults to `3`. + +Adjust the number of lines to show below the error. + +### `forceColor` + +`boolean`, defaults to `false`. + +Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`. diff --git a/socket/node_modules/babel-code-frame/lib/index.js b/socket/node_modules/babel-code-frame/lib/index.js new file mode 100644 index 0000000..ff49b90 --- /dev/null +++ b/socket/node_modules/babel-code-frame/lib/index.js @@ -0,0 +1,141 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (rawLines, lineNumber, colNumber) { + var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + colNumber = Math.max(colNumber, 0); + + var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor; + var chalk = _chalk2.default; + if (opts.forceColor) { + chalk = new _chalk2.default.constructor({ enabled: true }); + } + var maybeHighlight = function maybeHighlight(chalkFn, string) { + return highlighted ? chalkFn(string) : string; + }; + var defs = getDefs(chalk); + if (highlighted) rawLines = highlight(defs, rawLines); + + var linesAbove = opts.linesAbove || 2; + var linesBelow = opts.linesBelow || 3; + + var lines = rawLines.split(NEWLINE); + var start = Math.max(lineNumber - (linesAbove + 1), 0); + var end = Math.min(lines.length, lineNumber + linesBelow); + + if (!lineNumber && !colNumber) { + start = 0; + end = lines.length; + } + + var numberMaxWidth = String(end).length; + + var frame = lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var paddedNumber = (" " + number).slice(-numberMaxWidth); + var gutter = " " + paddedNumber + " | "; + if (number === lineNumber) { + var markerLine = ""; + if (colNumber) { + var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " "); + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join(""); + } + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } +}; + +var _jsTokens = require("js-tokens"); + +var _jsTokens2 = _interopRequireDefault(_jsTokens); + +var _esutils = require("esutils"); + +var _esutils2 = _interopRequireDefault(_esutils); + +var _chalk = require("chalk"); + +var _chalk2 = _interopRequireDefault(_chalk); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsx_tag: chalk.yellow, + punctuator: chalk.yellow, + + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold, + gutter: chalk.grey, + marker: chalk.red.bold + }; +} + +var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + +var JSX_TAG = /^[a-z][\w-]*$/i; + +var BRACKET = /^[()\[\]{}]$/; + +function getTokenType(match) { + var _match$slice = match.slice(-2), + offset = _match$slice[0], + text = _match$slice[1]; + + var token = (0, _jsTokens.matchToToken)(match); + + if (token.type === "name") { + if (_esutils2.default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " Collection of debug messages used by Babel. + +## Install + +```sh +npm install --save-dev babel-messages +``` + +## Usage + +```js +import * as messages from 'babel-messages'; + +messages.get('tailCallReassignmentDeopt'); +// > "Function reference has been..." +``` diff --git a/socket/node_modules/babel-messages/lib/index.js b/socket/node_modules/babel-messages/lib/index.js new file mode 100644 index 0000000..39e023e --- /dev/null +++ b/socket/node_modules/babel-messages/lib/index.js @@ -0,0 +1,84 @@ +"use strict"; + +exports.__esModule = true; +exports.MESSAGES = undefined; + +var _stringify = require("babel-runtime/core-js/json/stringify"); + +var _stringify2 = _interopRequireDefault(_stringify); + +exports.get = get; +exports.parseArgs = parseArgs; + +var _util = require("util"); + +var util = _interopRequireWildcard(_util); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MESSAGES = exports.MESSAGES = { + tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence", + classesIllegalBareSuper: "Illegal use of bare super", + classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead", + scopeDuplicateDeclaration: "Duplicate declaration $1", + settersNoRest: "Setters aren't allowed to have a rest", + noAssignmentsInForHead: "No assignments allowed in for-in/of head", + expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier", + invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue", + readOnly: "$1 is read-only", + unknownForHead: "Unknown node type $1 in ForStatement", + didYouMean: "Did you mean $1?", + codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.", + missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", + unsupportedOutputType: "Unsupported output type $1", + illegalMethodName: "Illegal method name $1", + lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated", + + modulesIllegalExportName: "Illegal export $1", + modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes", + + undeclaredVariable: "Reference to undeclared variable $1", + undeclaredVariableType: "Referencing a type alias outside of a type annotation", + undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?", + + traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.", + traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", + traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2", + traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type", + + pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3", + pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3", + pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4", + pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3" +}; + +function get(key) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var msg = MESSAGES[key]; + if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key)); + + args = parseArgs(args); + + return msg.replace(/\$(\d+)/g, function (str, i) { + return args[i - 1]; + }); +} + +function parseArgs(args) { + return args.map(function (val) { + if (val != null && val.inspect) { + return val.inspect(); + } else { + try { + return (0, _stringify2.default)(val) || val + ""; + } catch (e) { + return util.inspect(val); + } + } + }); +} \ No newline at end of file diff --git a/socket/node_modules/babel-messages/package.json b/socket/node_modules/babel-messages/package.json new file mode 100644 index 0000000..5d2fb89 --- /dev/null +++ b/socket/node_modules/babel-messages/package.json @@ -0,0 +1,44 @@ +{ + "_from": "babel-messages@^6.23.0", + "_id": "babel-messages@6.23.0", + "_inBundle": false, + "_integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "_location": "/babel-messages", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "babel-messages@^6.23.0", + "name": "babel-messages", + "escapedName": "babel-messages", + "rawSpec": "^6.23.0", + "saveSpec": null, + "fetchSpec": "^6.23.0" + }, + "_requiredBy": [ + "/babel-traverse" + ], + "_resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "_shasum": "f3cdf4703858035b2a2951c6ec5edf6c62f2630e", + "_spec": "babel-messages@^6.23.0", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-traverse", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "babel-runtime": "^6.22.0" + }, + "deprecated": false, + "description": "Collection of debug messages used by Babel.", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "babel-messages", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-messages" + }, + "version": "6.23.0" +} diff --git a/socket/node_modules/babel-plugin-syntax-class-properties/.npmignore b/socket/node_modules/babel-plugin-syntax-class-properties/.npmignore new file mode 100644 index 0000000..cace0d6 --- /dev/null +++ b/socket/node_modules/babel-plugin-syntax-class-properties/.npmignore @@ -0,0 +1,3 @@ +node_modules +*.log +src diff --git a/socket/node_modules/babel-plugin-syntax-class-properties/README.md b/socket/node_modules/babel-plugin-syntax-class-properties/README.md new file mode 100644 index 0000000..970049b --- /dev/null +++ b/socket/node_modules/babel-plugin-syntax-class-properties/README.md @@ -0,0 +1,35 @@ +# babel-plugin-syntax-class-properties + +Allow parsing of class properties. + +## Installation + +```sh +$ npm install babel-plugin-syntax-class-properties +``` + +## Usage + +### Via `.babelrc` (Recommended) + +**.babelrc** + +```json +{ + "plugins": ["syntax-class-properties"] +} +``` + +### Via CLI + +```sh +$ babel --plugins syntax-class-properties script.js +``` + +### Via Node API + +```javascript +require("babel-core").transform("code", { + plugins: ["syntax-class-properties"] +}); +``` diff --git a/socket/node_modules/babel-plugin-syntax-class-properties/lib/index.js b/socket/node_modules/babel-plugin-syntax-class-properties/lib/index.js new file mode 100644 index 0000000..cfdfb93 --- /dev/null +++ b/socket/node_modules/babel-plugin-syntax-class-properties/lib/index.js @@ -0,0 +1,13 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function () { + return { + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("classProperties"); + } + }; +}; + +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-plugin-syntax-class-properties/package.json b/socket/node_modules/babel-plugin-syntax-class-properties/package.json new file mode 100644 index 0000000..f193d50 --- /dev/null +++ b/socket/node_modules/babel-plugin-syntax-class-properties/package.json @@ -0,0 +1,41 @@ +{ + "_from": "babel-plugin-syntax-class-properties@^6.8.0", + "_id": "babel-plugin-syntax-class-properties@6.13.0", + "_inBundle": false, + "_integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", + "_location": "/babel-plugin-syntax-class-properties", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "babel-plugin-syntax-class-properties@^6.8.0", + "name": "babel-plugin-syntax-class-properties", + "escapedName": "babel-plugin-syntax-class-properties", + "rawSpec": "^6.8.0", + "saveSpec": null, + "fetchSpec": "^6.8.0" + }, + "_requiredBy": [ + "/babel-plugin-transform-class-properties" + ], + "_resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "_shasum": "d7eb23b79a317f8543962c505b827c7d6cac27de", + "_spec": "babel-plugin-syntax-class-properties@^6.8.0", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-plugin-transform-class-properties", + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Allow parsing of class properties", + "devDependencies": {}, + "keywords": [ + "babel-plugin" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "babel-plugin-syntax-class-properties", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-class-properties" + }, + "version": "6.13.0" +} diff --git a/socket/node_modules/babel-plugin-transform-class-properties/.npmignore b/socket/node_modules/babel-plugin-transform-class-properties/.npmignore new file mode 100644 index 0000000..3185290 --- /dev/null +++ b/socket/node_modules/babel-plugin-transform-class-properties/.npmignore @@ -0,0 +1,4 @@ +node_modules +*.log +src +test diff --git a/socket/node_modules/babel-plugin-transform-class-properties/README.md b/socket/node_modules/babel-plugin-transform-class-properties/README.md new file mode 100644 index 0000000..49f4822 --- /dev/null +++ b/socket/node_modules/babel-plugin-transform-class-properties/README.md @@ -0,0 +1,87 @@ +# babel-plugin-transform-class-properties + +> This plugin transforms es2015 static class properties as well as properties declared with the es2016 property initializer syntax. + +## Example + +Below is a class with four class properties which will be transformed. + +```js + class Bork { + //Property initializer syntax + instanceProperty = "bork"; + boundFunction = () => { + return this.instanceProperty; + } + + //Static class properties + static staticProperty = "babelIsCool"; + static staticFunction = function() { + return Bork.staticProperty; + } + } + + let myBork = new Bork; + + //Property initializers are not on the prototype. + console.log(myBork.prototype.boundFunction); // > undefined + + //Bound functions are bound to the class instance. + console.log(myBork.boundFunction.call(undefined)); // > "bork" + + //Static function exists on the class. + console.log(Bork.staticFunction()); // > "babelIsCool" +``` + + +## Installation + +```sh +npm install --save-dev babel-plugin-transform-class-properties +``` + +## Usage + +### Via `.babelrc` (Recommended) + +**.babelrc** + +```json +// without options +{ + "plugins": ["transform-class-properties"] +} + +// with options +{ + "plugins": [ + ["transform-class-properties", { "spec": true }] + ] +} +``` + +### Via CLI + +```sh +babel --plugins transform-class-properties script.js +``` + +### Via Node API + +```javascript +require("babel-core").transform("code", { + plugins: ["transform-class-properties"] +}); +``` + +## Options + +### `spec` + +`boolean`, defaults to `false`. + +Class properties are compiled to use `Object.defineProperty`. Static fields are now defined even if they are not initialized. + +## References + +* [Proposal: ES Class Fields & Static Properties](https://github.com/jeffmo/es-class-static-properties-and-fields) diff --git a/socket/node_modules/babel-plugin-transform-class-properties/lib/index.js b/socket/node_modules/babel-plugin-transform-class-properties/lib/index.js new file mode 100644 index 0000000..579bc06 --- /dev/null +++ b/socket/node_modules/babel-plugin-transform-class-properties/lib/index.js @@ -0,0 +1,252 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.default = function (_ref) { + var t = _ref.types; + + var findBareSupers = { + Super: function Super(path) { + if (path.parentPath.isCallExpression({ callee: path.node })) { + this.push(path.parentPath); + } + } + }; + + var referenceVisitor = { + ReferencedIdentifier: function ReferencedIdentifier(path) { + if (this.scope.hasOwnBinding(path.node.name)) { + this.collision = true; + path.skip(); + } + } + }; + + var buildObjectDefineProperty = (0, _babelTemplate2.default)("\n Object.defineProperty(REF, KEY, {\n // configurable is false by default\n enumerable: true,\n writable: true,\n value: VALUE\n });\n "); + + var buildClassPropertySpec = function buildClassPropertySpec(ref, _ref2) { + var key = _ref2.key, + value = _ref2.value, + computed = _ref2.computed; + return buildObjectDefineProperty({ + REF: ref, + KEY: t.isIdentifier(key) && !computed ? t.stringLiteral(key.name) : key, + VALUE: value ? value : t.identifier("undefined") + }); + }; + + var buildClassPropertyNonSpec = function buildClassPropertyNonSpec(ref, _ref3) { + var key = _ref3.key, + value = _ref3.value, + computed = _ref3.computed; + return t.expressionStatement(t.assignmentExpression("=", t.memberExpression(ref, key, computed || t.isLiteral(key)), value)); + }; + + return { + inherits: require("babel-plugin-syntax-class-properties"), + + visitor: { + Class: function Class(path, state) { + var buildClassProperty = state.opts.spec ? buildClassPropertySpec : buildClassPropertyNonSpec; + var isDerived = !!path.node.superClass; + var constructor = void 0; + var props = []; + var body = path.get("body"); + + for (var _iterator = body.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref4; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref4 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref4 = _i.value; + } + + var _path = _ref4; + + if (_path.isClassProperty()) { + props.push(_path); + } else if (_path.isClassMethod({ kind: "constructor" })) { + constructor = _path; + } + } + + if (!props.length) return; + + var nodes = []; + var ref = void 0; + + if (path.isClassExpression() || !path.node.id) { + (0, _babelHelperFunctionName2.default)(path); + ref = path.scope.generateUidIdentifier("class"); + } else { + ref = path.node.id; + } + + var instanceBody = []; + + for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref5; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref5 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref5 = _i2.value; + } + + var _prop = _ref5; + + var propNode = _prop.node; + if (propNode.decorators && propNode.decorators.length > 0) continue; + + if (!state.opts.spec && !propNode.value) continue; + + var isStatic = propNode.static; + + if (isStatic) { + nodes.push(buildClassProperty(ref, propNode)); + } else { + if (!propNode.value) continue; + instanceBody.push(buildClassProperty(t.thisExpression(), propNode)); + } + } + + if (instanceBody.length) { + if (!constructor) { + var newConstructor = t.classMethod("constructor", t.identifier("constructor"), [], t.blockStatement([])); + if (isDerived) { + newConstructor.params = [t.restElement(t.identifier("args"))]; + newConstructor.body.body.push(t.returnStatement(t.callExpression(t.super(), [t.spreadElement(t.identifier("args"))]))); + } + + var _body$unshiftContaine = body.unshiftContainer("body", newConstructor); + + constructor = _body$unshiftContaine[0]; + } + + var collisionState = { + collision: false, + scope: constructor.scope + }; + + for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref6; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref6 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref6 = _i3.value; + } + + var prop = _ref6; + + prop.traverse(referenceVisitor, collisionState); + if (collisionState.collision) break; + } + + if (collisionState.collision) { + var initialisePropsRef = path.scope.generateUidIdentifier("initialiseProps"); + + nodes.push(t.variableDeclaration("var", [t.variableDeclarator(initialisePropsRef, t.functionExpression(null, [], t.blockStatement(instanceBody)))])); + + instanceBody = [t.expressionStatement(t.callExpression(t.memberExpression(initialisePropsRef, t.identifier("call")), [t.thisExpression()]))]; + } + + if (isDerived) { + var bareSupers = []; + constructor.traverse(findBareSupers, bareSupers); + for (var _iterator4 = bareSupers, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref7; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref7 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref7 = _i4.value; + } + + var bareSuper = _ref7; + + bareSuper.insertAfter(instanceBody); + } + } else { + constructor.get("body").unshiftContainer("body", instanceBody); + } + } + + for (var _iterator5 = props, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { + var _ref8; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref8 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref8 = _i5.value; + } + + var _prop2 = _ref8; + + _prop2.remove(); + } + + if (!nodes.length) return; + + if (path.isClassExpression()) { + path.scope.push({ id: ref }); + path.replaceWith(t.assignmentExpression("=", ref, path.node)); + } else { + if (!path.node.id) { + path.node.id = ref; + } + + if (path.parentPath.isExportDeclaration()) { + path = path.parentPath; + } + } + + path.insertAfter(nodes); + }, + ArrowFunctionExpression: function ArrowFunctionExpression(path) { + var classExp = path.get("body"); + if (!classExp.isClassExpression()) return; + + var body = classExp.get("body"); + var members = body.get("body"); + if (members.some(function (member) { + return member.isClassProperty(); + })) { + path.ensureBlock(); + } + } + } + }; +}; + +var _babelHelperFunctionName = require("babel-helper-function-name"); + +var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); + +var _babelTemplate = require("babel-template"); + +var _babelTemplate2 = _interopRequireDefault(_babelTemplate); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-plugin-transform-class-properties/package.json b/socket/node_modules/babel-plugin-transform-class-properties/package.json new file mode 100644 index 0000000..d59ec88 --- /dev/null +++ b/socket/node_modules/babel-plugin-transform-class-properties/package.json @@ -0,0 +1,48 @@ +{ + "_from": "babel-plugin-transform-class-properties@^6.24.1", + "_id": "babel-plugin-transform-class-properties@6.24.1", + "_inBundle": false, + "_integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "_location": "/babel-plugin-transform-class-properties", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "babel-plugin-transform-class-properties@^6.24.1", + "name": "babel-plugin-transform-class-properties", + "escapedName": "babel-plugin-transform-class-properties", + "rawSpec": "^6.24.1", + "saveSpec": null, + "fetchSpec": "^6.24.1" + }, + "_requiredBy": [ + "/pillarjs" + ], + "_resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "_shasum": "6a79763ea61d33d36f37b611aa9def81a81b46ac", + "_spec": "babel-plugin-transform-class-properties@^6.24.1", + "_where": "/var/www/htdocs/coze/socket/node_modules/pillarjs", + "bundleDependencies": false, + "dependencies": { + "babel-helper-function-name": "^6.24.1", + "babel-plugin-syntax-class-properties": "^6.8.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + }, + "deprecated": false, + "description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax", + "devDependencies": { + "babel-helper-plugin-test-runner": "^6.24.1" + }, + "keywords": [ + "babel-plugin" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "babel-plugin-transform-class-properties", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-class-properties" + }, + "version": "6.24.1" +} diff --git a/socket/node_modules/babel-runtime/.npmignore b/socket/node_modules/babel-runtime/.npmignore new file mode 100644 index 0000000..3efd5b9 --- /dev/null +++ b/socket/node_modules/babel-runtime/.npmignore @@ -0,0 +1,2 @@ +scripts +node_modules diff --git a/socket/node_modules/babel-runtime/README.md b/socket/node_modules/babel-runtime/README.md new file mode 100644 index 0000000..8aa8593 --- /dev/null +++ b/socket/node_modules/babel-runtime/README.md @@ -0,0 +1,2 @@ +# babel-runtime + diff --git a/socket/node_modules/babel-runtime/core-js.js b/socket/node_modules/babel-runtime/core-js.js new file mode 100644 index 0000000..7d56643 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js.js @@ -0,0 +1,4 @@ +module.exports = { + "default": require("core-js/library"), + __esModule: true +}; diff --git a/socket/node_modules/babel-runtime/core-js/array/concat.js b/socket/node_modules/babel-runtime/core-js/array/concat.js new file mode 100644 index 0000000..f0a5ec7 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/concat.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/concat"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/copy-within.js b/socket/node_modules/babel-runtime/core-js/array/copy-within.js new file mode 100644 index 0000000..e9352ed --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/copy-within.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/copy-within"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/entries.js b/socket/node_modules/babel-runtime/core-js/array/entries.js new file mode 100644 index 0000000..ee8b9e9 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/entries.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/entries"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/every.js b/socket/node_modules/babel-runtime/core-js/array/every.js new file mode 100644 index 0000000..adc9319 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/every.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/every"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/fill.js b/socket/node_modules/babel-runtime/core-js/array/fill.js new file mode 100644 index 0000000..3cc2fe1 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/fill.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/fill"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/filter.js b/socket/node_modules/babel-runtime/core-js/array/filter.js new file mode 100644 index 0000000..f73a5db --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/filter.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/filter"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/find-index.js b/socket/node_modules/babel-runtime/core-js/array/find-index.js new file mode 100644 index 0000000..560caa8 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/find-index.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/find-index"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/find.js b/socket/node_modules/babel-runtime/core-js/array/find.js new file mode 100644 index 0000000..7763993 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/find.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/find"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/for-each.js b/socket/node_modules/babel-runtime/core-js/array/for-each.js new file mode 100644 index 0000000..4808c96 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/for-each.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/for-each"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/from.js b/socket/node_modules/babel-runtime/core-js/array/from.js new file mode 100644 index 0000000..8c92e81 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/from.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/from"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/includes.js b/socket/node_modules/babel-runtime/core-js/array/includes.js new file mode 100644 index 0000000..602d0d8 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/includes.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/includes"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/index-of.js b/socket/node_modules/babel-runtime/core-js/array/index-of.js new file mode 100644 index 0000000..eb4a6ac --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/index-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/index-of"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/join.js b/socket/node_modules/babel-runtime/core-js/array/join.js new file mode 100644 index 0000000..7dc300b --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/join.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/join"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/keys.js b/socket/node_modules/babel-runtime/core-js/array/keys.js new file mode 100644 index 0000000..5008ccb --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/keys"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/last-index-of.js b/socket/node_modules/babel-runtime/core-js/array/last-index-of.js new file mode 100644 index 0000000..ed92a55 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/last-index-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/last-index-of"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/map.js b/socket/node_modules/babel-runtime/core-js/array/map.js new file mode 100644 index 0000000..0f58810 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/map.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/map"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/of.js b/socket/node_modules/babel-runtime/core-js/array/of.js new file mode 100644 index 0000000..d03ab62 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/of"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/pop.js b/socket/node_modules/babel-runtime/core-js/array/pop.js new file mode 100644 index 0000000..9114d2f --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/pop.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/pop"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/push.js b/socket/node_modules/babel-runtime/core-js/array/push.js new file mode 100644 index 0000000..0cd42be --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/push.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/push"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/reduce-right.js b/socket/node_modules/babel-runtime/core-js/array/reduce-right.js new file mode 100644 index 0000000..f56176c --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/reduce-right.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/reduce-right"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/reduce.js b/socket/node_modules/babel-runtime/core-js/array/reduce.js new file mode 100644 index 0000000..c0a2006 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/reduce.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/reduce"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/reverse.js b/socket/node_modules/babel-runtime/core-js/array/reverse.js new file mode 100644 index 0000000..8892c26 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/reverse.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/reverse"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/shift.js b/socket/node_modules/babel-runtime/core-js/array/shift.js new file mode 100644 index 0000000..49e66cd --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/shift.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/shift"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/slice.js b/socket/node_modules/babel-runtime/core-js/array/slice.js new file mode 100644 index 0000000..5f5fe16 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/slice.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/slice"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/some.js b/socket/node_modules/babel-runtime/core-js/array/some.js new file mode 100644 index 0000000..72ca911 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/some.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/some"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/sort.js b/socket/node_modules/babel-runtime/core-js/array/sort.js new file mode 100644 index 0000000..32dece8 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/sort.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/sort"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/splice.js b/socket/node_modules/babel-runtime/core-js/array/splice.js new file mode 100644 index 0000000..6fdebb0 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/splice.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/splice"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/unshift.js b/socket/node_modules/babel-runtime/core-js/array/unshift.js new file mode 100644 index 0000000..3c237a4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/unshift.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/unshift"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/array/values.js b/socket/node_modules/babel-runtime/core-js/array/values.js new file mode 100644 index 0000000..6cc67aa --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/array/values.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/values"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/asap.js b/socket/node_modules/babel-runtime/core-js/asap.js new file mode 100644 index 0000000..a59e4d0 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/asap.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/asap"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/clear-immediate.js b/socket/node_modules/babel-runtime/core-js/clear-immediate.js new file mode 100644 index 0000000..f2090b7 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/clear-immediate.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/clear-immediate"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/error/is-error.js b/socket/node_modules/babel-runtime/core-js/error/is-error.js new file mode 100644 index 0000000..2637546 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/error/is-error.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/error/is-error"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/get-iterator.js b/socket/node_modules/babel-runtime/core-js/get-iterator.js new file mode 100644 index 0000000..8f9943a --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/get-iterator.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/get-iterator"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/is-iterable.js b/socket/node_modules/babel-runtime/core-js/is-iterable.js new file mode 100644 index 0000000..d690ac8 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/is-iterable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/is-iterable"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/json/stringify.js b/socket/node_modules/babel-runtime/core-js/json/stringify.js new file mode 100644 index 0000000..f09e2f9 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/json/stringify.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/json/stringify"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/map.js b/socket/node_modules/babel-runtime/core-js/map.js new file mode 100644 index 0000000..ed02186 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/map.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/map"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/acosh.js b/socket/node_modules/babel-runtime/core-js/math/acosh.js new file mode 100644 index 0000000..37e2202 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/acosh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/acosh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/asinh.js b/socket/node_modules/babel-runtime/core-js/math/asinh.js new file mode 100644 index 0000000..b5147b3 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/asinh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/asinh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/atanh.js b/socket/node_modules/babel-runtime/core-js/math/atanh.js new file mode 100644 index 0000000..ad09bb7 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/atanh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/atanh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/cbrt.js b/socket/node_modules/babel-runtime/core-js/math/cbrt.js new file mode 100644 index 0000000..24a6974 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/cbrt.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/cbrt"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/clz32.js b/socket/node_modules/babel-runtime/core-js/math/clz32.js new file mode 100644 index 0000000..d2218b4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/clz32.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/clz32"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/cosh.js b/socket/node_modules/babel-runtime/core-js/math/cosh.js new file mode 100644 index 0000000..fa9d079 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/cosh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/cosh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/expm1.js b/socket/node_modules/babel-runtime/core-js/math/expm1.js new file mode 100644 index 0000000..860921e --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/expm1.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/expm1"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/fround.js b/socket/node_modules/babel-runtime/core-js/math/fround.js new file mode 100644 index 0000000..b62e43a --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/fround.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/fround"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/hypot.js b/socket/node_modules/babel-runtime/core-js/math/hypot.js new file mode 100644 index 0000000..b07335b --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/hypot.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/hypot"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/iaddh.js b/socket/node_modules/babel-runtime/core-js/math/iaddh.js new file mode 100644 index 0000000..016eb07 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/iaddh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/iaddh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/imul.js b/socket/node_modules/babel-runtime/core-js/math/imul.js new file mode 100644 index 0000000..3bf89e8 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/imul.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/imul"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/imulh.js b/socket/node_modules/babel-runtime/core-js/math/imulh.js new file mode 100644 index 0000000..3fc7d74 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/imulh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/imulh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/isubh.js b/socket/node_modules/babel-runtime/core-js/math/isubh.js new file mode 100644 index 0000000..6b6ea4f --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/isubh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/isubh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/log10.js b/socket/node_modules/babel-runtime/core-js/math/log10.js new file mode 100644 index 0000000..f384512 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/log10.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/log10"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/log1p.js b/socket/node_modules/babel-runtime/core-js/math/log1p.js new file mode 100644 index 0000000..358fc45 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/log1p.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/log1p"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/log2.js b/socket/node_modules/babel-runtime/core-js/math/log2.js new file mode 100644 index 0000000..1cbca00 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/log2.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/log2"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/sign.js b/socket/node_modules/babel-runtime/core-js/math/sign.js new file mode 100644 index 0000000..8d0cfa3 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/sign.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/sign"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/sinh.js b/socket/node_modules/babel-runtime/core-js/math/sinh.js new file mode 100644 index 0000000..81afadd --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/sinh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/sinh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/tanh.js b/socket/node_modules/babel-runtime/core-js/math/tanh.js new file mode 100644 index 0000000..76fad88 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/tanh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/tanh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/trunc.js b/socket/node_modules/babel-runtime/core-js/math/trunc.js new file mode 100644 index 0000000..443a958 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/trunc.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/trunc"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/math/umulh.js b/socket/node_modules/babel-runtime/core-js/math/umulh.js new file mode 100644 index 0000000..357f389 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/math/umulh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/umulh"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/epsilon.js b/socket/node_modules/babel-runtime/core-js/number/epsilon.js new file mode 100644 index 0000000..b5c7862 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/epsilon.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/epsilon"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/is-finite.js b/socket/node_modules/babel-runtime/core-js/number/is-finite.js new file mode 100644 index 0000000..7366242 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/is-finite.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-finite"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/is-integer.js b/socket/node_modules/babel-runtime/core-js/number/is-integer.js new file mode 100644 index 0000000..69b9bb7 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/is-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-integer"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/is-nan.js b/socket/node_modules/babel-runtime/core-js/number/is-nan.js new file mode 100644 index 0000000..5402a71 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/is-nan.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-nan"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/is-safe-integer.js b/socket/node_modules/babel-runtime/core-js/number/is-safe-integer.js new file mode 100644 index 0000000..2d72dd4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/is-safe-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/max-safe-integer.js b/socket/node_modules/babel-runtime/core-js/number/max-safe-integer.js new file mode 100644 index 0000000..9b55c84 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/max-safe-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/max-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/min-safe-integer.js b/socket/node_modules/babel-runtime/core-js/number/min-safe-integer.js new file mode 100644 index 0000000..b5e9785 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/min-safe-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/min-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/parse-float.js b/socket/node_modules/babel-runtime/core-js/number/parse-float.js new file mode 100644 index 0000000..0e0f0bc --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/parse-float.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/parse-float"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/number/parse-int.js b/socket/node_modules/babel-runtime/core-js/number/parse-int.js new file mode 100644 index 0000000..6d454ea --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/number/parse-int.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/parse-int"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/assign.js b/socket/node_modules/babel-runtime/core-js/object/assign.js new file mode 100644 index 0000000..ca48f0c --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/assign.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/assign"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/create.js b/socket/node_modules/babel-runtime/core-js/object/create.js new file mode 100644 index 0000000..130165c --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/create.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/create"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/define-properties.js b/socket/node_modules/babel-runtime/core-js/object/define-properties.js new file mode 100644 index 0000000..d39e153 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/define-properties.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/define-properties"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/define-property.js b/socket/node_modules/babel-runtime/core-js/object/define-property.js new file mode 100644 index 0000000..f41735b --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/define-property.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/define-property"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/entries.js b/socket/node_modules/babel-runtime/core-js/object/entries.js new file mode 100644 index 0000000..32ed7a5 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/entries.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/entries"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/freeze.js b/socket/node_modules/babel-runtime/core-js/object/freeze.js new file mode 100644 index 0000000..8cc278b --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/freeze.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/freeze"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js b/socket/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js new file mode 100644 index 0000000..8e9296e --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js b/socket/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js new file mode 100644 index 0000000..23200d2 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptors"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/get-own-property-names.js b/socket/node_modules/babel-runtime/core-js/object/get-own-property-names.js new file mode 100644 index 0000000..7b95445 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/get-own-property-names.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-names"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js b/socket/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js new file mode 100644 index 0000000..c2fc78f --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-symbols"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/get-prototype-of.js b/socket/node_modules/babel-runtime/core-js/object/get-prototype-of.js new file mode 100644 index 0000000..47d3f72 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/get-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/is-extensible.js b/socket/node_modules/babel-runtime/core-js/object/is-extensible.js new file mode 100644 index 0000000..51175ad --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/is-extensible.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/is-frozen.js b/socket/node_modules/babel-runtime/core-js/object/is-frozen.js new file mode 100644 index 0000000..e8ab5f1 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/is-frozen.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is-frozen"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/is-sealed.js b/socket/node_modules/babel-runtime/core-js/object/is-sealed.js new file mode 100644 index 0000000..77beda4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/is-sealed.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is-sealed"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/is.js b/socket/node_modules/babel-runtime/core-js/object/is.js new file mode 100644 index 0000000..6524704 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/is.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/keys.js b/socket/node_modules/babel-runtime/core-js/object/keys.js new file mode 100644 index 0000000..04a3f01 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/keys"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/prevent-extensions.js b/socket/node_modules/babel-runtime/core-js/object/prevent-extensions.js new file mode 100644 index 0000000..3d4305f --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/prevent-extensions.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/seal.js b/socket/node_modules/babel-runtime/core-js/object/seal.js new file mode 100644 index 0000000..c969cab --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/seal.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/seal"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/set-prototype-of.js b/socket/node_modules/babel-runtime/core-js/object/set-prototype-of.js new file mode 100644 index 0000000..63b1435 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/set-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/object/values.js b/socket/node_modules/babel-runtime/core-js/object/values.js new file mode 100644 index 0000000..c587097 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/object/values.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/values"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/observable.js b/socket/node_modules/babel-runtime/core-js/observable.js new file mode 100644 index 0000000..04ca51e --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/observable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/observable"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/promise.js b/socket/node_modules/babel-runtime/core-js/promise.js new file mode 100644 index 0000000..0cb9a23 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/promise.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/promise"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/apply.js b/socket/node_modules/babel-runtime/core-js/reflect/apply.js new file mode 100644 index 0000000..cc578d4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/apply.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/apply"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/construct.js b/socket/node_modules/babel-runtime/core-js/reflect/construct.js new file mode 100644 index 0000000..a2d991a --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/construct.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/construct"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/define-metadata.js b/socket/node_modules/babel-runtime/core-js/reflect/define-metadata.js new file mode 100644 index 0000000..1ba7d4a --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/define-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/define-metadata"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/define-property.js b/socket/node_modules/babel-runtime/core-js/reflect/define-property.js new file mode 100644 index 0000000..aee1c3a --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/define-property.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/define-property"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/delete-metadata.js b/socket/node_modules/babel-runtime/core-js/reflect/delete-metadata.js new file mode 100644 index 0000000..3396c42 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/delete-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/delete-metadata"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/delete-property.js b/socket/node_modules/babel-runtime/core-js/reflect/delete-property.js new file mode 100644 index 0000000..efa76ab --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/delete-property.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/delete-property"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/enumerate.js b/socket/node_modules/babel-runtime/core-js/reflect/enumerate.js new file mode 100644 index 0000000..041484b --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/enumerate.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/enumerate"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js b/socket/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js new file mode 100644 index 0000000..722e099 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/get-metadata.js b/socket/node_modules/babel-runtime/core-js/reflect/get-metadata.js new file mode 100644 index 0000000..d725525 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/get-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-metadata"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js b/socket/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js new file mode 100644 index 0000000..feff3a6 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js b/socket/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js new file mode 100644 index 0000000..1f8bd56 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js b/socket/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js new file mode 100644 index 0000000..67a50f5 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js b/socket/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js new file mode 100644 index 0000000..d3c8d4e --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/get.js b/socket/node_modules/babel-runtime/core-js/reflect/get.js new file mode 100644 index 0000000..a42e4fb --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/get.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/has-metadata.js b/socket/node_modules/babel-runtime/core-js/reflect/has-metadata.js new file mode 100644 index 0000000..c1051a3 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/has-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/has-metadata"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js b/socket/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js new file mode 100644 index 0000000..1cefbf7 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/has-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/has.js b/socket/node_modules/babel-runtime/core-js/reflect/has.js new file mode 100644 index 0000000..e2a9665 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/has.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/has"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/is-extensible.js b/socket/node_modules/babel-runtime/core-js/reflect/is-extensible.js new file mode 100644 index 0000000..b0de7bf --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/is-extensible.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/metadata.js b/socket/node_modules/babel-runtime/core-js/reflect/metadata.js new file mode 100644 index 0000000..cb85fde --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/metadata"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/own-keys.js b/socket/node_modules/babel-runtime/core-js/reflect/own-keys.js new file mode 100644 index 0000000..d98fed2 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/own-keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/own-keys"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js b/socket/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js new file mode 100644 index 0000000..5408d89 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js b/socket/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js new file mode 100644 index 0000000..5433e2e --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/reflect/set.js b/socket/node_modules/babel-runtime/core-js/reflect/set.js new file mode 100644 index 0000000..657bddc --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/reflect/set.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/set"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/regexp/escape.js b/socket/node_modules/babel-runtime/core-js/regexp/escape.js new file mode 100644 index 0000000..12a25c3 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/regexp/escape.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/regexp/escape"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/set-immediate.js b/socket/node_modules/babel-runtime/core-js/set-immediate.js new file mode 100644 index 0000000..fc42eb4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/set-immediate.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/set-immediate"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/set.js b/socket/node_modules/babel-runtime/core-js/set.js new file mode 100644 index 0000000..22c14d4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/set.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/set"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/at.js b/socket/node_modules/babel-runtime/core-js/string/at.js new file mode 100644 index 0000000..1c4b595 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/at.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/at"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/code-point-at.js b/socket/node_modules/babel-runtime/core-js/string/code-point-at.js new file mode 100644 index 0000000..4332bdb --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/code-point-at.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/code-point-at"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/ends-with.js b/socket/node_modules/babel-runtime/core-js/string/ends-with.js new file mode 100644 index 0000000..ad3b55a --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/ends-with.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/ends-with"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/from-code-point.js b/socket/node_modules/babel-runtime/core-js/string/from-code-point.js new file mode 100644 index 0000000..8c10782 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/from-code-point.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/from-code-point"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/includes.js b/socket/node_modules/babel-runtime/core-js/string/includes.js new file mode 100644 index 0000000..f7de270 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/includes.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/includes"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/match-all.js b/socket/node_modules/babel-runtime/core-js/string/match-all.js new file mode 100644 index 0000000..813855c --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/match-all.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/match-all"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/pad-end.js b/socket/node_modules/babel-runtime/core-js/string/pad-end.js new file mode 100644 index 0000000..5ff9814 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/pad-end.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/pad-left.js b/socket/node_modules/babel-runtime/core-js/string/pad-left.js new file mode 100644 index 0000000..ee67e70 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/pad-left.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/pad-right.js b/socket/node_modules/babel-runtime/core-js/string/pad-right.js new file mode 100644 index 0000000..5ff9814 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/pad-right.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/pad-start.js b/socket/node_modules/babel-runtime/core-js/string/pad-start.js new file mode 100644 index 0000000..ee67e70 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/pad-start.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/raw.js b/socket/node_modules/babel-runtime/core-js/string/raw.js new file mode 100644 index 0000000..05c92dc --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/raw.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/raw"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/repeat.js b/socket/node_modules/babel-runtime/core-js/string/repeat.js new file mode 100644 index 0000000..816ef2e --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/repeat.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/repeat"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/starts-with.js b/socket/node_modules/babel-runtime/core-js/string/starts-with.js new file mode 100644 index 0000000..5d74716 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/starts-with.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/starts-with"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/trim-end.js b/socket/node_modules/babel-runtime/core-js/string/trim-end.js new file mode 100644 index 0000000..7c426f5 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/trim-end.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-end"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/trim-left.js b/socket/node_modules/babel-runtime/core-js/string/trim-left.js new file mode 100644 index 0000000..b8a7e1e --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/trim-left.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-left"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/trim-right.js b/socket/node_modules/babel-runtime/core-js/string/trim-right.js new file mode 100644 index 0000000..ba3ca74 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/trim-right.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-right"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/trim-start.js b/socket/node_modules/babel-runtime/core-js/string/trim-start.js new file mode 100644 index 0000000..f1f035a --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/trim-start.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-start"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/string/trim.js b/socket/node_modules/babel-runtime/core-js/string/trim.js new file mode 100644 index 0000000..7d51cf0 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/string/trim.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol.js b/socket/node_modules/babel-runtime/core-js/symbol.js new file mode 100644 index 0000000..9aa95a0 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/async-iterator.js b/socket/node_modules/babel-runtime/core-js/symbol/async-iterator.js new file mode 100644 index 0000000..9dd3a57 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/async-iterator.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/async-iterator"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/for.js b/socket/node_modules/babel-runtime/core-js/symbol/for.js new file mode 100644 index 0000000..de7424f --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/for.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/for"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/has-instance.js b/socket/node_modules/babel-runtime/core-js/symbol/has-instance.js new file mode 100644 index 0000000..f771180 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/has-instance.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/has-instance"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js b/socket/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js new file mode 100644 index 0000000..0bc7f03 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/is-concat-spreadable"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/iterator.js b/socket/node_modules/babel-runtime/core-js/symbol/iterator.js new file mode 100644 index 0000000..3f9a0fb --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/iterator.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/iterator"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/key-for.js b/socket/node_modules/babel-runtime/core-js/symbol/key-for.js new file mode 100644 index 0000000..15a6cfb --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/key-for.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/key-for"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/match.js b/socket/node_modules/babel-runtime/core-js/symbol/match.js new file mode 100644 index 0000000..ed64810 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/match.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/match"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/observable.js b/socket/node_modules/babel-runtime/core-js/symbol/observable.js new file mode 100644 index 0000000..876f9c0 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/observable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/observable"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/replace.js b/socket/node_modules/babel-runtime/core-js/symbol/replace.js new file mode 100644 index 0000000..35f900b --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/replace.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/replace"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/search.js b/socket/node_modules/babel-runtime/core-js/symbol/search.js new file mode 100644 index 0000000..4b81d31 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/search.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/search"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/species.js b/socket/node_modules/babel-runtime/core-js/symbol/species.js new file mode 100644 index 0000000..4481321 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/species.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/species"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/split.js b/socket/node_modules/babel-runtime/core-js/symbol/split.js new file mode 100644 index 0000000..1f5795c --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/split.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/split"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/to-primitive.js b/socket/node_modules/babel-runtime/core-js/symbol/to-primitive.js new file mode 100644 index 0000000..b7f9e04 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/to-primitive.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/to-primitive"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/to-string-tag.js b/socket/node_modules/babel-runtime/core-js/symbol/to-string-tag.js new file mode 100644 index 0000000..d9e4e4d --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/to-string-tag.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/to-string-tag"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/symbol/unscopables.js b/socket/node_modules/babel-runtime/core-js/symbol/unscopables.js new file mode 100644 index 0000000..cd3dac0 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/symbol/unscopables.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/unscopables"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/system/global.js b/socket/node_modules/babel-runtime/core-js/system/global.js new file mode 100644 index 0000000..c442f17 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/system/global.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/system/global"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/weak-map.js b/socket/node_modules/babel-runtime/core-js/weak-map.js new file mode 100644 index 0000000..de130d4 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/weak-map.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/weak-map"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/core-js/weak-set.js b/socket/node_modules/babel-runtime/core-js/weak-set.js new file mode 100644 index 0000000..b96cb97 --- /dev/null +++ b/socket/node_modules/babel-runtime/core-js/weak-set.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/weak-set"), __esModule: true }; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_async-generator-delegate.js b/socket/node_modules/babel-runtime/helpers/_async-generator-delegate.js new file mode 100644 index 0000000..c1debb4 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_async-generator-delegate.js @@ -0,0 +1 @@ +module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_async-generator.js b/socket/node_modules/babel-runtime/helpers/_async-generator.js new file mode 100644 index 0000000..ee87351 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_async-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_async-iterator.js b/socket/node_modules/babel-runtime/helpers/_async-iterator.js new file mode 100644 index 0000000..c014bbb --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_async-iterator.js @@ -0,0 +1 @@ +module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_async-to-generator.js b/socket/node_modules/babel-runtime/helpers/_async-to-generator.js new file mode 100644 index 0000000..5f81e90 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_async-to-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_class-call-check.js b/socket/node_modules/babel-runtime/helpers/_class-call-check.js new file mode 100644 index 0000000..d4514f0 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_class-call-check.js @@ -0,0 +1 @@ +module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_create-class.js b/socket/node_modules/babel-runtime/helpers/_create-class.js new file mode 100644 index 0000000..2699d23 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_create-class.js @@ -0,0 +1 @@ +module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_defaults.js b/socket/node_modules/babel-runtime/helpers/_defaults.js new file mode 100644 index 0000000..a4274f5 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_defaults.js @@ -0,0 +1 @@ +module.exports = require("./defaults.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_define-enumerable-properties.js b/socket/node_modules/babel-runtime/helpers/_define-enumerable-properties.js new file mode 100644 index 0000000..c60bbfc --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_define-enumerable-properties.js @@ -0,0 +1 @@ +module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_define-property.js b/socket/node_modules/babel-runtime/helpers/_define-property.js new file mode 100644 index 0000000..a265eab --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_define-property.js @@ -0,0 +1 @@ +module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_extends.js b/socket/node_modules/babel-runtime/helpers/_extends.js new file mode 100644 index 0000000..2ecdb0e --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_extends.js @@ -0,0 +1 @@ +module.exports = require("./extends.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_get.js b/socket/node_modules/babel-runtime/helpers/_get.js new file mode 100644 index 0000000..39aa387 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_get.js @@ -0,0 +1 @@ +module.exports = require("./get.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_inherits.js b/socket/node_modules/babel-runtime/helpers/_inherits.js new file mode 100644 index 0000000..29deff3 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_inherits.js @@ -0,0 +1 @@ +module.exports = require("./inherits.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_instanceof.js b/socket/node_modules/babel-runtime/helpers/_instanceof.js new file mode 100644 index 0000000..4c61213 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_instanceof.js @@ -0,0 +1 @@ +module.exports = require("./instanceof.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_interop-require-default.js b/socket/node_modules/babel-runtime/helpers/_interop-require-default.js new file mode 100644 index 0000000..10edad2 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_interop-require-default.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_interop-require-wildcard.js b/socket/node_modules/babel-runtime/helpers/_interop-require-wildcard.js new file mode 100644 index 0000000..ae19e01 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_interop-require-wildcard.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_jsx.js b/socket/node_modules/babel-runtime/helpers/_jsx.js new file mode 100644 index 0000000..f21ab91 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_jsx.js @@ -0,0 +1 @@ +module.exports = require("./jsx.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_new-arrow-check.js b/socket/node_modules/babel-runtime/helpers/_new-arrow-check.js new file mode 100644 index 0000000..6325419 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_new-arrow-check.js @@ -0,0 +1 @@ +module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_object-destructuring-empty.js b/socket/node_modules/babel-runtime/helpers/_object-destructuring-empty.js new file mode 100644 index 0000000..9c6ffef --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_object-destructuring-empty.js @@ -0,0 +1 @@ +module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_object-without-properties.js b/socket/node_modules/babel-runtime/helpers/_object-without-properties.js new file mode 100644 index 0000000..052b207 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_object-without-properties.js @@ -0,0 +1 @@ +module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_possible-constructor-return.js b/socket/node_modules/babel-runtime/helpers/_possible-constructor-return.js new file mode 100644 index 0000000..09018d7 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_possible-constructor-return.js @@ -0,0 +1 @@ +module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_self-global.js b/socket/node_modules/babel-runtime/helpers/_self-global.js new file mode 100644 index 0000000..c3d45f3 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_self-global.js @@ -0,0 +1 @@ +module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_set.js b/socket/node_modules/babel-runtime/helpers/_set.js new file mode 100644 index 0000000..e4dd5ea --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_set.js @@ -0,0 +1 @@ +module.exports = require("./set.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js b/socket/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js new file mode 100644 index 0000000..8bb56d3 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_sliced-to-array.js b/socket/node_modules/babel-runtime/helpers/_sliced-to-array.js new file mode 100644 index 0000000..28d7fd8 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_sliced-to-array.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js b/socket/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js new file mode 100644 index 0000000..8ffa3f7 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_tagged-template-literal.js b/socket/node_modules/babel-runtime/helpers/_tagged-template-literal.js new file mode 100644 index 0000000..160a917 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_tagged-template-literal.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_temporal-ref.js b/socket/node_modules/babel-runtime/helpers/_temporal-ref.js new file mode 100644 index 0000000..cf2e4e4 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_temporal-ref.js @@ -0,0 +1 @@ +module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_temporal-undefined.js b/socket/node_modules/babel-runtime/helpers/_temporal-undefined.js new file mode 100644 index 0000000..234fc33 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_temporal-undefined.js @@ -0,0 +1 @@ +module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_to-array.js b/socket/node_modules/babel-runtime/helpers/_to-array.js new file mode 100644 index 0000000..d89ee39 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_to-array.js @@ -0,0 +1 @@ +module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_to-consumable-array.js b/socket/node_modules/babel-runtime/helpers/_to-consumable-array.js new file mode 100644 index 0000000..0aad718 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_to-consumable-array.js @@ -0,0 +1 @@ +module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/_typeof.js b/socket/node_modules/babel-runtime/helpers/_typeof.js new file mode 100644 index 0000000..14fd11c --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/_typeof.js @@ -0,0 +1 @@ +module.exports = require("./typeof.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/async-generator-delegate.js b/socket/node_modules/babel-runtime/helpers/async-generator-delegate.js new file mode 100644 index 0000000..c1debb4 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/async-generator-delegate.js @@ -0,0 +1 @@ +module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/async-generator.js b/socket/node_modules/babel-runtime/helpers/async-generator.js new file mode 100644 index 0000000..ee87351 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/async-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/async-iterator.js b/socket/node_modules/babel-runtime/helpers/async-iterator.js new file mode 100644 index 0000000..c014bbb --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/async-iterator.js @@ -0,0 +1 @@ +module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/async-to-generator.js b/socket/node_modules/babel-runtime/helpers/async-to-generator.js new file mode 100644 index 0000000..5f81e90 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/async-to-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/asyncGenerator.js b/socket/node_modules/babel-runtime/helpers/asyncGenerator.js new file mode 100644 index 0000000..d3032e7 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/asyncGenerator.js @@ -0,0 +1,126 @@ +"use strict"; + +exports.__esModule = true; + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _promise = require("../core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function AwaitValue(value) { + this.value = value; + } + + function AsyncGenerator(gen) { + var front, back; + + function send(key, arg) { + return new _promise2.default(function (resolve, reject) { + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null + }; + + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + + if (value instanceof AwaitValue) { + _promise2.default.resolve(value.value).then(function (arg) { + resume("next", arg); + }, function (arg) { + resume("throw", arg); + }); + } else { + settle(result.done ? "return" : "normal", result.value); + } + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ + value: value, + done: true + }); + break; + + case "throw": + front.reject(value); + break; + + default: + front.resolve({ + value: value, + done: false + }); + break; + } + + front = front.next; + + if (front) { + resume(front.key, front.arg); + } else { + back = null; + } + } + + this._invoke = send; + + if (typeof gen.return !== "function") { + this.return = undefined; + } + } + + if (typeof _symbol2.default === "function" && _symbol2.default.asyncIterator) { + AsyncGenerator.prototype[_symbol2.default.asyncIterator] = function () { + return this; + }; + } + + AsyncGenerator.prototype.next = function (arg) { + return this._invoke("next", arg); + }; + + AsyncGenerator.prototype.throw = function (arg) { + return this._invoke("throw", arg); + }; + + AsyncGenerator.prototype.return = function (arg) { + return this._invoke("return", arg); + }; + + return { + wrap: function wrap(fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; + }, + await: function _await(value) { + return new AwaitValue(value); + } + }; +}(); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js b/socket/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js new file mode 100644 index 0000000..5fcc123 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js @@ -0,0 +1,69 @@ +"use strict"; + +exports.__esModule = true; + +var _iterator = require("../core-js/symbol/iterator"); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _promise = require("../core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (inner, awaitWrap) { + var iter = {}, + waiting = false; + + function pump(key, value) { + waiting = true; + value = new _promise2.default(function (resolve) { + resolve(inner[key](value)); + }); + return { + done: false, + value: awaitWrap(value) + }; + } + + ; + + if (typeof _symbol2.default === "function" && _iterator2.default) { + iter[_iterator2.default] = function () { + return this; + }; + } + + iter.next = function (value) { + if (waiting) { + waiting = false; + return value; + } + + return pump("next", value); + }; + + if (typeof inner.throw === "function") { + iter.throw = function (value) { + if (waiting) { + waiting = false; + throw value; + } + + return pump("throw", value); + }; + } + + if (typeof inner.return === "function") { + iter.return = function (value) { + return pump("return", value); + }; + } + + return iter; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/asyncIterator.js b/socket/node_modules/babel-runtime/helpers/asyncIterator.js new file mode 100644 index 0000000..b542b6c --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/asyncIterator.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("../core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _iterator = require("../core-js/symbol/iterator"); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (iterable) { + if (typeof _symbol2.default === "function") { + if (_symbol2.default.asyncIterator) { + var method = iterable[_symbol2.default.asyncIterator]; + if (method != null) return method.call(iterable); + } + + if (_iterator2.default) { + return (0, _getIterator3.default)(iterable); + } + } + + throw new TypeError("Object is not async iterable"); +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/asyncToGenerator.js b/socket/node_modules/babel-runtime/helpers/asyncToGenerator.js new file mode 100644 index 0000000..50be669 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/asyncToGenerator.js @@ -0,0 +1,38 @@ +"use strict"; + +exports.__esModule = true; + +var _promise = require("../core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/class-call-check.js b/socket/node_modules/babel-runtime/helpers/class-call-check.js new file mode 100644 index 0000000..d4514f0 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/class-call-check.js @@ -0,0 +1 @@ +module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/classCallCheck.js b/socket/node_modules/babel-runtime/helpers/classCallCheck.js new file mode 100644 index 0000000..63d6d8f --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/classCallCheck.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/create-class.js b/socket/node_modules/babel-runtime/helpers/create-class.js new file mode 100644 index 0000000..2699d23 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/create-class.js @@ -0,0 +1 @@ +module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/createClass.js b/socket/node_modules/babel-runtime/helpers/createClass.js new file mode 100644 index 0000000..bee484d --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/createClass.js @@ -0,0 +1,27 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/defaults.js b/socket/node_modules/babel-runtime/helpers/defaults.js new file mode 100644 index 0000000..9a721ce --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/defaults.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +var _getOwnPropertyNames = require("../core-js/object/get-own-property-names"); + +var _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, defaults) { + var keys = (0, _getOwnPropertyNames2.default)(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = (0, _getOwnPropertyDescriptor2.default)(defaults, key); + + if (value && value.configurable && obj[key] === undefined) { + (0, _defineProperty2.default)(obj, key, value); + } + } + + return obj; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/define-enumerable-properties.js b/socket/node_modules/babel-runtime/helpers/define-enumerable-properties.js new file mode 100644 index 0000000..c60bbfc --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/define-enumerable-properties.js @@ -0,0 +1 @@ +module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/define-property.js b/socket/node_modules/babel-runtime/helpers/define-property.js new file mode 100644 index 0000000..a265eab --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/define-property.js @@ -0,0 +1 @@ +module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/defineEnumerableProperties.js b/socket/node_modules/babel-runtime/helpers/defineEnumerableProperties.js new file mode 100644 index 0000000..503a1ab --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/defineEnumerableProperties.js @@ -0,0 +1,20 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + (0, _defineProperty2.default)(obj, key, desc); + } + + return obj; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/defineProperty.js b/socket/node_modules/babel-runtime/helpers/defineProperty.js new file mode 100644 index 0000000..b0f46d8 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/defineProperty.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/extends.js b/socket/node_modules/babel-runtime/helpers/extends.js new file mode 100644 index 0000000..976aef1 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/extends.js @@ -0,0 +1,23 @@ +"use strict"; + +exports.__esModule = true; + +var _assign = require("../core-js/object/assign"); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/get.js b/socket/node_modules/babel-runtime/helpers/get.js new file mode 100644 index 0000000..38b79b7 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/get.js @@ -0,0 +1,38 @@ +"use strict"; + +exports.__esModule = true; + +var _getPrototypeOf = require("../core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); + + if (desc === undefined) { + var parent = (0, _getPrototypeOf2.default)(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/inherits.js b/socket/node_modules/babel-runtime/helpers/inherits.js new file mode 100644 index 0000000..ae8a92d --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/inherits.js @@ -0,0 +1,33 @@ +"use strict"; + +exports.__esModule = true; + +var _setPrototypeOf = require("../core-js/object/set-prototype-of"); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = require("../core-js/object/create"); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = require("../helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/instanceof.js b/socket/node_modules/babel-runtime/helpers/instanceof.js new file mode 100644 index 0000000..f2d90ec --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/instanceof.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _hasInstance = require("../core-js/symbol/has-instance"); + +var _hasInstance2 = _interopRequireDefault(_hasInstance); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (left, right) { + if (right != null && typeof _symbol2.default !== "undefined" && right[_hasInstance2.default]) { + return right[_hasInstance2.default](left); + } else { + return left instanceof right; + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/interop-require-default.js b/socket/node_modules/babel-runtime/helpers/interop-require-default.js new file mode 100644 index 0000000..10edad2 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/interop-require-default.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/interop-require-wildcard.js b/socket/node_modules/babel-runtime/helpers/interop-require-wildcard.js new file mode 100644 index 0000000..ae19e01 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/interop-require-wildcard.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/interopRequireDefault.js b/socket/node_modules/babel-runtime/helpers/interopRequireDefault.js new file mode 100644 index 0000000..df808f6 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/interopRequireDefault.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/interopRequireWildcard.js b/socket/node_modules/babel-runtime/helpers/interopRequireWildcard.js new file mode 100644 index 0000000..d95b6ac --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/interopRequireWildcard.js @@ -0,0 +1,20 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj.default = obj; + return newObj; + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/jsx.js b/socket/node_modules/babel-runtime/helpers/jsx.js new file mode 100644 index 0000000..b2164d0 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/jsx.js @@ -0,0 +1,56 @@ +"use strict"; + +exports.__esModule = true; + +var _for = require("../core-js/symbol/for"); + +var _for2 = _interopRequireDefault(_for); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + var REACT_ELEMENT_TYPE = typeof _symbol2.default === "function" && _for2.default && (0, _for2.default)("react.element") || 0xeac7; + return function createRawReactElement(type, props, key, children) { + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) { + props = {}; + } + + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } else if (!props) { + props = defaultProps || {}; + } + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 3]; + } + + props.children = childArray; + } + + return { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key === undefined ? null : '' + key, + ref: null, + props: props, + _owner: null + }; + }; +}(); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/new-arrow-check.js b/socket/node_modules/babel-runtime/helpers/new-arrow-check.js new file mode 100644 index 0000000..6325419 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/new-arrow-check.js @@ -0,0 +1 @@ +module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/newArrowCheck.js b/socket/node_modules/babel-runtime/helpers/newArrowCheck.js new file mode 100644 index 0000000..c15ee5c --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/newArrowCheck.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (innerThis, boundThis) { + if (innerThis !== boundThis) { + throw new TypeError("Cannot instantiate an arrow function"); + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/object-destructuring-empty.js b/socket/node_modules/babel-runtime/helpers/object-destructuring-empty.js new file mode 100644 index 0000000..9c6ffef --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/object-destructuring-empty.js @@ -0,0 +1 @@ +module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/object-without-properties.js b/socket/node_modules/babel-runtime/helpers/object-without-properties.js new file mode 100644 index 0000000..052b207 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/object-without-properties.js @@ -0,0 +1 @@ +module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js b/socket/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js new file mode 100644 index 0000000..e2651c1 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js @@ -0,0 +1,7 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj) { + if (obj == null) throw new TypeError("Cannot destructure undefined"); +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/objectWithoutProperties.js b/socket/node_modules/babel-runtime/helpers/objectWithoutProperties.js new file mode 100644 index 0000000..e9f07e6 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/objectWithoutProperties.js @@ -0,0 +1,15 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/possible-constructor-return.js b/socket/node_modules/babel-runtime/helpers/possible-constructor-return.js new file mode 100644 index 0000000..09018d7 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/possible-constructor-return.js @@ -0,0 +1 @@ +module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/possibleConstructorReturn.js b/socket/node_modules/babel-runtime/helpers/possibleConstructorReturn.js new file mode 100644 index 0000000..957f425 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/possibleConstructorReturn.js @@ -0,0 +1,17 @@ +"use strict"; + +exports.__esModule = true; + +var _typeof2 = require("../helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/self-global.js b/socket/node_modules/babel-runtime/helpers/self-global.js new file mode 100644 index 0000000..c3d45f3 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/self-global.js @@ -0,0 +1 @@ +module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/selfGlobal.js b/socket/node_modules/babel-runtime/helpers/selfGlobal.js new file mode 100644 index 0000000..378beb8 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/selfGlobal.js @@ -0,0 +1,4 @@ +"use strict"; + +exports.__esModule = true; +exports.default = typeof global === "undefined" ? self : global; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/set.js b/socket/node_modules/babel-runtime/helpers/set.js new file mode 100644 index 0000000..8780efb --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/set.js @@ -0,0 +1,35 @@ +"use strict"; + +exports.__esModule = true; + +var _getPrototypeOf = require("../core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function set(object, property, value, receiver) { + var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); + + if (desc === undefined) { + var parent = (0, _getPrototypeOf2.default)(object); + + if (parent !== null) { + set(parent, property, value, receiver); + } + } else if ("value" in desc && desc.writable) { + desc.value = value; + } else { + var setter = desc.set; + + if (setter !== undefined) { + setter.call(receiver, value); + } + } + + return value; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/sliced-to-array-loose.js b/socket/node_modules/babel-runtime/helpers/sliced-to-array-loose.js new file mode 100644 index 0000000..8bb56d3 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/sliced-to-array-loose.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/sliced-to-array.js b/socket/node_modules/babel-runtime/helpers/sliced-to-array.js new file mode 100644 index 0000000..28d7fd8 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/sliced-to-array.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/slicedToArray.js b/socket/node_modules/babel-runtime/helpers/slicedToArray.js new file mode 100644 index 0000000..de11512 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/slicedToArray.js @@ -0,0 +1,51 @@ +"use strict"; + +exports.__esModule = true; + +var _isIterable2 = require("../core-js/is-iterable"); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = require("../core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/slicedToArrayLoose.js b/socket/node_modules/babel-runtime/helpers/slicedToArrayLoose.js new file mode 100644 index 0000000..012bbd8 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/slicedToArrayLoose.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("../core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _isIterable2 = require("../core-js/is-iterable"); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + var _arr = []; + + for (var _iterator = (0, _getIterator3.default)(arr), _step; !(_step = _iterator.next()).done;) { + _arr.push(_step.value); + + if (i && _arr.length === i) break; + } + + return _arr; + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js b/socket/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js new file mode 100644 index 0000000..8ffa3f7 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/tagged-template-literal.js b/socket/node_modules/babel-runtime/helpers/tagged-template-literal.js new file mode 100644 index 0000000..160a917 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/tagged-template-literal.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js b/socket/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js new file mode 100644 index 0000000..060dcf9 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperties = require("../core-js/object/define-properties"); + +var _defineProperties2 = _interopRequireDefault(_defineProperties); + +var _freeze = require("../core-js/object/freeze"); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (strings, raw) { + return (0, _freeze2.default)((0, _defineProperties2.default)(strings, { + raw: { + value: (0, _freeze2.default)(raw) + } + })); +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js b/socket/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js new file mode 100644 index 0000000..76c4930 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js @@ -0,0 +1,8 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (strings, raw) { + strings.raw = raw; + return strings; +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/temporal-ref.js b/socket/node_modules/babel-runtime/helpers/temporal-ref.js new file mode 100644 index 0000000..cf2e4e4 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/temporal-ref.js @@ -0,0 +1 @@ +module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/temporal-undefined.js b/socket/node_modules/babel-runtime/helpers/temporal-undefined.js new file mode 100644 index 0000000..234fc33 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/temporal-undefined.js @@ -0,0 +1 @@ +module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/temporalRef.js b/socket/node_modules/babel-runtime/helpers/temporalRef.js new file mode 100644 index 0000000..49b8b24 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/temporalRef.js @@ -0,0 +1,11 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (val, name, undef) { + if (val === undef) { + throw new ReferenceError(name + " is not defined - temporal dead zone"); + } else { + return val; + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/temporalUndefined.js b/socket/node_modules/babel-runtime/helpers/temporalUndefined.js new file mode 100644 index 0000000..4066de1 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/temporalUndefined.js @@ -0,0 +1,4 @@ +"use strict"; + +exports.__esModule = true; +exports.default = {}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/to-array.js b/socket/node_modules/babel-runtime/helpers/to-array.js new file mode 100644 index 0000000..d89ee39 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/to-array.js @@ -0,0 +1 @@ +module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/to-consumable-array.js b/socket/node_modules/babel-runtime/helpers/to-consumable-array.js new file mode 100644 index 0000000..0aad718 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/to-consumable-array.js @@ -0,0 +1 @@ +module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/toArray.js b/socket/node_modules/babel-runtime/helpers/toArray.js new file mode 100644 index 0000000..8601a44 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/toArray.js @@ -0,0 +1,13 @@ +"use strict"; + +exports.__esModule = true; + +var _from = require("../core-js/array/from"); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + return Array.isArray(arr) ? arr : (0, _from2.default)(arr); +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/toConsumableArray.js b/socket/node_modules/babel-runtime/helpers/toConsumableArray.js new file mode 100644 index 0000000..c4e34f5 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/toConsumableArray.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _from = require("../core-js/array/from"); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/helpers/typeof.js b/socket/node_modules/babel-runtime/helpers/typeof.js new file mode 100644 index 0000000..d22add8 --- /dev/null +++ b/socket/node_modules/babel-runtime/helpers/typeof.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _iterator = require("../core-js/symbol/iterator"); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; \ No newline at end of file diff --git a/socket/node_modules/babel-runtime/package-lock.json b/socket/node_modules/babel-runtime/package-lock.json new file mode 100644 index 0000000..78600f9 --- /dev/null +++ b/socket/node_modules/babel-runtime/package-lock.json @@ -0,0 +1,232 @@ +{ + "name": "babel-runtime", + "version": "6.23.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "babel-code-frame": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", + "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0", + "babel-template": "6.25.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0" + } + }, + "babel-plugin-transform-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz", + "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0" + } + }, + "babel-runtime": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", + "integrity": "sha1-M7mOql1IK7AajRqmtDetKwGuxBw=", + "dev": true, + "requires": { + "core-js": "2.5.0" + } + }, + "babel-template": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", + "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz", + "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", + "dev": true, + "requires": { + "babel-code-frame": "6.22.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.18.0", + "debug": "2.6.8", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", + "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "core-js": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", + "integrity": "sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY=" + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + } + } +} diff --git a/socket/node_modules/babel-runtime/package.json b/socket/node_modules/babel-runtime/package.json new file mode 100644 index 0000000..02a30c0 --- /dev/null +++ b/socket/node_modules/babel-runtime/package.json @@ -0,0 +1,53 @@ +{ + "_from": "babel-runtime@^6.22.0", + "_id": "babel-runtime@6.26.0", + "_inBundle": false, + "_integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "_location": "/babel-runtime", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "babel-runtime@^6.22.0", + "name": "babel-runtime", + "escapedName": "babel-runtime", + "rawSpec": "^6.22.0", + "saveSpec": null, + "fetchSpec": "^6.22.0" + }, + "_requiredBy": [ + "/babel-helper-function-name", + "/babel-helper-get-function-arity", + "/babel-messages", + "/babel-plugin-transform-class-properties", + "/babel-template", + "/babel-traverse", + "/babel-types" + ], + "_resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "_shasum": "965c7058668e82b55d7bfe04ff2337bc8b5647fe", + "_spec": "babel-runtime@^6.22.0", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-plugin-transform-class-properties", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "deprecated": false, + "description": "babel selfContained runtime", + "devDependencies": { + "babel-helpers": "^6.22.0", + "babel-plugin-transform-runtime": "^6.23.0" + }, + "license": "MIT", + "name": "babel-runtime", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-runtime" + }, + "version": "6.26.0" +} diff --git a/socket/node_modules/babel-runtime/regenerator/index.js b/socket/node_modules/babel-runtime/regenerator/index.js new file mode 100644 index 0000000..9fd4158 --- /dev/null +++ b/socket/node_modules/babel-runtime/regenerator/index.js @@ -0,0 +1 @@ +module.exports = require("regenerator-runtime"); diff --git a/socket/node_modules/babel-template/.npmignore b/socket/node_modules/babel-template/.npmignore new file mode 100644 index 0000000..47cdd2c --- /dev/null +++ b/socket/node_modules/babel-template/.npmignore @@ -0,0 +1,3 @@ +src +test +node_modules diff --git a/socket/node_modules/babel-template/README.md b/socket/node_modules/babel-template/README.md new file mode 100644 index 0000000..c73507a --- /dev/null +++ b/socket/node_modules/babel-template/README.md @@ -0,0 +1,64 @@ +# babel-template + +> Generate an AST from a string template. + +In computer science, this is known as an implementation of quasiquotes. + +## Install + +```sh +npm install --save-dev babel-template +``` + +## Usage + +```js +import template from "babel-template"; +import generate from "babel-generator"; +import * as t from "babel-types"; + +const buildRequire = template(` + var IMPORT_NAME = require(SOURCE); +`); + +const ast = buildRequire({ + IMPORT_NAME: t.identifier("myModule"), + SOURCE: t.stringLiteral("my-module") +}); + +console.log(generate(ast).code); +``` + +```js +const myModule = require("my-module"); +``` + +## API + +### `template(code, [opts])` + +#### code + +Type: `string` + +#### options + +`babel-template` accepts all of the options from [babylon], and specifies +some defaults of its own: + +* `allowReturnOutsideFunction` is set to `true` by default. +* `allowSuperOutsideMethod` is set to `true` by default. + +##### preserveComments + +Type: `boolean` +Default: `false` + +Set this to `true` to preserve any comments from the `code` parameter. + +#### Return value + +`babel-template` returns a `function` which is invoked with an optional object +of replacements. See the usage section for an example. + +[babylon]: https://github.com/babel/babylon#options diff --git a/socket/node_modules/babel-template/lib/index.js b/socket/node_modules/babel-template/lib/index.js new file mode 100644 index 0000000..ab5ec99 --- /dev/null +++ b/socket/node_modules/babel-template/lib/index.js @@ -0,0 +1,143 @@ +"use strict"; + +exports.__esModule = true; + +var _symbol = require("babel-runtime/core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +exports.default = function (code, opts) { + var stack = void 0; + try { + throw new Error(); + } catch (error) { + if (error.stack) { + stack = error.stack.split("\n").slice(1).join("\n"); + } + } + + opts = (0, _assign2.default)({ + allowReturnOutsideFunction: true, + allowSuperOutsideMethod: true, + preserveComments: false + }, opts); + + var _getAst = function getAst() { + var ast = void 0; + + try { + ast = babylon.parse(code, opts); + + ast = _babelTraverse2.default.removeProperties(ast, { preserveComments: opts.preserveComments }); + + _babelTraverse2.default.cheap(ast, function (node) { + node[FROM_TEMPLATE] = true; + }); + } catch (err) { + err.stack = err.stack + "from\n" + stack; + throw err; + } + + _getAst = function getAst() { + return ast; + }; + + return ast; + }; + + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return useTemplate(_getAst(), args); + }; +}; + +var _cloneDeep = require("lodash/cloneDeep"); + +var _cloneDeep2 = _interopRequireDefault(_cloneDeep); + +var _assign = require("lodash/assign"); + +var _assign2 = _interopRequireDefault(_assign); + +var _has = require("lodash/has"); + +var _has2 = _interopRequireDefault(_has); + +var _babelTraverse = require("babel-traverse"); + +var _babelTraverse2 = _interopRequireDefault(_babelTraverse); + +var _babylon = require("babylon"); + +var babylon = _interopRequireWildcard(_babylon); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var FROM_TEMPLATE = "_fromTemplate"; +var TEMPLATE_SKIP = (0, _symbol2.default)(); + +function useTemplate(ast, nodes) { + ast = (0, _cloneDeep2.default)(ast); + var _ast = ast, + program = _ast.program; + + + if (nodes.length) { + (0, _babelTraverse2.default)(ast, templateVisitor, null, nodes); + } + + if (program.body.length > 1) { + return program.body; + } else { + return program.body[0]; + } +} + +var templateVisitor = { + noScope: true, + + enter: function enter(path, args) { + var node = path.node; + + if (node[TEMPLATE_SKIP]) return path.skip(); + + if (t.isExpressionStatement(node)) { + node = node.expression; + } + + var replacement = void 0; + + if (t.isIdentifier(node) && node[FROM_TEMPLATE]) { + if ((0, _has2.default)(args[0], node.name)) { + replacement = args[0][node.name]; + } else if (node.name[0] === "$") { + var i = +node.name.slice(1); + if (args[i]) replacement = args[i]; + } + } + + if (replacement === null) { + path.remove(); + } + + if (replacement) { + replacement[TEMPLATE_SKIP] = true; + path.replaceInline(replacement); + } + }, + exit: function exit(_ref) { + var node = _ref.node; + + if (!node.loc) _babelTraverse2.default.clearNode(node); + } +}; +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-template/package-lock.json b/socket/node_modules/babel-template/package-lock.json new file mode 100644 index 0000000..3c059a7 --- /dev/null +++ b/socket/node_modules/babel-template/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "babel-template", + "version": "6.25.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + } + } +} diff --git a/socket/node_modules/babel-template/package.json b/socket/node_modules/babel-template/package.json new file mode 100644 index 0000000..b35c1bd --- /dev/null +++ b/socket/node_modules/babel-template/package.json @@ -0,0 +1,49 @@ +{ + "_from": "babel-template@^6.24.1", + "_id": "babel-template@6.26.0", + "_inBundle": false, + "_integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "_location": "/babel-template", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "babel-template@^6.24.1", + "name": "babel-template", + "escapedName": "babel-template", + "rawSpec": "^6.24.1", + "saveSpec": null, + "fetchSpec": "^6.24.1" + }, + "_requiredBy": [ + "/babel-helper-function-name", + "/babel-plugin-transform-class-properties" + ], + "_resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "_shasum": "de03e2d16396b069f46dd9fff8521fb1a0e35e02", + "_spec": "babel-template@^6.24.1", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-plugin-transform-class-properties", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + }, + "deprecated": false, + "description": "Generate an AST from a string template.", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "babel-template", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-template" + }, + "version": "6.26.0" +} diff --git a/socket/node_modules/babel-traverse/.npmignore b/socket/node_modules/babel-traverse/.npmignore new file mode 100644 index 0000000..47cdd2c --- /dev/null +++ b/socket/node_modules/babel-traverse/.npmignore @@ -0,0 +1,3 @@ +src +test +node_modules diff --git a/socket/node_modules/babel-traverse/README.md b/socket/node_modules/babel-traverse/README.md new file mode 100644 index 0000000..1dfda0a --- /dev/null +++ b/socket/node_modules/babel-traverse/README.md @@ -0,0 +1,33 @@ +# babel-traverse + +> babel-traverse maintains the overall tree state, and is responsible for replacing, removing, and adding nodes. + +## Install + +```sh +$ npm install --save babel-traverse +``` + +## Usage + +We can use it alongside Babylon to traverse and update nodes: + +```js +import * as babylon from "babylon"; +import traverse from "babel-traverse"; + +const code = `function square(n) { + return n * n; +}`; + +const ast = babylon.parse(code); + +traverse(ast, { + enter(path) { + if (path.isIdentifier({ name: "n" })) { + path.node.name = "x"; + } + } +}); +``` +[:book: **Read the full docs here**](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-traverse) diff --git a/socket/node_modules/babel-traverse/lib/cache.js b/socket/node_modules/babel-traverse/lib/cache.js new file mode 100644 index 0000000..b337eec --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/cache.js @@ -0,0 +1,30 @@ +"use strict"; + +exports.__esModule = true; +exports.scope = exports.path = undefined; + +var _weakMap = require("babel-runtime/core-js/weak-map"); + +var _weakMap2 = _interopRequireDefault(_weakMap); + +exports.clear = clear; +exports.clearPath = clearPath; +exports.clearScope = clearScope; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var path = exports.path = new _weakMap2.default(); +var scope = exports.scope = new _weakMap2.default(); + +function clear() { + clearPath(); + clearScope(); +} + +function clearPath() { + exports.path = path = new _weakMap2.default(); +} + +function clearScope() { + exports.scope = scope = new _weakMap2.default(); +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/context.js b/socket/node_modules/babel-traverse/lib/context.js new file mode 100644 index 0000000..3b9ded8 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/context.js @@ -0,0 +1,200 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _path2 = require("./path"); + +var _path3 = _interopRequireDefault(_path2); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var testing = process.env.NODE_ENV === "test"; + +var TraversalContext = function () { + function TraversalContext(scope, opts, state, parentPath) { + (0, _classCallCheck3.default)(this, TraversalContext); + this.queue = null; + + this.parentPath = parentPath; + this.scope = scope; + this.state = state; + this.opts = opts; + } + + TraversalContext.prototype.shouldVisit = function shouldVisit(node) { + var opts = this.opts; + if (opts.enter || opts.exit) return true; + + if (opts[node.type]) return true; + + var keys = t.VISITOR_KEYS[node.type]; + if (!keys || !keys.length) return false; + + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + + if (node[key]) return true; + } + + return false; + }; + + TraversalContext.prototype.create = function create(node, obj, key, listKey) { + return _path3.default.get({ + parentPath: this.parentPath, + parent: node, + container: obj, + key: key, + listKey: listKey + }); + }; + + TraversalContext.prototype.maybeQueue = function maybeQueue(path, notPriority) { + if (this.trap) { + throw new Error("Infinite cycle detected"); + } + + if (this.queue) { + if (notPriority) { + this.queue.push(path); + } else { + this.priorityQueue.push(path); + } + } + }; + + TraversalContext.prototype.visitMultiple = function visitMultiple(container, parent, listKey) { + if (container.length === 0) return false; + + var queue = []; + + for (var key = 0; key < container.length; key++) { + var node = container[key]; + if (node && this.shouldVisit(node)) { + queue.push(this.create(parent, container, key, listKey)); + } + } + + return this.visitQueue(queue); + }; + + TraversalContext.prototype.visitSingle = function visitSingle(node, key) { + if (this.shouldVisit(node[key])) { + return this.visitQueue([this.create(node, node, key)]); + } else { + return false; + } + }; + + TraversalContext.prototype.visitQueue = function visitQueue(queue) { + this.queue = queue; + this.priorityQueue = []; + + var visited = []; + var stop = false; + + for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var path = _ref2; + + path.resync(); + + if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { + path.pushContext(this); + } + + if (path.key === null) continue; + + if (testing && queue.length >= 10000) { + this.trap = true; + } + + if (visited.indexOf(path.node) >= 0) continue; + visited.push(path.node); + + if (path.visit()) { + stop = true; + break; + } + + if (this.priorityQueue.length) { + stop = this.visitQueue(this.priorityQueue); + this.priorityQueue = []; + this.queue = queue; + if (stop) break; + } + } + + for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var _path = _ref3; + + _path.popContext(); + } + + this.queue = null; + + return stop; + }; + + TraversalContext.prototype.visit = function visit(node, key) { + var nodes = node[key]; + if (!nodes) return false; + + if (Array.isArray(nodes)) { + return this.visitMultiple(nodes, node, key); + } else { + return this.visitSingle(node, key); + } + }; + + return TraversalContext; +}(); + +exports.default = TraversalContext; +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/hub.js b/socket/node_modules/babel-traverse/lib/hub.js new file mode 100644 index 0000000..f989c4c --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/hub.js @@ -0,0 +1,19 @@ +"use strict"; + +exports.__esModule = true; + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Hub = function Hub(file, options) { + (0, _classCallCheck3.default)(this, Hub); + + this.file = file; + this.options = options; +}; + +exports.default = Hub; +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/index.js b/socket/node_modules/babel-traverse/lib/index.js new file mode 100644 index 0000000..19a14ce --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/index.js @@ -0,0 +1,165 @@ +"use strict"; + +exports.__esModule = true; +exports.visitors = exports.Hub = exports.Scope = exports.NodePath = undefined; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _path = require("./path"); + +Object.defineProperty(exports, "NodePath", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_path).default; + } +}); + +var _scope = require("./scope"); + +Object.defineProperty(exports, "Scope", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_scope).default; + } +}); + +var _hub = require("./hub"); + +Object.defineProperty(exports, "Hub", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_hub).default; + } +}); +exports.default = traverse; + +var _context = require("./context"); + +var _context2 = _interopRequireDefault(_context); + +var _visitors = require("./visitors"); + +var visitors = _interopRequireWildcard(_visitors); + +var _babelMessages = require("babel-messages"); + +var messages = _interopRequireWildcard(_babelMessages); + +var _includes = require("lodash/includes"); + +var _includes2 = _interopRequireDefault(_includes); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +var _cache = require("./cache"); + +var cache = _interopRequireWildcard(_cache); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.visitors = visitors; +function traverse(parent, opts, scope, state, parentPath) { + if (!parent) return; + if (!opts) opts = {}; + + if (!opts.noScope && !scope) { + if (parent.type !== "Program" && parent.type !== "File") { + throw new Error(messages.get("traverseNeedsParent", parent.type)); + } + } + + visitors.explode(opts); + + traverse.node(parent, opts, scope, state, parentPath); +} + +traverse.visitors = visitors; +traverse.verify = visitors.verify; +traverse.explode = visitors.explode; + +traverse.NodePath = require("./path"); +traverse.Scope = require("./scope"); +traverse.Hub = require("./hub"); + +traverse.cheap = function (node, enter) { + return t.traverseFast(node, enter); +}; + +traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { + var keys = t.VISITOR_KEYS[node.type]; + if (!keys) return; + + var context = new _context2.default(scope, opts, state, parentPath); + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + + if (skipKeys && skipKeys[key]) continue; + if (context.visit(node, key)) return; + } +}; + +traverse.clearNode = function (node, opts) { + t.removeProperties(node, opts); + + cache.path.delete(node); +}; + +traverse.removeProperties = function (tree, opts) { + t.traverseFast(tree, traverse.clearNode, opts); + return tree; +}; + +function hasBlacklistedType(path, state) { + if (path.node.type === state.type) { + state.has = true; + path.stop(); + } +} + +traverse.hasType = function (tree, scope, type, blacklistTypes) { + if ((0, _includes2.default)(blacklistTypes, tree.type)) return false; + + if (tree.type === type) return true; + + var state = { + has: false, + type: type + }; + + traverse(tree, { + blacklist: blacklistTypes, + enter: hasBlacklistedType + }, scope, state); + + return state.has; +}; + +traverse.clearCache = function () { + cache.clear(); +}; + +traverse.clearCache.clearPath = cache.clearPath; +traverse.clearCache.clearScope = cache.clearScope; + +traverse.copyCache = function (source, destination) { + if (cache.path.has(source)) { + cache.path.set(destination, cache.path.get(source)); + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/ancestry.js b/socket/node_modules/babel-traverse/lib/path/ancestry.js new file mode 100644 index 0000000..2a8c322 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/ancestry.js @@ -0,0 +1,238 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.findParent = findParent; +exports.find = find; +exports.getFunctionParent = getFunctionParent; +exports.getStatementParent = getStatementParent; +exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; +exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; +exports.getAncestry = getAncestry; +exports.isAncestor = isAncestor; +exports.isDescendant = isDescendant; +exports.inType = inType; +exports.inShadow = inShadow; + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function findParent(callback) { + var path = this; + while (path = path.parentPath) { + if (callback(path)) return path; + } + return null; +} + +function find(callback) { + var path = this; + do { + if (callback(path)) return path; + } while (path = path.parentPath); + return null; +} + +function getFunctionParent() { + return this.findParent(function (path) { + return path.isFunction() || path.isProgram(); + }); +} + +function getStatementParent() { + var path = this; + do { + if (Array.isArray(path.container)) { + return path; + } + } while (path = path.parentPath); +} + +function getEarliestCommonAncestorFrom(paths) { + return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { + var earliest = void 0; + var keys = t.VISITOR_KEYS[deepest.type]; + + for (var _iterator = ancestries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var ancestry = _ref; + + var path = ancestry[i + 1]; + + if (!earliest) { + earliest = path; + continue; + } + + if (path.listKey && earliest.listKey === path.listKey) { + if (path.key < earliest.key) { + earliest = path; + continue; + } + } + + var earliestKeyIndex = keys.indexOf(earliest.parentKey); + var currentKeyIndex = keys.indexOf(path.parentKey); + if (earliestKeyIndex > currentKeyIndex) { + earliest = path; + } + } + + return earliest; + }); +} + +function getDeepestCommonAncestorFrom(paths, filter) { + var _this = this; + + if (!paths.length) { + return this; + } + + if (paths.length === 1) { + return paths[0]; + } + + var minDepth = Infinity; + + var lastCommonIndex = void 0, + lastCommon = void 0; + + var ancestries = paths.map(function (path) { + var ancestry = []; + + do { + ancestry.unshift(path); + } while ((path = path.parentPath) && path !== _this); + + if (ancestry.length < minDepth) { + minDepth = ancestry.length; + } + + return ancestry; + }); + + var first = ancestries[0]; + + depthLoop: for (var i = 0; i < minDepth; i++) { + var shouldMatch = first[i]; + + for (var _iterator2 = ancestries, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var ancestry = _ref2; + + if (ancestry[i] !== shouldMatch) { + break depthLoop; + } + } + + lastCommonIndex = i; + lastCommon = shouldMatch; + } + + if (lastCommon) { + if (filter) { + return filter(lastCommon, lastCommonIndex, ancestries); + } else { + return lastCommon; + } + } else { + throw new Error("Couldn't find intersection"); + } +} + +function getAncestry() { + var path = this; + var paths = []; + do { + paths.push(path); + } while (path = path.parentPath); + return paths; +} + +function isAncestor(maybeDescendant) { + return maybeDescendant.isDescendant(this); +} + +function isDescendant(maybeAncestor) { + return !!this.findParent(function (parent) { + return parent === maybeAncestor; + }); +} + +function inType() { + var path = this; + while (path) { + for (var _iterator3 = arguments, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var type = _ref3; + + if (path.node.type === type) return true; + } + path = path.parentPath; + } + + return false; +} + +function inShadow(key) { + var parentFn = this.isFunction() ? this : this.findParent(function (p) { + return p.isFunction(); + }); + if (!parentFn) return; + + if (parentFn.isFunctionExpression() || parentFn.isFunctionDeclaration()) { + var shadow = parentFn.node.shadow; + + if (shadow && (!key || shadow[key] !== false)) { + return parentFn; + } + } else if (parentFn.isArrowFunctionExpression()) { + return parentFn; + } + + return null; +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/comments.js b/socket/node_modules/babel-traverse/lib/path/comments.js new file mode 100644 index 0000000..800018c --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/comments.js @@ -0,0 +1,47 @@ +"use strict"; + +exports.__esModule = true; +exports.shareCommentsWithSiblings = shareCommentsWithSiblings; +exports.addComment = addComment; +exports.addComments = addComments; +function shareCommentsWithSiblings() { + if (typeof this.key === "string") return; + + var node = this.node; + if (!node) return; + + var trailing = node.trailingComments; + var leading = node.leadingComments; + if (!trailing && !leading) return; + + var prev = this.getSibling(this.key - 1); + var next = this.getSibling(this.key + 1); + + if (!prev.node) prev = next; + if (!next.node) next = prev; + + prev.addComments("trailing", leading); + next.addComments("leading", trailing); +} + +function addComment(type, content, line) { + this.addComments(type, [{ + type: line ? "CommentLine" : "CommentBlock", + value: content + }]); +} + +function addComments(type, comments) { + if (!comments) return; + + var node = this.node; + if (!node) return; + + var key = type + "Comments"; + + if (node[key]) { + node[key] = node[key].concat(comments); + } else { + node[key] = comments; + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/context.js b/socket/node_modules/babel-traverse/lib/path/context.js new file mode 100644 index 0000000..961e66e --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/context.js @@ -0,0 +1,281 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.call = call; +exports._call = _call; +exports.isBlacklisted = isBlacklisted; +exports.visit = visit; +exports.skip = skip; +exports.skipKey = skipKey; +exports.stop = stop; +exports.setScope = setScope; +exports.setContext = setContext; +exports.resync = resync; +exports._resyncParent = _resyncParent; +exports._resyncKey = _resyncKey; +exports._resyncList = _resyncList; +exports._resyncRemoved = _resyncRemoved; +exports.popContext = popContext; +exports.pushContext = pushContext; +exports.setup = setup; +exports.setKey = setKey; +exports.requeue = requeue; +exports._getQueueContexts = _getQueueContexts; + +var _index = require("../index"); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function call(key) { + var opts = this.opts; + + this.debug(function () { + return key; + }); + + if (this.node) { + if (this._call(opts[key])) return true; + } + + if (this.node) { + return this._call(opts[this.node.type] && opts[this.node.type][key]); + } + + return false; +} + +function _call(fns) { + if (!fns) return false; + + for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var fn = _ref; + + if (!fn) continue; + + var node = this.node; + if (!node) return true; + + var ret = fn.call(this.state, this, this.state); + if (ret) throw new Error("Unexpected return value from visitor method " + fn); + + if (this.node !== node) return true; + + if (this.shouldStop || this.shouldSkip || this.removed) return true; + } + + return false; +} + +function isBlacklisted() { + var blacklist = this.opts.blacklist; + return blacklist && blacklist.indexOf(this.node.type) > -1; +} + +function visit() { + if (!this.node) { + return false; + } + + if (this.isBlacklisted()) { + return false; + } + + if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { + return false; + } + + if (this.call("enter") || this.shouldSkip) { + this.debug(function () { + return "Skip..."; + }); + return this.shouldStop; + } + + this.debug(function () { + return "Recursing into..."; + }); + _index2.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); + + this.call("exit"); + + return this.shouldStop; +} + +function skip() { + this.shouldSkip = true; +} + +function skipKey(key) { + this.skipKeys[key] = true; +} + +function stop() { + this.shouldStop = true; + this.shouldSkip = true; +} + +function setScope() { + if (this.opts && this.opts.noScope) return; + + var target = this.context && this.context.scope; + + if (!target) { + var path = this.parentPath; + while (path && !target) { + if (path.opts && path.opts.noScope) return; + + target = path.scope; + path = path.parentPath; + } + } + + this.scope = this.getScope(target); + if (this.scope) this.scope.init(); +} + +function setContext(context) { + this.shouldSkip = false; + this.shouldStop = false; + this.removed = false; + this.skipKeys = {}; + + if (context) { + this.context = context; + this.state = context.state; + this.opts = context.opts; + } + + this.setScope(); + + return this; +} + +function resync() { + if (this.removed) return; + + this._resyncParent(); + this._resyncList(); + this._resyncKey(); +} + +function _resyncParent() { + if (this.parentPath) { + this.parent = this.parentPath.node; + } +} + +function _resyncKey() { + if (!this.container) return; + + if (this.node === this.container[this.key]) return; + + if (Array.isArray(this.container)) { + for (var i = 0; i < this.container.length; i++) { + if (this.container[i] === this.node) { + return this.setKey(i); + } + } + } else { + for (var key in this.container) { + if (this.container[key] === this.node) { + return this.setKey(key); + } + } + } + + this.key = null; +} + +function _resyncList() { + if (!this.parent || !this.inList) return; + + var newContainer = this.parent[this.listKey]; + if (this.container === newContainer) return; + + this.container = newContainer || null; +} + +function _resyncRemoved() { + if (this.key == null || !this.container || this.container[this.key] !== this.node) { + this._markRemoved(); + } +} + +function popContext() { + this.contexts.pop(); + this.setContext(this.contexts[this.contexts.length - 1]); +} + +function pushContext(context) { + this.contexts.push(context); + this.setContext(context); +} + +function setup(parentPath, container, listKey, key) { + this.inList = !!listKey; + this.listKey = listKey; + this.parentKey = listKey || key; + this.container = container; + + this.parentPath = parentPath || this.parentPath; + this.setKey(key); +} + +function setKey(key) { + this.key = key; + this.node = this.container[this.key]; + this.type = this.node && this.node.type; +} + +function requeue() { + var pathToQueue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this; + + if (pathToQueue.removed) return; + + var contexts = this.contexts; + + for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var context = _ref2; + + context.maybeQueue(pathToQueue); + } +} + +function _getQueueContexts() { + var path = this; + var contexts = this.contexts; + while (!contexts.length) { + path = path.parentPath; + contexts = path.contexts; + } + return contexts; +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/conversion.js b/socket/node_modules/babel-traverse/lib/path/conversion.js new file mode 100644 index 0000000..8989248 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/conversion.js @@ -0,0 +1,47 @@ +"use strict"; + +exports.__esModule = true; +exports.toComputedKey = toComputedKey; +exports.ensureBlock = ensureBlock; +exports.arrowFunctionToShadowed = arrowFunctionToShadowed; + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function toComputedKey() { + var node = this.node; + + var key = void 0; + if (this.isMemberExpression()) { + key = node.property; + } else if (this.isProperty() || this.isMethod()) { + key = node.key; + } else { + throw new ReferenceError("todo"); + } + + if (!node.computed) { + if (t.isIdentifier(key)) key = t.stringLiteral(key.name); + } + + return key; +} + +function ensureBlock() { + return t.ensureBlock(this.node); +} + +function arrowFunctionToShadowed() { + if (!this.isArrowFunctionExpression()) return; + + this.ensureBlock(); + + var node = this.node; + + node.expression = false; + node.type = "FunctionExpression"; + node.shadow = node.shadow || true; +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/evaluation.js b/socket/node_modules/babel-traverse/lib/path/evaluation.js new file mode 100644 index 0000000..86aac21 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/evaluation.js @@ -0,0 +1,398 @@ +"use strict"; + +exports.__esModule = true; + +var _typeof2 = require("babel-runtime/helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _map = require("babel-runtime/core-js/map"); + +var _map2 = _interopRequireDefault(_map); + +exports.evaluateTruthy = evaluateTruthy; +exports.evaluate = evaluate; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var VALID_CALLEES = ["String", "Number", "Math"]; +var INVALID_METHODS = ["random"]; + +function evaluateTruthy() { + var res = this.evaluate(); + if (res.confident) return !!res.value; +} + +function evaluate() { + var confident = true; + var deoptPath = void 0; + var seen = new _map2.default(); + + function deopt(path) { + if (!confident) return; + deoptPath = path; + confident = false; + } + + var value = evaluate(this); + if (!confident) value = undefined; + return { + confident: confident, + deopt: deoptPath, + value: value + }; + + function evaluate(path) { + var node = path.node; + + + if (seen.has(node)) { + var existing = seen.get(node); + if (existing.resolved) { + return existing.value; + } else { + deopt(path); + return; + } + } else { + var item = { resolved: false }; + seen.set(node, item); + + var val = _evaluate(path); + if (confident) { + item.resolved = true; + item.value = val; + } + return val; + } + } + + function _evaluate(path) { + if (!confident) return; + + var node = path.node; + + + if (path.isSequenceExpression()) { + var exprs = path.get("expressions"); + return evaluate(exprs[exprs.length - 1]); + } + + if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) { + return node.value; + } + + if (path.isNullLiteral()) { + return null; + } + + if (path.isTemplateLiteral()) { + var str = ""; + + var i = 0; + var _exprs = path.get("expressions"); + + for (var _iterator = node.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var elem = _ref; + + if (!confident) break; + + str += elem.value.cooked; + + var expr = _exprs[i++]; + if (expr) str += String(evaluate(expr)); + } + + if (!confident) return; + return str; + } + + if (path.isConditionalExpression()) { + var testResult = evaluate(path.get("test")); + if (!confident) return; + if (testResult) { + return evaluate(path.get("consequent")); + } else { + return evaluate(path.get("alternate")); + } + } + + if (path.isExpressionWrapper()) { + return evaluate(path.get("expression")); + } + + if (path.isMemberExpression() && !path.parentPath.isCallExpression({ callee: node })) { + var property = path.get("property"); + var object = path.get("object"); + + if (object.isLiteral() && property.isIdentifier()) { + var _value = object.node.value; + var type = typeof _value === "undefined" ? "undefined" : (0, _typeof3.default)(_value); + if (type === "number" || type === "string") { + return _value[property.node.name]; + } + } + } + + if (path.isReferencedIdentifier()) { + var binding = path.scope.getBinding(node.name); + + if (binding && binding.constantViolations.length > 0) { + return deopt(binding.path); + } + + if (binding && path.node.start < binding.path.node.end) { + return deopt(binding.path); + } + + if (binding && binding.hasValue) { + return binding.value; + } else { + if (node.name === "undefined") { + return binding ? deopt(binding.path) : undefined; + } else if (node.name === "Infinity") { + return binding ? deopt(binding.path) : Infinity; + } else if (node.name === "NaN") { + return binding ? deopt(binding.path) : NaN; + } + + var resolved = path.resolve(); + if (resolved === path) { + return deopt(path); + } else { + return evaluate(resolved); + } + } + } + + if (path.isUnaryExpression({ prefix: true })) { + if (node.operator === "void") { + return undefined; + } + + var argument = path.get("argument"); + if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) { + return "function"; + } + + var arg = evaluate(argument); + if (!confident) return; + switch (node.operator) { + case "!": + return !arg; + case "+": + return +arg; + case "-": + return -arg; + case "~": + return ~arg; + case "typeof": + return typeof arg === "undefined" ? "undefined" : (0, _typeof3.default)(arg); + } + } + + if (path.isArrayExpression()) { + var arr = []; + var elems = path.get("elements"); + for (var _iterator2 = elems, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _elem = _ref2; + + _elem = _elem.evaluate(); + + if (_elem.confident) { + arr.push(_elem.value); + } else { + return deopt(_elem); + } + } + return arr; + } + + if (path.isObjectExpression()) { + var obj = {}; + var props = path.get("properties"); + for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var prop = _ref3; + + if (prop.isObjectMethod() || prop.isSpreadProperty()) { + return deopt(prop); + } + var keyPath = prop.get("key"); + var key = keyPath; + if (prop.node.computed) { + key = key.evaluate(); + if (!key.confident) { + return deopt(keyPath); + } + key = key.value; + } else if (key.isIdentifier()) { + key = key.node.name; + } else { + key = key.node.value; + } + var valuePath = prop.get("value"); + var _value2 = valuePath.evaluate(); + if (!_value2.confident) { + return deopt(valuePath); + } + _value2 = _value2.value; + obj[key] = _value2; + } + return obj; + } + + if (path.isLogicalExpression()) { + var wasConfident = confident; + var left = evaluate(path.get("left")); + var leftConfident = confident; + confident = wasConfident; + var right = evaluate(path.get("right")); + var rightConfident = confident; + confident = leftConfident && rightConfident; + + switch (node.operator) { + case "||": + if (left && leftConfident) { + confident = true; + return left; + } + + if (!confident) return; + + return left || right; + case "&&": + if (!left && leftConfident || !right && rightConfident) { + confident = true; + } + + if (!confident) return; + + return left && right; + } + } + + if (path.isBinaryExpression()) { + var _left = evaluate(path.get("left")); + if (!confident) return; + var _right = evaluate(path.get("right")); + if (!confident) return; + + switch (node.operator) { + case "-": + return _left - _right; + case "+": + return _left + _right; + case "/": + return _left / _right; + case "*": + return _left * _right; + case "%": + return _left % _right; + case "**": + return Math.pow(_left, _right); + case "<": + return _left < _right; + case ">": + return _left > _right; + case "<=": + return _left <= _right; + case ">=": + return _left >= _right; + case "==": + return _left == _right; + case "!=": + return _left != _right; + case "===": + return _left === _right; + case "!==": + return _left !== _right; + case "|": + return _left | _right; + case "&": + return _left & _right; + case "^": + return _left ^ _right; + case "<<": + return _left << _right; + case ">>": + return _left >> _right; + case ">>>": + return _left >>> _right; + } + } + + if (path.isCallExpression()) { + var callee = path.get("callee"); + var context = void 0; + var func = void 0; + + if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) { + func = global[node.callee.name]; + } + + if (callee.isMemberExpression()) { + var _object = callee.get("object"); + var _property = callee.get("property"); + + if (_object.isIdentifier() && _property.isIdentifier() && VALID_CALLEES.indexOf(_object.node.name) >= 0 && INVALID_METHODS.indexOf(_property.node.name) < 0) { + context = global[_object.node.name]; + func = context[_property.node.name]; + } + + if (_object.isLiteral() && _property.isIdentifier()) { + var _type = (0, _typeof3.default)(_object.node.value); + if (_type === "string" || _type === "number") { + context = _object.node.value; + func = context[_property.node.name]; + } + } + } + + if (func) { + var args = path.get("arguments").map(evaluate); + if (!confident) return; + + return func.apply(context, args); + } + } + + deopt(path); + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/family.js b/socket/node_modules/babel-traverse/lib/path/family.js new file mode 100644 index 0000000..4dd3752 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/family.js @@ -0,0 +1,266 @@ +"use strict"; + +exports.__esModule = true; + +var _create = require("babel-runtime/core-js/object/create"); + +var _create2 = _interopRequireDefault(_create); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.getStatementParent = getStatementParent; +exports.getOpposite = getOpposite; +exports.getCompletionRecords = getCompletionRecords; +exports.getSibling = getSibling; +exports.getPrevSibling = getPrevSibling; +exports.getNextSibling = getNextSibling; +exports.getAllNextSiblings = getAllNextSiblings; +exports.getAllPrevSiblings = getAllPrevSiblings; +exports.get = get; +exports._getKey = _getKey; +exports._getPattern = _getPattern; +exports.getBindingIdentifiers = getBindingIdentifiers; +exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; +exports.getBindingIdentifierPaths = getBindingIdentifierPaths; +exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths; + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStatementParent() { + var path = this; + + do { + if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { + break; + } else { + path = path.parentPath; + } + } while (path); + + if (path && (path.isProgram() || path.isFile())) { + throw new Error("File/Program node, we can't possibly find a statement parent to this"); + } + + return path; +} + +function getOpposite() { + if (this.key === "left") { + return this.getSibling("right"); + } else if (this.key === "right") { + return this.getSibling("left"); + } +} + +function getCompletionRecords() { + var paths = []; + + var add = function add(path) { + if (path) paths = paths.concat(path.getCompletionRecords()); + }; + + if (this.isIfStatement()) { + add(this.get("consequent")); + add(this.get("alternate")); + } else if (this.isDoExpression() || this.isFor() || this.isWhile()) { + add(this.get("body")); + } else if (this.isProgram() || this.isBlockStatement()) { + add(this.get("body").pop()); + } else if (this.isFunction()) { + return this.get("body").getCompletionRecords(); + } else if (this.isTryStatement()) { + add(this.get("block")); + add(this.get("handler")); + add(this.get("finalizer")); + } else { + paths.push(this); + } + + return paths; +} + +function getSibling(key) { + return _index2.default.get({ + parentPath: this.parentPath, + parent: this.parent, + container: this.container, + listKey: this.listKey, + key: key + }); +} + +function getPrevSibling() { + return this.getSibling(this.key - 1); +} + +function getNextSibling() { + return this.getSibling(this.key + 1); +} + +function getAllNextSiblings() { + var _key = this.key; + var sibling = this.getSibling(++_key); + var siblings = []; + while (sibling.node) { + siblings.push(sibling); + sibling = this.getSibling(++_key); + } + return siblings; +} + +function getAllPrevSiblings() { + var _key = this.key; + var sibling = this.getSibling(--_key); + var siblings = []; + while (sibling.node) { + siblings.push(sibling); + sibling = this.getSibling(--_key); + } + return siblings; +} + +function get(key, context) { + if (context === true) context = this.context; + var parts = key.split("."); + if (parts.length === 1) { + return this._getKey(key, context); + } else { + return this._getPattern(parts, context); + } +} + +function _getKey(key, context) { + var _this = this; + + var node = this.node; + var container = node[key]; + + if (Array.isArray(container)) { + return container.map(function (_, i) { + return _index2.default.get({ + listKey: key, + parentPath: _this, + parent: node, + container: container, + key: i + }).setContext(context); + }); + } else { + return _index2.default.get({ + parentPath: this, + parent: node, + container: node, + key: key + }).setContext(context); + } +} + +function _getPattern(parts, context) { + var path = this; + for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var part = _ref; + + if (part === ".") { + path = path.parentPath; + } else { + if (Array.isArray(path)) { + path = path[part]; + } else { + path = path.get(part, context); + } + } + } + return path; +} + +function getBindingIdentifiers(duplicates) { + return t.getBindingIdentifiers(this.node, duplicates); +} + +function getOuterBindingIdentifiers(duplicates) { + return t.getOuterBindingIdentifiers(this.node, duplicates); +} + +function getBindingIdentifierPaths() { + var duplicates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var outerOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var path = this; + var search = [].concat(path); + var ids = (0, _create2.default)(null); + + while (search.length) { + var id = search.shift(); + if (!id) continue; + if (!id.node) continue; + + var keys = t.getBindingIdentifiers.keys[id.node.type]; + + if (id.isIdentifier()) { + if (duplicates) { + var _ids = ids[id.node.name] = ids[id.node.name] || []; + _ids.push(id); + } else { + ids[id.node.name] = id; + } + continue; + } + + if (id.isExportDeclaration()) { + var declaration = id.get("declaration"); + if (declaration.isDeclaration()) { + search.push(declaration); + } + continue; + } + + if (outerOnly) { + if (id.isFunctionDeclaration()) { + search.push(id.get("id")); + continue; + } + if (id.isFunctionExpression()) { + continue; + } + } + + if (keys) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var child = id.get(key); + if (Array.isArray(child) || child.node) { + search = search.concat(child); + } + } + } + } + + return ids; +} + +function getOuterBindingIdentifierPaths(duplicates) { + return this.getBindingIdentifierPaths(duplicates, true); +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/index.js b/socket/node_modules/babel-traverse/lib/path/index.js new file mode 100644 index 0000000..dd8ae24 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/index.js @@ -0,0 +1,242 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _virtualTypes = require("./lib/virtual-types"); + +var virtualTypes = _interopRequireWildcard(_virtualTypes); + +var _debug2 = require("debug"); + +var _debug3 = _interopRequireDefault(_debug2); + +var _invariant = require("invariant"); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _index = require("../index"); + +var _index2 = _interopRequireDefault(_index); + +var _assign = require("lodash/assign"); + +var _assign2 = _interopRequireDefault(_assign); + +var _scope = require("../scope"); + +var _scope2 = _interopRequireDefault(_scope); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +var _cache = require("../cache"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _debug = (0, _debug3.default)("babel"); + +var NodePath = function () { + function NodePath(hub, parent) { + (0, _classCallCheck3.default)(this, NodePath); + + this.parent = parent; + this.hub = hub; + this.contexts = []; + this.data = {}; + this.shouldSkip = false; + this.shouldStop = false; + this.removed = false; + this.state = null; + this.opts = null; + this.skipKeys = null; + this.parentPath = null; + this.context = null; + this.container = null; + this.listKey = null; + this.inList = false; + this.parentKey = null; + this.key = null; + this.node = null; + this.scope = null; + this.type = null; + this.typeAnnotation = null; + } + + NodePath.get = function get(_ref) { + var hub = _ref.hub, + parentPath = _ref.parentPath, + parent = _ref.parent, + container = _ref.container, + listKey = _ref.listKey, + key = _ref.key; + + if (!hub && parentPath) { + hub = parentPath.hub; + } + + (0, _invariant2.default)(parent, "To get a node path the parent needs to exist"); + + var targetNode = container[key]; + + var paths = _cache.path.get(parent) || []; + if (!_cache.path.has(parent)) { + _cache.path.set(parent, paths); + } + + var path = void 0; + + for (var i = 0; i < paths.length; i++) { + var pathCheck = paths[i]; + if (pathCheck.node === targetNode) { + path = pathCheck; + break; + } + } + + if (!path) { + path = new NodePath(hub, parent); + paths.push(path); + } + + path.setup(parentPath, container, listKey, key); + + return path; + }; + + NodePath.prototype.getScope = function getScope(scope) { + var ourScope = scope; + + if (this.isScope()) { + ourScope = new _scope2.default(this, scope); + } + + return ourScope; + }; + + NodePath.prototype.setData = function setData(key, val) { + return this.data[key] = val; + }; + + NodePath.prototype.getData = function getData(key, def) { + var val = this.data[key]; + if (!val && def) val = this.data[key] = def; + return val; + }; + + NodePath.prototype.buildCodeFrameError = function buildCodeFrameError(msg) { + var Error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SyntaxError; + + return this.hub.file.buildCodeFrameError(this.node, msg, Error); + }; + + NodePath.prototype.traverse = function traverse(visitor, state) { + (0, _index2.default)(this.node, visitor, this.scope, state, this); + }; + + NodePath.prototype.mark = function mark(type, message) { + this.hub.file.metadata.marked.push({ + type: type, + message: message, + loc: this.node.loc + }); + }; + + NodePath.prototype.set = function set(key, node) { + t.validate(this.node, key, node); + this.node[key] = node; + }; + + NodePath.prototype.getPathLocation = function getPathLocation() { + var parts = []; + var path = this; + do { + var key = path.key; + if (path.inList) key = path.listKey + "[" + key + "]"; + parts.unshift(key); + } while (path = path.parentPath); + return parts.join("."); + }; + + NodePath.prototype.debug = function debug(buildMessage) { + if (!_debug.enabled) return; + _debug(this.getPathLocation() + " " + this.type + ": " + buildMessage()); + }; + + return NodePath; +}(); + +exports.default = NodePath; + + +(0, _assign2.default)(NodePath.prototype, require("./ancestry")); +(0, _assign2.default)(NodePath.prototype, require("./inference")); +(0, _assign2.default)(NodePath.prototype, require("./replacement")); +(0, _assign2.default)(NodePath.prototype, require("./evaluation")); +(0, _assign2.default)(NodePath.prototype, require("./conversion")); +(0, _assign2.default)(NodePath.prototype, require("./introspection")); +(0, _assign2.default)(NodePath.prototype, require("./context")); +(0, _assign2.default)(NodePath.prototype, require("./removal")); +(0, _assign2.default)(NodePath.prototype, require("./modification")); +(0, _assign2.default)(NodePath.prototype, require("./family")); +(0, _assign2.default)(NodePath.prototype, require("./comments")); + +var _loop2 = function _loop2() { + if (_isArray) { + if (_i >= _iterator.length) return "break"; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) return "break"; + _ref2 = _i.value; + } + + var type = _ref2; + + var typeKey = "is" + type; + NodePath.prototype[typeKey] = function (opts) { + return t[typeKey](this.node, opts); + }; + + NodePath.prototype["assert" + type] = function (opts) { + if (!this[typeKey](opts)) { + throw new TypeError("Expected node path of type " + type); + } + }; +}; + +for (var _iterator = t.TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref2; + + var _ret2 = _loop2(); + + if (_ret2 === "break") break; +} + +var _loop = function _loop(type) { + if (type[0] === "_") return "continue"; + if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type); + + var virtualType = virtualTypes[type]; + + NodePath.prototype["is" + type] = function (opts) { + return virtualType.checkPath(this, opts); + }; +}; + +for (var type in virtualTypes) { + var _ret = _loop(type); + + if (_ret === "continue") continue; +} +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/inference/index.js b/socket/node_modules/babel-traverse/lib/path/inference/index.js new file mode 100644 index 0000000..d939663 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/inference/index.js @@ -0,0 +1,142 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.getTypeAnnotation = getTypeAnnotation; +exports._getTypeAnnotation = _getTypeAnnotation; +exports.isBaseType = isBaseType; +exports.couldBeBaseType = couldBeBaseType; +exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; +exports.isGenericType = isGenericType; + +var _inferers = require("./inferers"); + +var inferers = _interopRequireWildcard(_inferers); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getTypeAnnotation() { + if (this.typeAnnotation) return this.typeAnnotation; + + var type = this._getTypeAnnotation() || t.anyTypeAnnotation(); + if (t.isTypeAnnotation(type)) type = type.typeAnnotation; + return this.typeAnnotation = type; +} + +function _getTypeAnnotation() { + var node = this.node; + + if (!node) { + if (this.key === "init" && this.parentPath.isVariableDeclarator()) { + var declar = this.parentPath.parentPath; + var declarParent = declar.parentPath; + + if (declar.key === "left" && declarParent.isForInStatement()) { + return t.stringTypeAnnotation(); + } + + if (declar.key === "left" && declarParent.isForOfStatement()) { + return t.anyTypeAnnotation(); + } + + return t.voidTypeAnnotation(); + } else { + return; + } + } + + if (node.typeAnnotation) { + return node.typeAnnotation; + } + + var inferer = inferers[node.type]; + if (inferer) { + return inferer.call(this, node); + } + + inferer = inferers[this.parentPath.type]; + if (inferer && inferer.validParent) { + return this.parentPath.getTypeAnnotation(); + } +} + +function isBaseType(baseName, soft) { + return _isBaseType(baseName, this.getTypeAnnotation(), soft); +} + +function _isBaseType(baseName, type, soft) { + if (baseName === "string") { + return t.isStringTypeAnnotation(type); + } else if (baseName === "number") { + return t.isNumberTypeAnnotation(type); + } else if (baseName === "boolean") { + return t.isBooleanTypeAnnotation(type); + } else if (baseName === "any") { + return t.isAnyTypeAnnotation(type); + } else if (baseName === "mixed") { + return t.isMixedTypeAnnotation(type); + } else if (baseName === "empty") { + return t.isEmptyTypeAnnotation(type); + } else if (baseName === "void") { + return t.isVoidTypeAnnotation(type); + } else { + if (soft) { + return false; + } else { + throw new Error("Unknown base type " + baseName); + } + } +} + +function couldBeBaseType(name) { + var type = this.getTypeAnnotation(); + if (t.isAnyTypeAnnotation(type)) return true; + + if (t.isUnionTypeAnnotation(type)) { + for (var _iterator = type.types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var type2 = _ref; + + if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { + return true; + } + } + return false; + } else { + return _isBaseType(name, type, true); + } +} + +function baseTypeStrictlyMatches(right) { + var left = this.getTypeAnnotation(); + right = right.getTypeAnnotation(); + + if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) { + return right.type === left.type; + } +} + +function isGenericType(genericName) { + var type = this.getTypeAnnotation(); + return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, { name: genericName }); +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/inference/inferer-reference.js b/socket/node_modules/babel-traverse/lib/path/inference/inferer-reference.js new file mode 100644 index 0000000..3a8ff31 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/inference/inferer-reference.js @@ -0,0 +1,185 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.default = function (node) { + if (!this.isReferenced()) return; + + var binding = this.scope.getBinding(node.name); + if (binding) { + if (binding.identifier.typeAnnotation) { + return binding.identifier.typeAnnotation; + } else { + return getTypeAnnotationBindingConstantViolations(this, node.name); + } + } + + if (node.name === "undefined") { + return t.voidTypeAnnotation(); + } else if (node.name === "NaN" || node.name === "Infinity") { + return t.numberTypeAnnotation(); + } else if (node.name === "arguments") {} +}; + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getTypeAnnotationBindingConstantViolations(path, name) { + var binding = path.scope.getBinding(name); + + var types = []; + path.typeAnnotation = t.unionTypeAnnotation(types); + + var functionConstantViolations = []; + var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); + + var testType = getConditionalAnnotation(path, name); + if (testType) { + var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); + + constantViolations = constantViolations.filter(function (path) { + return testConstantViolations.indexOf(path) < 0; + }); + + types.push(testType.typeAnnotation); + } + + if (constantViolations.length) { + constantViolations = constantViolations.concat(functionConstantViolations); + + for (var _iterator = constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var violation = _ref; + + types.push(violation.getTypeAnnotation()); + } + } + + if (types.length) { + return t.createUnionTypeAnnotation(types); + } +} + +function getConstantViolationsBefore(binding, path, functions) { + var violations = binding.constantViolations.slice(); + violations.unshift(binding.path); + return violations.filter(function (violation) { + violation = violation.resolve(); + var status = violation._guessExecutionStatusRelativeTo(path); + if (functions && status === "function") functions.push(violation); + return status === "before"; + }); +} + +function inferAnnotationFromBinaryExpression(name, path) { + var operator = path.node.operator; + + var right = path.get("right").resolve(); + var left = path.get("left").resolve(); + + var target = void 0; + if (left.isIdentifier({ name: name })) { + target = right; + } else if (right.isIdentifier({ name: name })) { + target = left; + } + if (target) { + if (operator === "===") { + return target.getTypeAnnotation(); + } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { + return t.numberTypeAnnotation(); + } else { + return; + } + } else { + if (operator !== "===") return; + } + + var typeofPath = void 0; + var typePath = void 0; + if (left.isUnaryExpression({ operator: "typeof" })) { + typeofPath = left; + typePath = right; + } else if (right.isUnaryExpression({ operator: "typeof" })) { + typeofPath = right; + typePath = left; + } + if (!typePath && !typeofPath) return; + + typePath = typePath.resolve(); + if (!typePath.isLiteral()) return; + + var typeValue = typePath.node.value; + if (typeof typeValue !== "string") return; + + if (!typeofPath.get("argument").isIdentifier({ name: name })) return; + + return t.createTypeAnnotationBasedOnTypeof(typePath.node.value); +} + +function getParentConditionalPath(path) { + var parentPath = void 0; + while (parentPath = path.parentPath) { + if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { + if (path.key === "test") { + return; + } else { + return parentPath; + } + } else { + path = parentPath; + } + } +} + +function getConditionalAnnotation(path, name) { + var ifStatement = getParentConditionalPath(path); + if (!ifStatement) return; + + var test = ifStatement.get("test"); + var paths = [test]; + var types = []; + + do { + var _path = paths.shift().resolve(); + + if (_path.isLogicalExpression()) { + paths.push(_path.get("left")); + paths.push(_path.get("right")); + } + + if (_path.isBinaryExpression()) { + var type = inferAnnotationFromBinaryExpression(name, _path); + if (type) types.push(type); + } + } while (paths.length); + + if (types.length) { + return { + typeAnnotation: t.createUnionTypeAnnotation(types), + ifStatement: ifStatement + }; + } else { + return getConditionalAnnotation(ifStatement, name); + } +} +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/inference/inferers.js b/socket/node_modules/babel-traverse/lib/path/inference/inferers.js new file mode 100644 index 0000000..ecce2b4 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/inference/inferers.js @@ -0,0 +1,195 @@ +"use strict"; + +exports.__esModule = true; +exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = exports.Identifier = undefined; + +var _infererReference = require("./inferer-reference"); + +Object.defineProperty(exports, "Identifier", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_infererReference).default; + } +}); +exports.VariableDeclarator = VariableDeclarator; +exports.TypeCastExpression = TypeCastExpression; +exports.NewExpression = NewExpression; +exports.TemplateLiteral = TemplateLiteral; +exports.UnaryExpression = UnaryExpression; +exports.BinaryExpression = BinaryExpression; +exports.LogicalExpression = LogicalExpression; +exports.ConditionalExpression = ConditionalExpression; +exports.SequenceExpression = SequenceExpression; +exports.AssignmentExpression = AssignmentExpression; +exports.UpdateExpression = UpdateExpression; +exports.StringLiteral = StringLiteral; +exports.NumericLiteral = NumericLiteral; +exports.BooleanLiteral = BooleanLiteral; +exports.NullLiteral = NullLiteral; +exports.RegExpLiteral = RegExpLiteral; +exports.ObjectExpression = ObjectExpression; +exports.ArrayExpression = ArrayExpression; +exports.RestElement = RestElement; +exports.CallExpression = CallExpression; +exports.TaggedTemplateExpression = TaggedTemplateExpression; + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function VariableDeclarator() { + var id = this.get("id"); + + if (id.isIdentifier()) { + return this.get("init").getTypeAnnotation(); + } else { + return; + } +} + +function TypeCastExpression(node) { + return node.typeAnnotation; +} + +TypeCastExpression.validParent = true; + +function NewExpression(node) { + if (this.get("callee").isIdentifier()) { + return t.genericTypeAnnotation(node.callee); + } +} + +function TemplateLiteral() { + return t.stringTypeAnnotation(); +} + +function UnaryExpression(node) { + var operator = node.operator; + + if (operator === "void") { + return t.voidTypeAnnotation(); + } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) { + return t.numberTypeAnnotation(); + } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) { + return t.stringTypeAnnotation(); + } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) { + return t.booleanTypeAnnotation(); + } +} + +function BinaryExpression(node) { + var operator = node.operator; + + if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { + return t.numberTypeAnnotation(); + } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { + return t.booleanTypeAnnotation(); + } else if (operator === "+") { + var right = this.get("right"); + var left = this.get("left"); + + if (left.isBaseType("number") && right.isBaseType("number")) { + return t.numberTypeAnnotation(); + } else if (left.isBaseType("string") || right.isBaseType("string")) { + return t.stringTypeAnnotation(); + } + + return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]); + } +} + +function LogicalExpression() { + return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]); +} + +function ConditionalExpression() { + return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]); +} + +function SequenceExpression() { + return this.get("expressions").pop().getTypeAnnotation(); +} + +function AssignmentExpression() { + return this.get("right").getTypeAnnotation(); +} + +function UpdateExpression(node) { + var operator = node.operator; + if (operator === "++" || operator === "--") { + return t.numberTypeAnnotation(); + } +} + +function StringLiteral() { + return t.stringTypeAnnotation(); +} + +function NumericLiteral() { + return t.numberTypeAnnotation(); +} + +function BooleanLiteral() { + return t.booleanTypeAnnotation(); +} + +function NullLiteral() { + return t.nullLiteralTypeAnnotation(); +} + +function RegExpLiteral() { + return t.genericTypeAnnotation(t.identifier("RegExp")); +} + +function ObjectExpression() { + return t.genericTypeAnnotation(t.identifier("Object")); +} + +function ArrayExpression() { + return t.genericTypeAnnotation(t.identifier("Array")); +} + +function RestElement() { + return ArrayExpression(); +} + +RestElement.validParent = true; + +function Func() { + return t.genericTypeAnnotation(t.identifier("Function")); +} + +exports.FunctionExpression = Func; +exports.ArrowFunctionExpression = Func; +exports.FunctionDeclaration = Func; +exports.ClassExpression = Func; +exports.ClassDeclaration = Func; +function CallExpression() { + return resolveCall(this.get("callee")); +} + +function TaggedTemplateExpression() { + return resolveCall(this.get("tag")); +} + +function resolveCall(callee) { + callee = callee.resolve(); + + if (callee.isFunction()) { + if (callee.is("async")) { + if (callee.is("generator")) { + return t.genericTypeAnnotation(t.identifier("AsyncIterator")); + } else { + return t.genericTypeAnnotation(t.identifier("Promise")); + } + } else { + if (callee.node.returnType) { + return callee.node.returnType; + } else {} + } + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/introspection.js b/socket/node_modules/babel-traverse/lib/path/introspection.js new file mode 100644 index 0000000..27be039 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/introspection.js @@ -0,0 +1,386 @@ +"use strict"; + +exports.__esModule = true; +exports.is = undefined; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.matchesPattern = matchesPattern; +exports.has = has; +exports.isStatic = isStatic; +exports.isnt = isnt; +exports.equals = equals; +exports.isNodeType = isNodeType; +exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression; +exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement; +exports.isCompletionRecord = isCompletionRecord; +exports.isStatementOrBlock = isStatementOrBlock; +exports.referencesImport = referencesImport; +exports.getSource = getSource; +exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore; +exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo; +exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions; +exports.resolve = resolve; +exports._resolve = _resolve; + +var _includes = require("lodash/includes"); + +var _includes2 = _interopRequireDefault(_includes); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function matchesPattern(pattern, allowPartial) { + if (!this.isMemberExpression()) return false; + + var parts = pattern.split("."); + var search = [this.node]; + var i = 0; + + function matches(name) { + var part = parts[i]; + return part === "*" || name === part; + } + + while (search.length) { + var node = search.shift(); + + if (allowPartial && i === parts.length) { + return true; + } + + if (t.isIdentifier(node)) { + if (!matches(node.name)) return false; + } else if (t.isLiteral(node)) { + if (!matches(node.value)) return false; + } else if (t.isMemberExpression(node)) { + if (node.computed && !t.isLiteral(node.property)) { + return false; + } else { + search.unshift(node.property); + search.unshift(node.object); + continue; + } + } else if (t.isThisExpression(node)) { + if (!matches("this")) return false; + } else { + return false; + } + + if (++i > parts.length) { + return false; + } + } + + return i === parts.length; +} + +function has(key) { + var val = this.node && this.node[key]; + if (val && Array.isArray(val)) { + return !!val.length; + } else { + return !!val; + } +} + +function isStatic() { + return this.scope.isStatic(this.node); +} + +var is = exports.is = has; + +function isnt(key) { + return !this.has(key); +} + +function equals(key, value) { + return this.node[key] === value; +} + +function isNodeType(type) { + return t.isType(this.type, type); +} + +function canHaveVariableDeclarationOrExpression() { + return (this.key === "init" || this.key === "left") && this.parentPath.isFor(); +} + +function canSwapBetweenExpressionAndStatement(replacement) { + if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) { + return false; + } + + if (this.isExpression()) { + return t.isBlockStatement(replacement); + } else if (this.isBlockStatement()) { + return t.isExpression(replacement); + } + + return false; +} + +function isCompletionRecord(allowInsideFunction) { + var path = this; + var first = true; + + do { + var container = path.container; + + if (path.isFunction() && !first) { + return !!allowInsideFunction; + } + + first = false; + + if (Array.isArray(container) && path.key !== container.length - 1) { + return false; + } + } while ((path = path.parentPath) && !path.isProgram()); + + return true; +} + +function isStatementOrBlock() { + if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) { + return false; + } else { + return (0, _includes2.default)(t.STATEMENT_OR_BLOCK_KEYS, this.key); + } +} + +function referencesImport(moduleSource, importName) { + if (!this.isReferencedIdentifier()) return false; + + var binding = this.scope.getBinding(this.node.name); + if (!binding || binding.kind !== "module") return false; + + var path = binding.path; + var parent = path.parentPath; + if (!parent.isImportDeclaration()) return false; + + if (parent.node.source.value === moduleSource) { + if (!importName) return true; + } else { + return false; + } + + if (path.isImportDefaultSpecifier() && importName === "default") { + return true; + } + + if (path.isImportNamespaceSpecifier() && importName === "*") { + return true; + } + + if (path.isImportSpecifier() && path.node.imported.name === importName) { + return true; + } + + return false; +} + +function getSource() { + var node = this.node; + if (node.end) { + return this.hub.file.code.slice(node.start, node.end); + } else { + return ""; + } +} + +function willIMaybeExecuteBefore(target) { + return this._guessExecutionStatusRelativeTo(target) !== "after"; +} + +function _guessExecutionStatusRelativeTo(target) { + var targetFuncParent = target.scope.getFunctionParent(); + var selfFuncParent = this.scope.getFunctionParent(); + + if (targetFuncParent.node !== selfFuncParent.node) { + var status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent); + if (status) { + return status; + } else { + target = targetFuncParent.path; + } + } + + var targetPaths = target.getAncestry(); + if (targetPaths.indexOf(this) >= 0) return "after"; + + var selfPaths = this.getAncestry(); + + var commonPath = void 0; + var targetIndex = void 0; + var selfIndex = void 0; + for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) { + var selfPath = selfPaths[selfIndex]; + targetIndex = targetPaths.indexOf(selfPath); + if (targetIndex >= 0) { + commonPath = selfPath; + break; + } + } + if (!commonPath) { + return "before"; + } + + var targetRelationship = targetPaths[targetIndex - 1]; + var selfRelationship = selfPaths[selfIndex - 1]; + if (!targetRelationship || !selfRelationship) { + return "before"; + } + + if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) { + return targetRelationship.key > selfRelationship.key ? "before" : "after"; + } + + var targetKeyPosition = t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key); + var selfKeyPosition = t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key); + return targetKeyPosition > selfKeyPosition ? "before" : "after"; +} + +function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) { + var targetFuncPath = targetFuncParent.path; + if (!targetFuncPath.isFunctionDeclaration()) return; + + var binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name); + + if (!binding.references) return "before"; + + var referencePaths = binding.referencePaths; + + for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var path = _ref; + + if (path.key !== "callee" || !path.parentPath.isCallExpression()) { + return; + } + } + + var allStatus = void 0; + + for (var _iterator2 = referencePaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _path = _ref2; + + var childOfFunction = !!_path.find(function (path) { + return path.node === targetFuncPath.node; + }); + if (childOfFunction) continue; + + var status = this._guessExecutionStatusRelativeTo(_path); + + if (allStatus) { + if (allStatus !== status) return; + } else { + allStatus = status; + } + } + + return allStatus; +} + +function resolve(dangerous, resolved) { + return this._resolve(dangerous, resolved) || this; +} + +function _resolve(dangerous, resolved) { + if (resolved && resolved.indexOf(this) >= 0) return; + + resolved = resolved || []; + resolved.push(this); + + if (this.isVariableDeclarator()) { + if (this.get("id").isIdentifier()) { + return this.get("init").resolve(dangerous, resolved); + } else {} + } else if (this.isReferencedIdentifier()) { + var binding = this.scope.getBinding(this.node.name); + if (!binding) return; + + if (!binding.constant) return; + + if (binding.kind === "module") return; + + if (binding.path !== this) { + var ret = binding.path.resolve(dangerous, resolved); + + if (this.find(function (parent) { + return parent.node === ret.node; + })) return; + return ret; + } + } else if (this.isTypeCastExpression()) { + return this.get("expression").resolve(dangerous, resolved); + } else if (dangerous && this.isMemberExpression()) { + + var targetKey = this.toComputedKey(); + if (!t.isLiteral(targetKey)) return; + + var targetName = targetKey.value; + + var target = this.get("object").resolve(dangerous, resolved); + + if (target.isObjectExpression()) { + var props = target.get("properties"); + for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var prop = _ref3; + + if (!prop.isProperty()) continue; + + var key = prop.get("key"); + + var match = prop.isnt("computed") && key.isIdentifier({ name: targetName }); + + match = match || key.isLiteral({ value: targetName }); + + if (match) return prop.get("value").resolve(dangerous, resolved); + } + } else if (target.isArrayExpression() && !isNaN(+targetName)) { + var elems = target.get("elements"); + var elem = elems[targetName]; + if (elem) return elem.resolve(dangerous, resolved); + } + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/lib/hoister.js b/socket/node_modules/babel-traverse/lib/path/lib/hoister.js new file mode 100644 index 0000000..7e4e8be --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/lib/hoister.js @@ -0,0 +1,211 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var referenceVisitor = { + ReferencedIdentifier: function ReferencedIdentifier(path, state) { + if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) { + return; + } + + if (path.node.name === "this") { + var scope = path.scope; + do { + if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break; + } while (scope = scope.parent); + if (scope) state.breakOnScopePaths.push(scope.path); + } + + var binding = path.scope.getBinding(path.node.name); + if (!binding) return; + + if (binding !== state.scope.getBinding(path.node.name)) return; + + state.bindings[path.node.name] = binding; + } +}; + +var PathHoister = function () { + function PathHoister(path, scope) { + (0, _classCallCheck3.default)(this, PathHoister); + + this.breakOnScopePaths = []; + + this.bindings = {}; + + this.scopes = []; + + this.scope = scope; + this.path = path; + + this.attachAfter = false; + } + + PathHoister.prototype.isCompatibleScope = function isCompatibleScope(scope) { + for (var key in this.bindings) { + var binding = this.bindings[key]; + if (!scope.bindingIdentifierEquals(key, binding.identifier)) { + return false; + } + } + + return true; + }; + + PathHoister.prototype.getCompatibleScopes = function getCompatibleScopes() { + var scope = this.path.scope; + do { + if (this.isCompatibleScope(scope)) { + this.scopes.push(scope); + } else { + break; + } + + if (this.breakOnScopePaths.indexOf(scope.path) >= 0) { + break; + } + } while (scope = scope.parent); + }; + + PathHoister.prototype.getAttachmentPath = function getAttachmentPath() { + var path = this._getAttachmentPath(); + if (!path) return; + + var targetScope = path.scope; + + if (targetScope.path === path) { + targetScope = path.scope.parent; + } + + if (targetScope.path.isProgram() || targetScope.path.isFunction()) { + for (var name in this.bindings) { + if (!targetScope.hasOwnBinding(name)) continue; + + var binding = this.bindings[name]; + + if (binding.kind === "param") continue; + + if (this.getAttachmentParentForPath(binding.path).key > path.key) { + this.attachAfter = true; + path = binding.path; + + for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var violationPath = _ref; + + if (this.getAttachmentParentForPath(violationPath).key > path.key) { + path = violationPath; + } + } + } + } + } + + if (path.parentPath.isExportDeclaration()) { + path = path.parentPath; + } + + return path; + }; + + PathHoister.prototype._getAttachmentPath = function _getAttachmentPath() { + var scopes = this.scopes; + + var scope = scopes.pop(); + + if (!scope) return; + + if (scope.path.isFunction()) { + if (this.hasOwnParamBindings(scope)) { + if (this.scope === scope) return; + + return scope.path.get("body").get("body")[0]; + } else { + return this.getNextScopeAttachmentParent(); + } + } else if (scope.path.isProgram()) { + return this.getNextScopeAttachmentParent(); + } + }; + + PathHoister.prototype.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() { + var scope = this.scopes.pop(); + if (scope) return this.getAttachmentParentForPath(scope.path); + }; + + PathHoister.prototype.getAttachmentParentForPath = function getAttachmentParentForPath(path) { + do { + if (!path.parentPath || Array.isArray(path.container) && path.isStatement() || path.isVariableDeclarator() && path.parentPath.node !== null && path.parentPath.node.declarations.length > 1) return path; + } while (path = path.parentPath); + }; + + PathHoister.prototype.hasOwnParamBindings = function hasOwnParamBindings(scope) { + for (var name in this.bindings) { + if (!scope.hasOwnBinding(name)) continue; + + var binding = this.bindings[name]; + + if (binding.kind === "param" && binding.constant) return true; + } + return false; + }; + + PathHoister.prototype.run = function run() { + var node = this.path.node; + if (node._hoisted) return; + node._hoisted = true; + + this.path.traverse(referenceVisitor, this); + + this.getCompatibleScopes(); + + var attachTo = this.getAttachmentPath(); + if (!attachTo) return; + + if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return; + + var uid = attachTo.scope.generateUidIdentifier("ref"); + var declarator = t.variableDeclarator(uid, this.path.node); + + var insertFn = this.attachAfter ? "insertAfter" : "insertBefore"; + attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]); + + var parent = this.path.parentPath; + if (parent.isJSXElement() && this.path.container === parent.node.children) { + uid = t.JSXExpressionContainer(uid); + } + + this.path.replaceWith(uid); + }; + + return PathHoister; +}(); + +exports.default = PathHoister; +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/lib/removal-hooks.js b/socket/node_modules/babel-traverse/lib/path/lib/removal-hooks.js new file mode 100644 index 0000000..6058ec1 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/lib/removal-hooks.js @@ -0,0 +1,33 @@ +"use strict"; + +exports.__esModule = true; +var hooks = exports.hooks = [function (self, parent) { + var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement(); + + if (removeParent) { + parent.remove(); + return true; + } +}, function (self, parent) { + if (parent.isSequenceExpression() && parent.node.expressions.length === 1) { + parent.replaceWith(parent.node.expressions[0]); + return true; + } +}, function (self, parent) { + if (parent.isBinary()) { + if (self.key === "left") { + parent.replaceWith(parent.node.right); + } else { + parent.replaceWith(parent.node.left); + } + return true; + } +}, function (self, parent) { + if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { + self.replaceWith({ + type: "BlockStatement", + body: [] + }); + return true; + } +}]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/lib/virtual-types.js b/socket/node_modules/babel-traverse/lib/path/lib/virtual-types.js new file mode 100644 index 0000000..80bb5b9 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/lib/virtual-types.js @@ -0,0 +1,141 @@ +"use strict"; + +exports.__esModule = true; +exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = undefined; + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var ReferencedIdentifier = exports.ReferencedIdentifier = { + types: ["Identifier", "JSXIdentifier"], + checkPath: function checkPath(_ref, opts) { + var node = _ref.node, + parent = _ref.parent; + + if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) { + if (t.isJSXIdentifier(node, opts)) { + if (_babelTypes.react.isCompatTag(node.name)) return false; + } else { + return false; + } + } + + return t.isReferenced(node, parent); + } +}; + +var ReferencedMemberExpression = exports.ReferencedMemberExpression = { + types: ["MemberExpression"], + checkPath: function checkPath(_ref2) { + var node = _ref2.node, + parent = _ref2.parent; + + return t.isMemberExpression(node) && t.isReferenced(node, parent); + } +}; + +var BindingIdentifier = exports.BindingIdentifier = { + types: ["Identifier"], + checkPath: function checkPath(_ref3) { + var node = _ref3.node, + parent = _ref3.parent; + + return t.isIdentifier(node) && t.isBinding(node, parent); + } +}; + +var Statement = exports.Statement = { + types: ["Statement"], + checkPath: function checkPath(_ref4) { + var node = _ref4.node, + parent = _ref4.parent; + + if (t.isStatement(node)) { + if (t.isVariableDeclaration(node)) { + if (t.isForXStatement(parent, { left: node })) return false; + if (t.isForStatement(parent, { init: node })) return false; + } + + return true; + } else { + return false; + } + } +}; + +var Expression = exports.Expression = { + types: ["Expression"], + checkPath: function checkPath(path) { + if (path.isIdentifier()) { + return path.isReferencedIdentifier(); + } else { + return t.isExpression(path.node); + } + } +}; + +var Scope = exports.Scope = { + types: ["Scopable"], + checkPath: function checkPath(path) { + return t.isScope(path.node, path.parent); + } +}; + +var Referenced = exports.Referenced = { + checkPath: function checkPath(path) { + return t.isReferenced(path.node, path.parent); + } +}; + +var BlockScoped = exports.BlockScoped = { + checkPath: function checkPath(path) { + return t.isBlockScoped(path.node); + } +}; + +var Var = exports.Var = { + types: ["VariableDeclaration"], + checkPath: function checkPath(path) { + return t.isVar(path.node); + } +}; + +var User = exports.User = { + checkPath: function checkPath(path) { + return path.node && !!path.node.loc; + } +}; + +var Generated = exports.Generated = { + checkPath: function checkPath(path) { + return !path.isUser(); + } +}; + +var Pure = exports.Pure = { + checkPath: function checkPath(path, opts) { + return path.scope.isPure(path.node, opts); + } +}; + +var Flow = exports.Flow = { + types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], + checkPath: function checkPath(_ref5) { + var node = _ref5.node; + + if (t.isFlow(node)) { + return true; + } else if (t.isImportDeclaration(node)) { + return node.importKind === "type" || node.importKind === "typeof"; + } else if (t.isExportDeclaration(node)) { + return node.exportKind === "type"; + } else if (t.isImportSpecifier(node)) { + return node.importKind === "type" || node.importKind === "typeof"; + } else { + return false; + } + } +}; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/modification.js b/socket/node_modules/babel-traverse/lib/path/modification.js new file mode 100644 index 0000000..30fb165 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/modification.js @@ -0,0 +1,264 @@ +"use strict"; + +exports.__esModule = true; + +var _typeof2 = require("babel-runtime/helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.insertBefore = insertBefore; +exports._containerInsert = _containerInsert; +exports._containerInsertBefore = _containerInsertBefore; +exports._containerInsertAfter = _containerInsertAfter; +exports._maybePopFromStatements = _maybePopFromStatements; +exports.insertAfter = insertAfter; +exports.updateSiblingKeys = updateSiblingKeys; +exports._verifyNodeList = _verifyNodeList; +exports.unshiftContainer = unshiftContainer; +exports.pushContainer = pushContainer; +exports.hoist = hoist; + +var _cache = require("../cache"); + +var _hoister = require("./lib/hoister"); + +var _hoister2 = _interopRequireDefault(_hoister); + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function insertBefore(nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + + if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) { + return this.parentPath.insertBefore(nodes); + } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") { + if (this.node) nodes.push(this.node); + this.replaceExpressionWithStatements(nodes); + } else { + this._maybePopFromStatements(nodes); + if (Array.isArray(this.container)) { + return this._containerInsertBefore(nodes); + } else if (this.isStatementOrBlock()) { + if (this.node) nodes.push(this.node); + this._replaceWith(t.blockStatement(nodes)); + } else { + throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); + } + } + + return [this]; +} + +function _containerInsert(from, nodes) { + this.updateSiblingKeys(from, nodes.length); + + var paths = []; + + for (var i = 0; i < nodes.length; i++) { + var to = from + i; + var node = nodes[i]; + this.container.splice(to, 0, node); + + if (this.context) { + var path = this.context.create(this.parent, this.container, to, this.listKey); + + if (this.context.queue) path.pushContext(this.context); + paths.push(path); + } else { + paths.push(_index2.default.get({ + parentPath: this.parentPath, + parent: this.parent, + container: this.container, + listKey: this.listKey, + key: to + })); + } + } + + var contexts = this._getQueueContexts(); + + for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _path = _ref; + + _path.setScope(); + _path.debug(function () { + return "Inserted."; + }); + + for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var context = _ref2; + + context.maybeQueue(_path, true); + } + } + + return paths; +} + +function _containerInsertBefore(nodes) { + return this._containerInsert(this.key, nodes); +} + +function _containerInsertAfter(nodes) { + return this._containerInsert(this.key + 1, nodes); +} + +function _maybePopFromStatements(nodes) { + var last = nodes[nodes.length - 1]; + var isIdentifier = t.isIdentifier(last) || t.isExpressionStatement(last) && t.isIdentifier(last.expression); + + if (isIdentifier && !this.isCompletionRecord()) { + nodes.pop(); + } +} + +function insertAfter(nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + + if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) { + return this.parentPath.insertAfter(nodes); + } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") { + if (this.node) { + var temp = this.scope.generateDeclaredUidIdentifier(); + nodes.unshift(t.expressionStatement(t.assignmentExpression("=", temp, this.node))); + nodes.push(t.expressionStatement(temp)); + } + this.replaceExpressionWithStatements(nodes); + } else { + this._maybePopFromStatements(nodes); + if (Array.isArray(this.container)) { + return this._containerInsertAfter(nodes); + } else if (this.isStatementOrBlock()) { + if (this.node) nodes.unshift(this.node); + this._replaceWith(t.blockStatement(nodes)); + } else { + throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); + } + } + + return [this]; +} + +function updateSiblingKeys(fromIndex, incrementBy) { + if (!this.parent) return; + + var paths = _cache.path.get(this.parent); + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (path.key >= fromIndex) { + path.key += incrementBy; + } + } +} + +function _verifyNodeList(nodes) { + if (!nodes) { + return []; + } + + if (nodes.constructor !== Array) { + nodes = [nodes]; + } + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var msg = void 0; + + if (!node) { + msg = "has falsy node"; + } else if ((typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node)) !== "object") { + msg = "contains a non-object node"; + } else if (!node.type) { + msg = "without a type"; + } else if (node instanceof _index2.default) { + msg = "has a NodePath when it expected a raw object"; + } + + if (msg) { + var type = Array.isArray(node) ? "array" : typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node); + throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type); + } + } + + return nodes; +} + +function unshiftContainer(listKey, nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + + var path = _index2.default.get({ + parentPath: this, + parent: this.node, + container: this.node[listKey], + listKey: listKey, + key: 0 + }); + + return path.insertBefore(nodes); +} + +function pushContainer(listKey, nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + + var container = this.node[listKey]; + var path = _index2.default.get({ + parentPath: this, + parent: this.node, + container: container, + listKey: listKey, + key: container.length + }); + + return path.replaceWithMultiple(nodes); +} + +function hoist() { + var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.scope; + + var hoister = new _hoister2.default(this, scope); + return hoister.run(); +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/removal.js b/socket/node_modules/babel-traverse/lib/path/removal.js new file mode 100644 index 0000000..04f3147 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/removal.js @@ -0,0 +1,72 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.remove = remove; +exports._callRemovalHooks = _callRemovalHooks; +exports._remove = _remove; +exports._markRemoved = _markRemoved; +exports._assertUnremoved = _assertUnremoved; + +var _removalHooks = require("./lib/removal-hooks"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function remove() { + this._assertUnremoved(); + + this.resync(); + + if (this._callRemovalHooks()) { + this._markRemoved(); + return; + } + + this.shareCommentsWithSiblings(); + this._remove(); + this._markRemoved(); +} + +function _callRemovalHooks() { + for (var _iterator = _removalHooks.hooks, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var fn = _ref; + + if (fn(this, this.parentPath)) return true; + } +} + +function _remove() { + if (Array.isArray(this.container)) { + this.container.splice(this.key, 1); + this.updateSiblingKeys(this.key, -1); + } else { + this._replaceWith(null); + } +} + +function _markRemoved() { + this.shouldSkip = true; + this.removed = true; + this.node = null; +} + +function _assertUnremoved() { + if (this.removed) { + throw this.buildCodeFrameError("NodePath has been removed so is read-only."); + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/path/replacement.js b/socket/node_modules/babel-traverse/lib/path/replacement.js new file mode 100644 index 0000000..411dacf --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/path/replacement.js @@ -0,0 +1,268 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.replaceWithMultiple = replaceWithMultiple; +exports.replaceWithSourceString = replaceWithSourceString; +exports.replaceWith = replaceWith; +exports._replaceWith = _replaceWith; +exports.replaceExpressionWithStatements = replaceExpressionWithStatements; +exports.replaceInline = replaceInline; + +var _babelCodeFrame = require("babel-code-frame"); + +var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame); + +var _index = require("../index"); + +var _index2 = _interopRequireDefault(_index); + +var _index3 = require("./index"); + +var _index4 = _interopRequireDefault(_index3); + +var _babylon = require("babylon"); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hoistVariablesVisitor = { + Function: function Function(path) { + path.skip(); + }, + VariableDeclaration: function VariableDeclaration(path) { + if (path.node.kind !== "var") return; + + var bindings = path.getBindingIdentifiers(); + for (var key in bindings) { + path.scope.push({ id: bindings[key] }); + } + + var exprs = []; + + for (var _iterator = path.node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var declar = _ref; + + if (declar.init) { + exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init))); + } + } + + path.replaceWithMultiple(exprs); + } +}; + +function replaceWithMultiple(nodes) { + this.resync(); + + nodes = this._verifyNodeList(nodes); + t.inheritLeadingComments(nodes[0], this.node); + t.inheritTrailingComments(nodes[nodes.length - 1], this.node); + this.node = this.container[this.key] = null; + this.insertAfter(nodes); + + if (this.node) { + this.requeue(); + } else { + this.remove(); + } +} + +function replaceWithSourceString(replacement) { + this.resync(); + + try { + replacement = "(" + replacement + ")"; + replacement = (0, _babylon.parse)(replacement); + } catch (err) { + var loc = err.loc; + if (loc) { + err.message += " - make sure this is an expression."; + err.message += "\n" + (0, _babelCodeFrame2.default)(replacement, loc.line, loc.column + 1); + } + throw err; + } + + replacement = replacement.program.body[0].expression; + _index2.default.removeProperties(replacement); + return this.replaceWith(replacement); +} + +function replaceWith(replacement) { + this.resync(); + + if (this.removed) { + throw new Error("You can't replace this node, we've already removed it"); + } + + if (replacement instanceof _index4.default) { + replacement = replacement.node; + } + + if (!replacement) { + throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); + } + + if (this.node === replacement) { + return; + } + + if (this.isProgram() && !t.isProgram(replacement)) { + throw new Error("You can only replace a Program root node with another Program node"); + } + + if (Array.isArray(replacement)) { + throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); + } + + if (typeof replacement === "string") { + throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); + } + + if (this.isNodeType("Statement") && t.isExpression(replacement)) { + if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) { + replacement = t.expressionStatement(replacement); + } + } + + if (this.isNodeType("Expression") && t.isStatement(replacement)) { + if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { + return this.replaceExpressionWithStatements([replacement]); + } + } + + var oldNode = this.node; + if (oldNode) { + t.inheritsComments(replacement, oldNode); + t.removeComments(oldNode); + } + + this._replaceWith(replacement); + this.type = replacement.type; + + this.setScope(); + + this.requeue(); +} + +function _replaceWith(node) { + if (!this.container) { + throw new ReferenceError("Container is falsy"); + } + + if (this.inList) { + t.validate(this.parent, this.key, [node]); + } else { + t.validate(this.parent, this.key, node); + } + + this.debug(function () { + return "Replace with " + (node && node.type); + }); + + this.node = this.container[this.key] = node; +} + +function replaceExpressionWithStatements(nodes) { + this.resync(); + + var toSequenceExpression = t.toSequenceExpression(nodes, this.scope); + + if (t.isSequenceExpression(toSequenceExpression)) { + var exprs = toSequenceExpression.expressions; + + if (exprs.length >= 2 && this.parentPath.isExpressionStatement()) { + this._maybePopFromStatements(exprs); + } + + if (exprs.length === 1) { + this.replaceWith(exprs[0]); + } else { + this.replaceWith(toSequenceExpression); + } + } else if (toSequenceExpression) { + this.replaceWith(toSequenceExpression); + } else { + var container = t.functionExpression(null, [], t.blockStatement(nodes)); + container.shadow = true; + + this.replaceWith(t.callExpression(container, [])); + this.traverse(hoistVariablesVisitor); + + var completionRecords = this.get("callee").getCompletionRecords(); + for (var _iterator2 = completionRecords, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var path = _ref2; + + if (!path.isExpressionStatement()) continue; + + var loop = path.findParent(function (path) { + return path.isLoop(); + }); + if (loop) { + var uid = loop.getData("expressionReplacementReturnUid"); + + if (!uid) { + var callee = this.get("callee"); + uid = callee.scope.generateDeclaredUidIdentifier("ret"); + callee.get("body").pushContainer("body", t.returnStatement(uid)); + loop.setData("expressionReplacementReturnUid", uid); + } else { + uid = t.identifier(uid.name); + } + + path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression)); + } else { + path.replaceWith(t.returnStatement(path.node.expression)); + } + } + + return this.node; + } +} + +function replaceInline(nodes) { + this.resync(); + + if (Array.isArray(nodes)) { + if (Array.isArray(this.container)) { + nodes = this._verifyNodeList(nodes); + this._containerInsertAfter(nodes); + return this.remove(); + } else { + return this.replaceWithMultiple(nodes); + } + } else { + return this.replaceWith(nodes); + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/scope/binding.js b/socket/node_modules/babel-traverse/lib/scope/binding.js new file mode 100644 index 0000000..0730cdf --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/scope/binding.js @@ -0,0 +1,82 @@ +"use strict"; + +exports.__esModule = true; + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Binding = function () { + function Binding(_ref) { + var existing = _ref.existing, + identifier = _ref.identifier, + scope = _ref.scope, + path = _ref.path, + kind = _ref.kind; + (0, _classCallCheck3.default)(this, Binding); + + this.identifier = identifier; + this.scope = scope; + this.path = path; + this.kind = kind; + + this.constantViolations = []; + this.constant = true; + + this.referencePaths = []; + this.referenced = false; + this.references = 0; + + this.clearValue(); + + if (existing) { + this.constantViolations = [].concat(existing.path, existing.constantViolations, this.constantViolations); + } + } + + Binding.prototype.deoptValue = function deoptValue() { + this.clearValue(); + this.hasDeoptedValue = true; + }; + + Binding.prototype.setValue = function setValue(value) { + if (this.hasDeoptedValue) return; + this.hasValue = true; + this.value = value; + }; + + Binding.prototype.clearValue = function clearValue() { + this.hasDeoptedValue = false; + this.hasValue = false; + this.value = null; + }; + + Binding.prototype.reassign = function reassign(path) { + this.constant = false; + if (this.constantViolations.indexOf(path) !== -1) { + return; + } + this.constantViolations.push(path); + }; + + Binding.prototype.reference = function reference(path) { + if (this.referencePaths.indexOf(path) !== -1) { + return; + } + this.referenced = true; + this.references++; + this.referencePaths.push(path); + }; + + Binding.prototype.dereference = function dereference() { + this.references--; + this.referenced = !!this.references; + }; + + return Binding; +}(); + +exports.default = Binding; +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/scope/index.js b/socket/node_modules/babel-traverse/lib/scope/index.js new file mode 100644 index 0000000..c91aa6a --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/scope/index.js @@ -0,0 +1,1094 @@ +"use strict"; + +exports.__esModule = true; + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +var _create = require("babel-runtime/core-js/object/create"); + +var _create2 = _interopRequireDefault(_create); + +var _map = require("babel-runtime/core-js/map"); + +var _map2 = _interopRequireDefault(_map); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _includes = require("lodash/includes"); + +var _includes2 = _interopRequireDefault(_includes); + +var _repeat = require("lodash/repeat"); + +var _repeat2 = _interopRequireDefault(_repeat); + +var _renamer = require("./lib/renamer"); + +var _renamer2 = _interopRequireDefault(_renamer); + +var _index = require("../index"); + +var _index2 = _interopRequireDefault(_index); + +var _defaults = require("lodash/defaults"); + +var _defaults2 = _interopRequireDefault(_defaults); + +var _babelMessages = require("babel-messages"); + +var messages = _interopRequireWildcard(_babelMessages); + +var _binding2 = require("./binding"); + +var _binding3 = _interopRequireDefault(_binding2); + +var _globals = require("globals"); + +var _globals2 = _interopRequireDefault(_globals); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +var _cache = require("../cache"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _crawlCallsCount = 0; + +function getCache(path, parentScope, self) { + var scopes = _cache.scope.get(path.node) || []; + + for (var _iterator = scopes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var scope = _ref; + + if (scope.parent === parentScope && scope.path === path) return scope; + } + + scopes.push(self); + + if (!_cache.scope.has(path.node)) { + _cache.scope.set(path.node, scopes); + } +} + +function gatherNodeParts(node, parts) { + if (t.isModuleDeclaration(node)) { + if (node.source) { + gatherNodeParts(node.source, parts); + } else if (node.specifiers && node.specifiers.length) { + for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var specifier = _ref2; + + gatherNodeParts(specifier, parts); + } + } else if (node.declaration) { + gatherNodeParts(node.declaration, parts); + } + } else if (t.isModuleSpecifier(node)) { + gatherNodeParts(node.local, parts); + } else if (t.isMemberExpression(node)) { + gatherNodeParts(node.object, parts); + gatherNodeParts(node.property, parts); + } else if (t.isIdentifier(node)) { + parts.push(node.name); + } else if (t.isLiteral(node)) { + parts.push(node.value); + } else if (t.isCallExpression(node)) { + gatherNodeParts(node.callee, parts); + } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) { + for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var prop = _ref3; + + gatherNodeParts(prop.key || prop.argument, parts); + } + } +} + +var collectorVisitor = { + For: function For(path) { + for (var _iterator4 = t.FOR_INIT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var key = _ref4; + + var declar = path.get(key); + if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar); + } + }, + Declaration: function Declaration(path) { + if (path.isBlockScoped()) return; + + if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) return; + + path.scope.getFunctionParent().registerDeclaration(path); + }, + ReferencedIdentifier: function ReferencedIdentifier(path, state) { + state.references.push(path); + }, + ForXStatement: function ForXStatement(path, state) { + var left = path.get("left"); + if (left.isPattern() || left.isIdentifier()) { + state.constantViolations.push(left); + } + }, + + + ExportDeclaration: { + exit: function exit(path) { + var node = path.node, + scope = path.scope; + + var declar = node.declaration; + if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) { + var _id = declar.id; + if (!_id) return; + + var binding = scope.getBinding(_id.name); + if (binding) binding.reference(path); + } else if (t.isVariableDeclaration(declar)) { + for (var _iterator5 = declar.declarations, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var decl = _ref5; + + var ids = t.getBindingIdentifiers(decl); + for (var name in ids) { + var _binding = scope.getBinding(name); + if (_binding) _binding.reference(path); + } + } + } + } + }, + + LabeledStatement: function LabeledStatement(path) { + path.scope.getProgramParent().addGlobal(path.node); + path.scope.getBlockParent().registerDeclaration(path); + }, + AssignmentExpression: function AssignmentExpression(path, state) { + state.assignments.push(path); + }, + UpdateExpression: function UpdateExpression(path, state) { + state.constantViolations.push(path.get("argument")); + }, + UnaryExpression: function UnaryExpression(path, state) { + if (path.node.operator === "delete") { + state.constantViolations.push(path.get("argument")); + } + }, + BlockScoped: function BlockScoped(path) { + var scope = path.scope; + if (scope.path === path) scope = scope.parent; + scope.getBlockParent().registerDeclaration(path); + }, + ClassDeclaration: function ClassDeclaration(path) { + var id = path.node.id; + if (!id) return; + + var name = id.name; + path.scope.bindings[name] = path.scope.getBinding(name); + }, + Block: function Block(path) { + var paths = path.get("body"); + for (var _iterator6 = paths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var bodyPath = _ref6; + + if (bodyPath.isFunctionDeclaration()) { + path.scope.getBlockParent().registerDeclaration(bodyPath); + } + } + } +}; + +var uid = 0; + +var Scope = function () { + function Scope(path, parentScope) { + (0, _classCallCheck3.default)(this, Scope); + + if (parentScope && parentScope.block === path.node) { + return parentScope; + } + + var cached = getCache(path, parentScope, this); + if (cached) return cached; + + this.uid = uid++; + this.parent = parentScope; + this.hub = path.hub; + + this.parentBlock = path.parent; + this.block = path.node; + this.path = path; + + this.labels = new _map2.default(); + } + + Scope.prototype.traverse = function traverse(node, opts, state) { + (0, _index2.default)(node, opts, this, state, this.path); + }; + + Scope.prototype.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; + + var id = this.generateUidIdentifier(name); + this.push({ id: id }); + return id; + }; + + Scope.prototype.generateUidIdentifier = function generateUidIdentifier() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; + + return t.identifier(this.generateUid(name)); + }; + + Scope.prototype.generateUid = function generateUid() { + var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; + + name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); + + var uid = void 0; + var i = 0; + do { + uid = this._generateUid(name, i); + i++; + } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); + + var program = this.getProgramParent(); + program.references[uid] = true; + program.uids[uid] = true; + + return uid; + }; + + Scope.prototype._generateUid = function _generateUid(name, i) { + var id = name; + if (i > 1) id += i; + return "_" + id; + }; + + Scope.prototype.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) { + var node = parent; + + if (t.isAssignmentExpression(parent)) { + node = parent.left; + } else if (t.isVariableDeclarator(parent)) { + node = parent.id; + } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) { + node = node.key; + } + + var parts = []; + gatherNodeParts(node, parts); + + var id = parts.join("$"); + id = id.replace(/^_/, "") || defaultName || "ref"; + + return this.generateUidIdentifier(id.slice(0, 20)); + }; + + Scope.prototype.isStatic = function isStatic(node) { + if (t.isThisExpression(node) || t.isSuper(node)) { + return true; + } + + if (t.isIdentifier(node)) { + var binding = this.getBinding(node.name); + if (binding) { + return binding.constant; + } else { + return this.hasBinding(node.name); + } + } + + return false; + }; + + Scope.prototype.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) { + if (this.isStatic(node)) { + return null; + } else { + var _id2 = this.generateUidIdentifierBasedOnNode(node); + if (!dontPush) this.push({ id: _id2 }); + return _id2; + } + }; + + Scope.prototype.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) { + if (kind === "param") return; + + if (kind === "hoisted" && local.kind === "let") return; + + var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); + + if (duplicate) { + throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError); + } + }; + + Scope.prototype.rename = function rename(oldName, newName, block) { + var binding = this.getBinding(oldName); + if (binding) { + newName = newName || this.generateUidIdentifier(oldName).name; + return new _renamer2.default(binding, oldName, newName).rename(block); + } + }; + + Scope.prototype._renameFromMap = function _renameFromMap(map, oldName, newName, value) { + if (map[oldName]) { + map[newName] = value; + map[oldName] = null; + } + }; + + Scope.prototype.dump = function dump() { + var sep = (0, _repeat2.default)("-", 60); + console.log(sep); + var scope = this; + do { + console.log("#", scope.block.type); + for (var name in scope.bindings) { + var binding = scope.bindings[name]; + console.log(" -", name, { + constant: binding.constant, + references: binding.references, + violations: binding.constantViolations.length, + kind: binding.kind + }); + } + } while (scope = scope.parent); + console.log(sep); + }; + + Scope.prototype.toArray = function toArray(node, i) { + var file = this.hub.file; + + if (t.isIdentifier(node)) { + var binding = this.getBinding(node.name); + if (binding && binding.constant && binding.path.isGenericType("Array")) return node; + } + + if (t.isArrayExpression(node)) { + return node; + } + + if (t.isIdentifier(node, { name: "arguments" })) { + return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]); + } + + var helperName = "toArray"; + var args = [node]; + if (i === true) { + helperName = "toConsumableArray"; + } else if (i) { + args.push(t.numericLiteral(i)); + helperName = "slicedToArray"; + } + return t.callExpression(file.addHelper(helperName), args); + }; + + Scope.prototype.hasLabel = function hasLabel(name) { + return !!this.getLabel(name); + }; + + Scope.prototype.getLabel = function getLabel(name) { + return this.labels.get(name); + }; + + Scope.prototype.registerLabel = function registerLabel(path) { + this.labels.set(path.node.label.name, path); + }; + + Scope.prototype.registerDeclaration = function registerDeclaration(path) { + if (path.isLabeledStatement()) { + this.registerLabel(path); + } else if (path.isFunctionDeclaration()) { + this.registerBinding("hoisted", path.get("id"), path); + } else if (path.isVariableDeclaration()) { + var declarations = path.get("declarations"); + for (var _iterator7 = declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var declar = _ref7; + + this.registerBinding(path.node.kind, declar); + } + } else if (path.isClassDeclaration()) { + this.registerBinding("let", path); + } else if (path.isImportDeclaration()) { + var specifiers = path.get("specifiers"); + for (var _iterator8 = specifiers, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { + var _ref8; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref8 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref8 = _i8.value; + } + + var specifier = _ref8; + + this.registerBinding("module", specifier); + } + } else if (path.isExportDeclaration()) { + var _declar = path.get("declaration"); + if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) { + this.registerDeclaration(_declar); + } + } else { + this.registerBinding("unknown", path); + } + }; + + Scope.prototype.buildUndefinedNode = function buildUndefinedNode() { + if (this.hasBinding("undefined")) { + return t.unaryExpression("void", t.numericLiteral(0), true); + } else { + return t.identifier("undefined"); + } + }; + + Scope.prototype.registerConstantViolation = function registerConstantViolation(path) { + var ids = path.getBindingIdentifiers(); + for (var name in ids) { + var binding = this.getBinding(name); + if (binding) binding.reassign(path); + } + }; + + Scope.prototype.registerBinding = function registerBinding(kind, path) { + var bindingPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : path; + + if (!kind) throw new ReferenceError("no `kind`"); + + if (path.isVariableDeclaration()) { + var declarators = path.get("declarations"); + for (var _iterator9 = declarators, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { + var _ref9; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref9 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref9 = _i9.value; + } + + var declar = _ref9; + + this.registerBinding(kind, declar); + } + return; + } + + var parent = this.getProgramParent(); + var ids = path.getBindingIdentifiers(true); + + for (var name in ids) { + for (var _iterator10 = ids[name], _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) { + var _ref10; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref10 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref10 = _i10.value; + } + + var _id3 = _ref10; + + var local = this.getOwnBinding(name); + if (local) { + if (local.identifier === _id3) continue; + + this.checkBlockScopedCollisions(local, kind, name, _id3); + } + + if (local && local.path.isFlow()) local = null; + + parent.references[name] = true; + + this.bindings[name] = new _binding3.default({ + identifier: _id3, + existing: local, + scope: this, + path: bindingPath, + kind: kind + }); + } + } + }; + + Scope.prototype.addGlobal = function addGlobal(node) { + this.globals[node.name] = node; + }; + + Scope.prototype.hasUid = function hasUid(name) { + var scope = this; + + do { + if (scope.uids[name]) return true; + } while (scope = scope.parent); + + return false; + }; + + Scope.prototype.hasGlobal = function hasGlobal(name) { + var scope = this; + + do { + if (scope.globals[name]) return true; + } while (scope = scope.parent); + + return false; + }; + + Scope.prototype.hasReference = function hasReference(name) { + var scope = this; + + do { + if (scope.references[name]) return true; + } while (scope = scope.parent); + + return false; + }; + + Scope.prototype.isPure = function isPure(node, constantsOnly) { + if (t.isIdentifier(node)) { + var binding = this.getBinding(node.name); + if (!binding) return false; + if (constantsOnly) return binding.constant; + return true; + } else if (t.isClass(node)) { + if (node.superClass && !this.isPure(node.superClass, constantsOnly)) return false; + return this.isPure(node.body, constantsOnly); + } else if (t.isClassBody(node)) { + for (var _iterator11 = node.body, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, _getIterator3.default)(_iterator11);;) { + var _ref11; + + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref11 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref11 = _i11.value; + } + + var method = _ref11; + + if (!this.isPure(method, constantsOnly)) return false; + } + return true; + } else if (t.isBinary(node)) { + return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); + } else if (t.isArrayExpression(node)) { + for (var _iterator12 = node.elements, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, _getIterator3.default)(_iterator12);;) { + var _ref12; + + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref12 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref12 = _i12.value; + } + + var elem = _ref12; + + if (!this.isPure(elem, constantsOnly)) return false; + } + return true; + } else if (t.isObjectExpression(node)) { + for (var _iterator13 = node.properties, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, _getIterator3.default)(_iterator13);;) { + var _ref13; + + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref13 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref13 = _i13.value; + } + + var prop = _ref13; + + if (!this.isPure(prop, constantsOnly)) return false; + } + return true; + } else if (t.isClassMethod(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + if (node.kind === "get" || node.kind === "set") return false; + return true; + } else if (t.isClassProperty(node) || t.isObjectProperty(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + return this.isPure(node.value, constantsOnly); + } else if (t.isUnaryExpression(node)) { + return this.isPure(node.argument, constantsOnly); + } else { + return t.isPureish(node); + } + }; + + Scope.prototype.setData = function setData(key, val) { + return this.data[key] = val; + }; + + Scope.prototype.getData = function getData(key) { + var scope = this; + do { + var data = scope.data[key]; + if (data != null) return data; + } while (scope = scope.parent); + }; + + Scope.prototype.removeData = function removeData(key) { + var scope = this; + do { + var data = scope.data[key]; + if (data != null) scope.data[key] = null; + } while (scope = scope.parent); + }; + + Scope.prototype.init = function init() { + if (!this.references) this.crawl(); + }; + + Scope.prototype.crawl = function crawl() { + _crawlCallsCount++; + this._crawl(); + _crawlCallsCount--; + }; + + Scope.prototype._crawl = function _crawl() { + var path = this.path; + + this.references = (0, _create2.default)(null); + this.bindings = (0, _create2.default)(null); + this.globals = (0, _create2.default)(null); + this.uids = (0, _create2.default)(null); + this.data = (0, _create2.default)(null); + + if (path.isLoop()) { + for (var _iterator14 = t.FOR_INIT_KEYS, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, _getIterator3.default)(_iterator14);;) { + var _ref14; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref14 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref14 = _i14.value; + } + + var key = _ref14; + + var node = path.get(key); + if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); + } + } + + if (path.isFunctionExpression() && path.has("id")) { + if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { + this.registerBinding("local", path.get("id"), path); + } + } + + if (path.isClassExpression() && path.has("id")) { + if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { + this.registerBinding("local", path); + } + } + + if (path.isFunction()) { + var params = path.get("params"); + for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, _getIterator3.default)(_iterator15);;) { + var _ref15; + + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref15 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref15 = _i15.value; + } + + var param = _ref15; + + this.registerBinding("param", param); + } + } + + if (path.isCatchClause()) { + this.registerBinding("let", path); + } + + var parent = this.getProgramParent(); + if (parent.crawling) return; + + var state = { + references: [], + constantViolations: [], + assignments: [] + }; + + this.crawling = true; + path.traverse(collectorVisitor, state); + this.crawling = false; + + for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, _getIterator3.default)(_iterator16);;) { + var _ref16; + + if (_isArray16) { + if (_i16 >= _iterator16.length) break; + _ref16 = _iterator16[_i16++]; + } else { + _i16 = _iterator16.next(); + if (_i16.done) break; + _ref16 = _i16.value; + } + + var _path = _ref16; + + var ids = _path.getBindingIdentifiers(); + var programParent = void 0; + for (var name in ids) { + if (_path.scope.getBinding(name)) continue; + + programParent = programParent || _path.scope.getProgramParent(); + programParent.addGlobal(ids[name]); + } + + _path.scope.registerConstantViolation(_path); + } + + for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : (0, _getIterator3.default)(_iterator17);;) { + var _ref17; + + if (_isArray17) { + if (_i17 >= _iterator17.length) break; + _ref17 = _iterator17[_i17++]; + } else { + _i17 = _iterator17.next(); + if (_i17.done) break; + _ref17 = _i17.value; + } + + var ref = _ref17; + + var binding = ref.scope.getBinding(ref.node.name); + if (binding) { + binding.reference(ref); + } else { + ref.scope.getProgramParent().addGlobal(ref.node); + } + } + + for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : (0, _getIterator3.default)(_iterator18);;) { + var _ref18; + + if (_isArray18) { + if (_i18 >= _iterator18.length) break; + _ref18 = _iterator18[_i18++]; + } else { + _i18 = _iterator18.next(); + if (_i18.done) break; + _ref18 = _i18.value; + } + + var _path2 = _ref18; + + _path2.scope.registerConstantViolation(_path2); + } + }; + + Scope.prototype.push = function push(opts) { + var path = this.path; + + if (!path.isBlockStatement() && !path.isProgram()) { + path = this.getBlockParent().path; + } + + if (path.isSwitchStatement()) { + path = this.getFunctionParent().path; + } + + if (path.isLoop() || path.isCatchClause() || path.isFunction()) { + t.ensureBlock(path.node); + path = path.get("body"); + } + + var unique = opts.unique; + var kind = opts.kind || "var"; + var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; + + var dataKey = "declaration:" + kind + ":" + blockHoist; + var declarPath = !unique && path.getData(dataKey); + + if (!declarPath) { + var declar = t.variableDeclaration(kind, []); + declar._generated = true; + declar._blockHoist = blockHoist; + + var _path$unshiftContaine = path.unshiftContainer("body", [declar]); + + declarPath = _path$unshiftContaine[0]; + + if (!unique) path.setData(dataKey, declarPath); + } + + var declarator = t.variableDeclarator(opts.id, opts.init); + declarPath.node.declarations.push(declarator); + this.registerBinding(kind, declarPath.get("declarations").pop()); + }; + + Scope.prototype.getProgramParent = function getProgramParent() { + var scope = this; + do { + if (scope.path.isProgram()) { + return scope; + } + } while (scope = scope.parent); + throw new Error("We couldn't find a Function or Program..."); + }; + + Scope.prototype.getFunctionParent = function getFunctionParent() { + var scope = this; + do { + if (scope.path.isFunctionParent()) { + return scope; + } + } while (scope = scope.parent); + throw new Error("We couldn't find a Function or Program..."); + }; + + Scope.prototype.getBlockParent = function getBlockParent() { + var scope = this; + do { + if (scope.path.isBlockParent()) { + return scope; + } + } while (scope = scope.parent); + throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); + }; + + Scope.prototype.getAllBindings = function getAllBindings() { + var ids = (0, _create2.default)(null); + + var scope = this; + do { + (0, _defaults2.default)(ids, scope.bindings); + scope = scope.parent; + } while (scope); + + return ids; + }; + + Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() { + var ids = (0, _create2.default)(null); + + for (var _iterator19 = arguments, _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : (0, _getIterator3.default)(_iterator19);;) { + var _ref19; + + if (_isArray19) { + if (_i19 >= _iterator19.length) break; + _ref19 = _iterator19[_i19++]; + } else { + _i19 = _iterator19.next(); + if (_i19.done) break; + _ref19 = _i19.value; + } + + var kind = _ref19; + + var scope = this; + do { + for (var name in scope.bindings) { + var binding = scope.bindings[name]; + if (binding.kind === kind) ids[name] = binding; + } + scope = scope.parent; + } while (scope); + } + + return ids; + }; + + Scope.prototype.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) { + return this.getBindingIdentifier(name) === node; + }; + + Scope.prototype.warnOnFlowBinding = function warnOnFlowBinding(binding) { + if (_crawlCallsCount === 0 && binding && binding.path.isFlow()) { + console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "); + } + return binding; + }; + + Scope.prototype.getBinding = function getBinding(name) { + var scope = this; + + do { + var binding = scope.getOwnBinding(name); + if (binding) return this.warnOnFlowBinding(binding); + } while (scope = scope.parent); + }; + + Scope.prototype.getOwnBinding = function getOwnBinding(name) { + return this.warnOnFlowBinding(this.bindings[name]); + }; + + Scope.prototype.getBindingIdentifier = function getBindingIdentifier(name) { + var info = this.getBinding(name); + return info && info.identifier; + }; + + Scope.prototype.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) { + var binding = this.bindings[name]; + return binding && binding.identifier; + }; + + Scope.prototype.hasOwnBinding = function hasOwnBinding(name) { + return !!this.getOwnBinding(name); + }; + + Scope.prototype.hasBinding = function hasBinding(name, noGlobals) { + if (!name) return false; + if (this.hasOwnBinding(name)) return true; + if (this.parentHasBinding(name, noGlobals)) return true; + if (this.hasUid(name)) return true; + if (!noGlobals && (0, _includes2.default)(Scope.globals, name)) return true; + if (!noGlobals && (0, _includes2.default)(Scope.contextVariables, name)) return true; + return false; + }; + + Scope.prototype.parentHasBinding = function parentHasBinding(name, noGlobals) { + return this.parent && this.parent.hasBinding(name, noGlobals); + }; + + Scope.prototype.moveBindingTo = function moveBindingTo(name, scope) { + var info = this.getBinding(name); + if (info) { + info.scope.removeOwnBinding(name); + info.scope = scope; + scope.bindings[name] = info; + } + }; + + Scope.prototype.removeOwnBinding = function removeOwnBinding(name) { + delete this.bindings[name]; + }; + + Scope.prototype.removeBinding = function removeBinding(name) { + var info = this.getBinding(name); + if (info) { + info.scope.removeOwnBinding(name); + } + + var scope = this; + do { + if (scope.uids[name]) { + scope.uids[name] = false; + } + } while (scope = scope.parent); + }; + + return Scope; +}(); + +Scope.globals = (0, _keys2.default)(_globals2.default.builtin); +Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; +exports.default = Scope; +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/scope/lib/renamer.js b/socket/node_modules/babel-traverse/lib/scope/lib/renamer.js new file mode 100644 index 0000000..351b4d9 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/scope/lib/renamer.js @@ -0,0 +1,113 @@ +"use strict"; + +exports.__esModule = true; + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _binding = require("../binding"); + +var _binding2 = _interopRequireDefault(_binding); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var renameVisitor = { + ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { + var node = _ref.node; + + if (node.name === state.oldName) { + node.name = state.newName; + } + }, + Scope: function Scope(path, state) { + if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { + path.skip(); + } + }, + "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) { + var ids = path.getOuterBindingIdentifiers(); + + for (var name in ids) { + if (name === state.oldName) ids[name].name = state.newName; + } + } +}; + +var Renamer = function () { + function Renamer(binding, oldName, newName) { + (0, _classCallCheck3.default)(this, Renamer); + + this.newName = newName; + this.oldName = oldName; + this.binding = binding; + } + + Renamer.prototype.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { + var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath; + if (!exportDeclar) return; + + var isDefault = exportDeclar.isExportDefaultDeclaration(); + + if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) { + parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default"); + } + + var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers(); + var specifiers = []; + + for (var name in bindingIdentifiers) { + var localName = name === this.oldName ? this.newName : name; + var exportedName = isDefault ? "default" : name; + specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName))); + } + + if (specifiers.length) { + var aliasDeclar = t.exportNamedDeclaration(null, specifiers); + + if (parentDeclar.isFunctionDeclaration()) { + aliasDeclar._blockHoist = 3; + } + + exportDeclar.insertAfter(aliasDeclar); + exportDeclar.replaceWith(parentDeclar.node); + } + }; + + Renamer.prototype.rename = function rename(block) { + var binding = this.binding, + oldName = this.oldName, + newName = this.newName; + var scope = binding.scope, + path = binding.path; + + + var parentDeclar = path.find(function (path) { + return path.isDeclaration() || path.isFunctionExpression(); + }); + if (parentDeclar) { + this.maybeConvertFromExportDeclaration(parentDeclar); + } + + scope.traverse(block || scope.block, renameVisitor, this); + + if (!block) { + scope.removeOwnBinding(oldName); + scope.bindings[newName] = binding; + this.binding.identifier.name = newName; + } + + if (binding.type === "hoisted") {} + }; + + return Renamer; +}(); + +exports.default = Renamer; +module.exports = exports["default"]; \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/lib/visitors.js b/socket/node_modules/babel-traverse/lib/visitors.js new file mode 100644 index 0000000..dadf5d0 --- /dev/null +++ b/socket/node_modules/babel-traverse/lib/visitors.js @@ -0,0 +1,341 @@ +"use strict"; + +exports.__esModule = true; + +var _typeof2 = require("babel-runtime/helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.explode = explode; +exports.verify = verify; +exports.merge = merge; + +var _virtualTypes = require("./path/lib/virtual-types"); + +var virtualTypes = _interopRequireWildcard(_virtualTypes); + +var _babelMessages = require("babel-messages"); + +var messages = _interopRequireWildcard(_babelMessages); + +var _babelTypes = require("babel-types"); + +var t = _interopRequireWildcard(_babelTypes); + +var _clone = require("lodash/clone"); + +var _clone2 = _interopRequireDefault(_clone); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function explode(visitor) { + if (visitor._exploded) return visitor; + visitor._exploded = true; + + for (var nodeType in visitor) { + if (shouldIgnoreKey(nodeType)) continue; + + var parts = nodeType.split("|"); + if (parts.length === 1) continue; + + var fns = visitor[nodeType]; + delete visitor[nodeType]; + + for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var part = _ref; + + visitor[part] = fns; + } + } + + verify(visitor); + + delete visitor.__esModule; + + ensureEntranceObjects(visitor); + + ensureCallbackArrays(visitor); + + for (var _iterator2 = (0, _keys2.default)(visitor), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _nodeType3 = _ref2; + + if (shouldIgnoreKey(_nodeType3)) continue; + + var wrapper = virtualTypes[_nodeType3]; + if (!wrapper) continue; + + var _fns2 = visitor[_nodeType3]; + for (var type in _fns2) { + _fns2[type] = wrapCheck(wrapper, _fns2[type]); + } + + delete visitor[_nodeType3]; + + if (wrapper.types) { + for (var _iterator4 = wrapper.types, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var _type = _ref4; + + if (visitor[_type]) { + mergePair(visitor[_type], _fns2); + } else { + visitor[_type] = _fns2; + } + } + } else { + mergePair(visitor, _fns2); + } + } + + for (var _nodeType in visitor) { + if (shouldIgnoreKey(_nodeType)) continue; + + var _fns = visitor[_nodeType]; + + var aliases = t.FLIPPED_ALIAS_KEYS[_nodeType]; + + var deprecratedKey = t.DEPRECATED_KEYS[_nodeType]; + if (deprecratedKey) { + console.trace("Visitor defined for " + _nodeType + " but it has been renamed to " + deprecratedKey); + aliases = [deprecratedKey]; + } + + if (!aliases) continue; + + delete visitor[_nodeType]; + + for (var _iterator3 = aliases, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var alias = _ref3; + + var existing = visitor[alias]; + if (existing) { + mergePair(existing, _fns); + } else { + visitor[alias] = (0, _clone2.default)(_fns); + } + } + } + + for (var _nodeType2 in visitor) { + if (shouldIgnoreKey(_nodeType2)) continue; + + ensureCallbackArrays(visitor[_nodeType2]); + } + + return visitor; +} + +function verify(visitor) { + if (visitor._verified) return; + + if (typeof visitor === "function") { + throw new Error(messages.get("traverseVerifyRootFunction")); + } + + for (var nodeType in visitor) { + if (nodeType === "enter" || nodeType === "exit") { + validateVisitorMethods(nodeType, visitor[nodeType]); + } + + if (shouldIgnoreKey(nodeType)) continue; + + if (t.TYPES.indexOf(nodeType) < 0) { + throw new Error(messages.get("traverseVerifyNodeType", nodeType)); + } + + var visitors = visitor[nodeType]; + if ((typeof visitors === "undefined" ? "undefined" : (0, _typeof3.default)(visitors)) === "object") { + for (var visitorKey in visitors) { + if (visitorKey === "enter" || visitorKey === "exit") { + validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]); + } else { + throw new Error(messages.get("traverseVerifyVisitorProperty", nodeType, visitorKey)); + } + } + } + } + + visitor._verified = true; +} + +function validateVisitorMethods(path, val) { + var fns = [].concat(val); + for (var _iterator5 = fns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var fn = _ref5; + + if (typeof fn !== "function") { + throw new TypeError("Non-function found defined in " + path + " with type " + (typeof fn === "undefined" ? "undefined" : (0, _typeof3.default)(fn))); + } + } +} + +function merge(visitors) { + var states = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var wrapper = arguments[2]; + + var rootVisitor = {}; + + for (var i = 0; i < visitors.length; i++) { + var visitor = visitors[i]; + var state = states[i]; + + explode(visitor); + + for (var type in visitor) { + var visitorType = visitor[type]; + + if (state || wrapper) { + visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); + } + + var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; + mergePair(nodeVisitor, visitorType); + } + } + + return rootVisitor; +} + +function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { + var newVisitor = {}; + + var _loop = function _loop(key) { + var fns = oldVisitor[key]; + + if (!Array.isArray(fns)) return "continue"; + + fns = fns.map(function (fn) { + var newFn = fn; + + if (state) { + newFn = function newFn(path) { + return fn.call(state, path, state); + }; + } + + if (wrapper) { + newFn = wrapper(state.key, key, newFn); + } + + return newFn; + }); + + newVisitor[key] = fns; + }; + + for (var key in oldVisitor) { + var _ret = _loop(key); + + if (_ret === "continue") continue; + } + + return newVisitor; +} + +function ensureEntranceObjects(obj) { + for (var key in obj) { + if (shouldIgnoreKey(key)) continue; + + var fns = obj[key]; + if (typeof fns === "function") { + obj[key] = { enter: fns }; + } + } +} + +function ensureCallbackArrays(obj) { + if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; + if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; +} + +function wrapCheck(wrapper, fn) { + var newFn = function newFn(path) { + if (wrapper.checkPath(path)) { + return fn.apply(this, arguments); + } + }; + newFn.toString = function () { + return fn.toString(); + }; + return newFn; +} + +function shouldIgnoreKey(key) { + if (key[0] === "_") return true; + + if (key === "enter" || key === "exit" || key === "shouldSkip") return true; + + if (key === "blacklist" || key === "noScope" || key === "skipKeys") return true; + + return false; +} + +function mergePair(dest, src) { + for (var key in src) { + dest[key] = [].concat(dest[key] || [], src[key]); + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-traverse/node_modules/debug/.coveralls.yml b/socket/node_modules/babel-traverse/node_modules/debug/.coveralls.yml new file mode 100644 index 0000000..20a7068 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/socket/node_modules/babel-traverse/node_modules/debug/.eslintrc b/socket/node_modules/babel-traverse/node_modules/debug/.eslintrc new file mode 100644 index 0000000..8a37ae2 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/.npmignore b/socket/node_modules/babel-traverse/node_modules/debug/.npmignore new file mode 100644 index 0000000..5f60eec --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/.npmignore @@ -0,0 +1,9 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage +bower.json diff --git a/socket/node_modules/babel-traverse/node_modules/debug/.travis.yml b/socket/node_modules/babel-traverse/node_modules/debug/.travis.yml new file mode 100644 index 0000000..6c6090c --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/socket/node_modules/babel-traverse/node_modules/debug/CHANGELOG.md b/socket/node_modules/babel-traverse/node_modules/debug/CHANGELOG.md new file mode 100644 index 0000000..eadaa18 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/CHANGELOG.md @@ -0,0 +1,362 @@ + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/socket/node_modules/babel-traverse/node_modules/debug/LICENSE b/socket/node_modules/babel-traverse/node_modules/debug/LICENSE new file mode 100644 index 0000000..658c933 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +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. + diff --git a/socket/node_modules/babel-traverse/node_modules/debug/Makefile b/socket/node_modules/babel-traverse/node_modules/debug/Makefile new file mode 100644 index 0000000..584da8b --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/socket/node_modules/babel-traverse/node_modules/debug/README.md b/socket/node_modules/babel-traverse/node_modules/debug/README.md new file mode 100644 index 0000000..f67be6b --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/README.md @@ -0,0 +1,312 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny node.js debugging utility modelled after node core's debugging technique. + +**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example _app.js_: + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %s', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example _worker.js_: + +```js +var debug = require('debug')('worker'); + +setInterval(function(){ + debug('doing some work'); +}, 1000); +``` + + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: + + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) + + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) + +#### Windows note + + On Windows the environment variable is set using the `set` command. + + ```cmd + set DEBUG=*,-not_this + ``` + + Note that PowerShell uses different syntax to set environment variables. + + ```cmd + $env:DEBUG = "*,-not_this" + ``` + +Then, run the program to be debugged as usual. + +## Millisecond diff + + When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) + + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) + +## Conventions + + If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". + +## Wildcards + + The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + + You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". + +## Environment Variables + + When running through Node.js, you can set a few environment variables that will + change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + + __Note:__ The environment variables beginning with `DEBUG_` end up being + converted into an Options object that gets used with `%o`/`%O` formatters. + See the Node.js documentation for + [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) + for the complete list. + +## Formatters + + + Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + +### Custom formatters + + You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + +## Browser support + You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), + or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), + if you don't want to build it yourself. + + Debug's enable state is currently persisted by `localStorage`. + Consider the situation shown below where you have `worker:a` and `worker:b`, + and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +#### Web Inspector Colors + + Colors are also enabled on "Web Inspectors" that understand the `%c` formatting + option. These are WebKit web inspectors, Firefox ([since version + 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) + and the Firebug plugin for Firefox (any version). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example _stdout.js_: + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> + +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. diff --git a/socket/node_modules/babel-traverse/node_modules/debug/component.json b/socket/node_modules/babel-traverse/node_modules/debug/component.json new file mode 100644 index 0000000..9de2641 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.9", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/karma.conf.js b/socket/node_modules/babel-traverse/node_modules/debug/karma.conf.js new file mode 100644 index 0000000..103a82d --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/node.js b/socket/node_modules/babel-traverse/node_modules/debug/node.js new file mode 100644 index 0000000..7fc36fe --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/socket/node_modules/babel-traverse/node_modules/debug/package.json b/socket/node_modules/babel-traverse/node_modules/debug/package.json new file mode 100644 index 0000000..20e9a07 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/package.json @@ -0,0 +1,88 @@ +{ + "_from": "debug@^2.6.8", + "_id": "debug@2.6.9", + "_inBundle": false, + "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "_location": "/babel-traverse/debug", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "debug@^2.6.8", + "name": "debug", + "escapedName": "debug", + "rawSpec": "^2.6.8", + "saveSpec": null, + "fetchSpec": "^2.6.8" + }, + "_requiredBy": [ + "/babel-traverse" + ], + "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "_shasum": "5d128515df134ff327e90a4c93f4e077a536341f", + "_spec": "debug@^2.6.8", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-traverse", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "bundleDependencies": false, + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + }, + "contributors": [ + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } + ], + "dependencies": { + "ms": "2.0.0" + }, + "deprecated": false, + "description": "small debugging utility", + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", + "main": "./src/index.js", + "name": "debug", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "version": "2.6.9" +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/src/browser.js b/socket/node_modules/babel-traverse/node_modules/debug/src/browser.js new file mode 100644 index 0000000..7106924 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/src/browser.js @@ -0,0 +1,185 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/src/debug.js b/socket/node_modules/babel-traverse/node_modules/debug/src/debug.js new file mode 100644 index 0000000..6a5e3fc --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/src/index.js b/socket/node_modules/babel-traverse/node_modules/debug/src/index.js new file mode 100644 index 0000000..e12cf4d --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/src/inspector-log.js b/socket/node_modules/babel-traverse/node_modules/debug/src/inspector-log.js new file mode 100644 index 0000000..60ea6c0 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/src/inspector-log.js @@ -0,0 +1,15 @@ +module.exports = inspectorLog; + +// black hole +const nullStream = new (require('stream').Writable)(); +nullStream._write = () => {}; + +/** + * Outputs a `console.log()` to the Node.js Inspector console *only*. + */ +function inspectorLog() { + const stdout = console._stdout; + console._stdout = nullStream; + console.log.apply(console, arguments); + console._stdout = stdout; +} diff --git a/socket/node_modules/babel-traverse/node_modules/debug/src/node.js b/socket/node_modules/babel-traverse/node_modules/debug/src/node.js new file mode 100644 index 0000000..b15109c --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/debug/src/node.js @@ -0,0 +1,248 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); + + obj[prop] = val; + return obj; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n').map(function(str) { + return str.trim() + }).join(' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init (debug) { + debug.inspectOpts = {}; + + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/socket/node_modules/babel-traverse/node_modules/ms/index.js b/socket/node_modules/babel-traverse/node_modules/ms/index.js new file mode 100644 index 0000000..6a522b1 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/socket/node_modules/babel-traverse/node_modules/ms/license.md b/socket/node_modules/babel-traverse/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +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. diff --git a/socket/node_modules/babel-traverse/node_modules/ms/package.json b/socket/node_modules/babel-traverse/node_modules/ms/package.json new file mode 100644 index 0000000..3a72955 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/ms/package.json @@ -0,0 +1,69 @@ +{ + "_from": "ms@2.0.0", + "_id": "ms@2.0.0", + "_inBundle": false, + "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "_location": "/babel-traverse/ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ms@2.0.0", + "name": "ms", + "escapedName": "ms", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/babel-traverse/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "_shasum": "5608aeadfc00be6c2901df5f9861788de0d597c8", + "_spec": "ms@2.0.0", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-traverse/node_modules/debug", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Tiny milisecond conversion utility", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.0.0" +} diff --git a/socket/node_modules/babel-traverse/node_modules/ms/readme.md b/socket/node_modules/babel-traverse/node_modules/ms/readme.md new file mode 100644 index 0000000..84a9974 --- /dev/null +++ b/socket/node_modules/babel-traverse/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/socket/node_modules/babel-traverse/package-lock.json b/socket/node_modules/babel-traverse/package-lock.json new file mode 100644 index 0000000..092c397 --- /dev/null +++ b/socket/node_modules/babel-traverse/package-lock.json @@ -0,0 +1,57 @@ +{ + "name": "babel-traverse", + "version": "6.25.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "requires": { + "loose-envify": "1.3.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } +} diff --git a/socket/node_modules/babel-traverse/package.json b/socket/node_modules/babel-traverse/package.json new file mode 100644 index 0000000..978058b --- /dev/null +++ b/socket/node_modules/babel-traverse/package.json @@ -0,0 +1,56 @@ +{ + "_from": "babel-traverse@^6.24.1", + "_id": "babel-traverse@6.26.0", + "_inBundle": false, + "_integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "_location": "/babel-traverse", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "babel-traverse@^6.24.1", + "name": "babel-traverse", + "escapedName": "babel-traverse", + "rawSpec": "^6.24.1", + "saveSpec": null, + "fetchSpec": "^6.24.1" + }, + "_requiredBy": [ + "/babel-helper-function-name", + "/babel-template" + ], + "_resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "_shasum": "46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee", + "_spec": "babel-traverse@^6.24.1", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-helper-function-name", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "deprecated": false, + "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", + "devDependencies": { + "babel-generator": "^6.26.0" + }, + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "babel-traverse", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-traverse" + }, + "version": "6.26.0" +} diff --git a/socket/node_modules/babel-types/.npmignore b/socket/node_modules/babel-types/.npmignore new file mode 100644 index 0000000..47cdd2c --- /dev/null +++ b/socket/node_modules/babel-types/.npmignore @@ -0,0 +1,3 @@ +src +test +node_modules diff --git a/socket/node_modules/babel-types/README.md b/socket/node_modules/babel-types/README.md new file mode 100644 index 0000000..b0e3f1a --- /dev/null +++ b/socket/node_modules/babel-types/README.md @@ -0,0 +1,2029 @@ +# babel-types + +> This module contains methods for building ASTs manually and for checking the types of AST nodes. + +## Install + +```sh +npm install --save-dev babel-types +``` + +## API + + + +### anyTypeAnnotation +```javascript +t.anyTypeAnnotation() +``` + +See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### arrayExpression +```javascript +t.arrayExpression(elements) +``` + +See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`. + +Aliases: `Expression` + + - `elements`: `Array` (default: `[]`) + +--- + +### arrayPattern +```javascript +t.arrayPattern(elements, typeAnnotation) +``` + +See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`. + +Aliases: `Pattern`, `LVal` + + - `elements`: `Array` (required) + - `typeAnnotation` (required) + - `decorators`: `Array` (default: `null`) + +--- + +### arrayTypeAnnotation +```javascript +t.arrayTypeAnnotation(elementType) +``` + +See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `elementType` (required) + +--- + +### arrowFunctionExpression +```javascript +t.arrowFunctionExpression(params, body, async) +``` + +See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`. + +Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` + + - `params`: `Array` (required) + - `body`: `BlockStatement | Expression` (required) + - `async`: `boolean` (default: `false`) + - `returnType` (default: `null`) + - `typeParameters` (default: `null`) + +--- + +### assignmentExpression +```javascript +t.assignmentExpression(operator, left, right) +``` + +See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`. + +Aliases: `Expression` + + - `operator`: `string` (required) + - `left`: `LVal` (required) + - `right`: `Expression` (required) + +--- + +### assignmentPattern +```javascript +t.assignmentPattern(left, right) +``` + +See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`. + +Aliases: `Pattern`, `LVal` + + - `left`: `Identifier` (required) + - `right`: `Expression` (required) + - `decorators`: `Array` (default: `null`) + +--- + +### awaitExpression +```javascript +t.awaitExpression(argument) +``` + +See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`. + +Aliases: `Expression`, `Terminatorless` + + - `argument`: `Expression` (required) + +--- + +### binaryExpression +```javascript +t.binaryExpression(operator, left, right) +``` + +See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`. + +Aliases: `Binary`, `Expression` + + - `operator`: `'+' | '-' | '/' | '%' | '*' | '**' | '&' | '|' | '>>' | '>>>' | '<<' | '^' | '==' | '===' | '!=' | '!==' | 'in' | 'instanceof' | '>' | '<' | '>=' | '<='` (required) + - `left`: `Expression` (required) + - `right`: `Expression` (required) + +--- + +### bindExpression +```javascript +t.bindExpression(object, callee) +``` + +See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`. + +Aliases: `Expression` + + - `object` (required) + - `callee` (required) + +--- + +### blockStatement +```javascript +t.blockStatement(body, directives) +``` + +See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`. + +Aliases: `Scopable`, `BlockParent`, `Block`, `Statement` + + - `body`: `Array` (required) + - `directives`: `Array` (default: `[]`) + +--- + +### booleanLiteral +```javascript +t.booleanLiteral(value) +``` + +See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`. + +Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` + + - `value`: `boolean` (required) + +--- + +### booleanLiteralTypeAnnotation +```javascript +t.booleanLiteralTypeAnnotation() +``` + +See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + +--- + +### booleanTypeAnnotation +```javascript +t.booleanTypeAnnotation() +``` + +See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### breakStatement +```javascript +t.breakStatement(label) +``` + +See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`. + +Aliases: `Statement`, `Terminatorless`, `CompletionStatement` + + - `label`: `Identifier` (default: `null`) + +--- + +### callExpression +```javascript +t.callExpression(callee, arguments) +``` + +See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`. + +Aliases: `Expression` + + - `callee`: `Expression` (required) + - `arguments`: `Array` (required) + +--- + +### catchClause +```javascript +t.catchClause(param, body) +``` + +See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`. + +Aliases: `Scopable` + + - `param`: `Identifier` (required) + - `body`: `BlockStatement` (required) + +--- + +### classBody +```javascript +t.classBody(body) +``` + +See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`. + + - `body`: `Array` (required) + +--- + +### classDeclaration +```javascript +t.classDeclaration(id, superClass, body, decorators) +``` + +See also `t.isClassDeclaration(node, opts)` and `t.assertClassDeclaration(node, opts)`. + +Aliases: `Scopable`, `Class`, `Statement`, `Declaration`, `Pureish` + + - `id`: `Identifier` (required) + - `superClass`: `Expression` (default: `null`) + - `body`: `ClassBody` (required) + - `decorators`: `Array` (required) + - `implements` (default: `null`) + - `mixins` (default: `null`) + - `superTypeParameters` (default: `null`) + - `typeParameters` (default: `null`) + +--- + +### classExpression +```javascript +t.classExpression(id, superClass, body, decorators) +``` + +See also `t.isClassExpression(node, opts)` and `t.assertClassExpression(node, opts)`. + +Aliases: `Scopable`, `Class`, `Expression`, `Pureish` + + - `id`: `Identifier` (default: `null`) + - `superClass`: `Expression` (default: `null`) + - `body`: `ClassBody` (required) + - `decorators`: `Array` (required) + - `implements` (default: `null`) + - `mixins` (default: `null`) + - `superTypeParameters` (default: `null`) + - `typeParameters` (default: `null`) + +--- + +### classImplements +```javascript +t.classImplements(id, typeParameters) +``` + +See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`. + +Aliases: `Flow` + + - `id` (required) + - `typeParameters` (required) + +--- + +### classMethod +```javascript +t.classMethod(kind, key, params, body, computed, static) +``` + +See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`. + +Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method` + + - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`) + - `key`if computed then `Expression` else `Identifier | Literal` (required) + - `params`: `Array` (required) + - `body`: `BlockStatement` (required) + - `computed`: `boolean` (default: `false`) + - `static`: `boolean` (default: `false`) + - `async`: `boolean` (default: `false`) + - `decorators` (default: `null`) + - `generator`: `boolean` (default: `false`) + - `returnType` (default: `null`) + - `typeParameters` (default: `null`) + +--- + +### classProperty +```javascript +t.classProperty(key, value, typeAnnotation, decorators, computed) +``` + +See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`. + +Aliases: `Property` + + - `key` (required) + - `value` (required) + - `typeAnnotation` (required) + - `decorators` (required) + - `computed`: `boolean` (default: `false`) + +--- + +### conditionalExpression +```javascript +t.conditionalExpression(test, consequent, alternate) +``` + +See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`. + +Aliases: `Expression`, `Conditional` + + - `test`: `Expression` (required) + - `consequent`: `Expression` (required) + - `alternate`: `Expression` (required) + +--- + +### continueStatement +```javascript +t.continueStatement(label) +``` + +See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`. + +Aliases: `Statement`, `Terminatorless`, `CompletionStatement` + + - `label`: `Identifier` (default: `null`) + +--- + +### debuggerStatement +```javascript +t.debuggerStatement() +``` + +See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`. + +Aliases: `Statement` + + +--- + +### declareClass +```javascript +t.declareClass(id, typeParameters, extends, body) +``` + +See also `t.isDeclareClass(node, opts)` and `t.assertDeclareClass(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `typeParameters` (required) + - `extends` (required) + - `body` (required) + +--- + +### declareExportDeclaration +```javascript +t.declareExportDeclaration(declaration, specifiers, source) +``` + +See also `t.isDeclareExportDeclaration(node, opts)` and `t.assertDeclareExportDeclaration(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `declaration` (required) + - `specifiers` (required) + - `source` (required) + +--- + +### declareFunction +```javascript +t.declareFunction(id) +``` + +See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + +--- + +### declareInterface +```javascript +t.declareInterface(id, typeParameters, extends, body) +``` + +See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `typeParameters` (required) + - `extends` (required) + - `body` (required) + +--- + +### declareModule +```javascript +t.declareModule(id, body) +``` + +See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `body` (required) + +--- + +### declareModuleExports +```javascript +t.declareModuleExports(typeAnnotation) +``` + +See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `typeAnnotation` (required) + +--- + +### declareOpaqueType +```javascript +t.declareOpaqueType(id, typeParameters, supertype) +``` + +See also `t.isDeclareOpaqueType(node, opts)` and `t.assertDeclareOpaqueType(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `typeParameters` (required) + - `supertype` (required) + +--- + +### declareTypeAlias +```javascript +t.declareTypeAlias(id, typeParameters, right) +``` + +See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `typeParameters` (required) + - `right` (required) + +--- + +### declareVariable +```javascript +t.declareVariable(id) +``` + +See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + +--- + +### decorator +```javascript +t.decorator(expression) +``` + +See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`. + + - `expression`: `Expression` (required) + +--- + +### directive +```javascript +t.directive(value) +``` + +See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`. + + - `value`: `DirectiveLiteral` (required) + +--- + +### directiveLiteral +```javascript +t.directiveLiteral(value) +``` + +See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`. + + - `value`: `string` (required) + +--- + +### doExpression +```javascript +t.doExpression(body) +``` + +See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`. + +Aliases: `Expression` + + - `body`: `BlockStatement` (required) + +--- + +### doWhileStatement +```javascript +t.doWhileStatement(test, body) +``` + +See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`. + +Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` + + - `test`: `Expression` (required) + - `body`: `Statement` (required) + +--- + +### emptyStatement +```javascript +t.emptyStatement() +``` + +See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`. + +Aliases: `Statement` + + +--- + +### emptyTypeAnnotation +```javascript +t.emptyTypeAnnotation() +``` + +See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### existentialTypeParam +```javascript +t.existentialTypeParam() +``` + +See also `t.isExistentialTypeParam(node, opts)` and `t.assertExistentialTypeParam(node, opts)`. + +Aliases: `Flow` + + +--- + +### exportAllDeclaration +```javascript +t.exportAllDeclaration(source) +``` + +See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`. + +Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` + + - `source`: `StringLiteral` (required) + +--- + +### exportDefaultDeclaration +```javascript +t.exportDefaultDeclaration(declaration) +``` + +See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`. + +Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` + + - `declaration`: `FunctionDeclaration | ClassDeclaration | Expression` (required) + +--- + +### exportDefaultSpecifier +```javascript +t.exportDefaultSpecifier(exported) +``` + +See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`. + +Aliases: `ModuleSpecifier` + + - `exported`: `Identifier` (required) + +--- + +### exportNamedDeclaration +```javascript +t.exportNamedDeclaration(declaration, specifiers, source) +``` + +See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`. + +Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` + + - `declaration`: `Declaration` (default: `null`) + - `specifiers`: `Array` (required) + - `source`: `StringLiteral` (default: `null`) + +--- + +### exportNamespaceSpecifier +```javascript +t.exportNamespaceSpecifier(exported) +``` + +See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`. + +Aliases: `ModuleSpecifier` + + - `exported`: `Identifier` (required) + +--- + +### exportSpecifier +```javascript +t.exportSpecifier(local, exported) +``` + +See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`. + +Aliases: `ModuleSpecifier` + + - `local`: `Identifier` (required) + - `exported`: `Identifier` (required) + +--- + +### expressionStatement +```javascript +t.expressionStatement(expression) +``` + +See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`. + +Aliases: `Statement`, `ExpressionWrapper` + + - `expression`: `Expression` (required) + +--- + +### file +```javascript +t.file(program, comments, tokens) +``` + +See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`. + + - `program`: `Program` (required) + - `comments` (required) + - `tokens` (required) + +--- + +### forAwaitStatement +```javascript +t.forAwaitStatement(left, right, body) +``` + +See also `t.isForAwaitStatement(node, opts)` and `t.assertForAwaitStatement(node, opts)`. + +Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` + + - `left`: `VariableDeclaration | LVal` (required) + - `right`: `Expression` (required) + - `body`: `Statement` (required) + +--- + +### forInStatement +```javascript +t.forInStatement(left, right, body) +``` + +See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`. + +Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` + + - `left`: `VariableDeclaration | LVal` (required) + - `right`: `Expression` (required) + - `body`: `Statement` (required) + +--- + +### forOfStatement +```javascript +t.forOfStatement(left, right, body) +``` + +See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`. + +Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` + + - `left`: `VariableDeclaration | LVal` (required) + - `right`: `Expression` (required) + - `body`: `Statement` (required) + +--- + +### forStatement +```javascript +t.forStatement(init, test, update, body) +``` + +See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`. + +Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop` + + - `init`: `VariableDeclaration | Expression` (default: `null`) + - `test`: `Expression` (default: `null`) + - `update`: `Expression` (default: `null`) + - `body`: `Statement` (required) + +--- + +### functionDeclaration +```javascript +t.functionDeclaration(id, params, body, generator, async) +``` + +See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`. + +Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `Pureish`, `Declaration` + + - `id`: `Identifier` (required) + - `params`: `Array` (required) + - `body`: `BlockStatement` (required) + - `generator`: `boolean` (default: `false`) + - `async`: `boolean` (default: `false`) + - `returnType` (default: `null`) + - `typeParameters` (default: `null`) + +--- + +### functionExpression +```javascript +t.functionExpression(id, params, body, generator, async) +``` + +See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`. + +Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` + + - `id`: `Identifier` (default: `null`) + - `params`: `Array` (required) + - `body`: `BlockStatement` (required) + - `generator`: `boolean` (default: `false`) + - `async`: `boolean` (default: `false`) + - `returnType` (default: `null`) + - `typeParameters` (default: `null`) + +--- + +### functionTypeAnnotation +```javascript +t.functionTypeAnnotation(typeParameters, params, rest, returnType) +``` + +See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `typeParameters` (required) + - `params` (required) + - `rest` (required) + - `returnType` (required) + +--- + +### functionTypeParam +```javascript +t.functionTypeParam(name, typeAnnotation) +``` + +See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`. + +Aliases: `Flow` + + - `name` (required) + - `typeAnnotation` (required) + +--- + +### genericTypeAnnotation +```javascript +t.genericTypeAnnotation(id, typeParameters) +``` + +See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `id` (required) + - `typeParameters` (required) + +--- + +### identifier +```javascript +t.identifier(name) +``` + +See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`. + +Aliases: `Expression`, `LVal` + + - `name``string` (required) + - `decorators`: `Array` (default: `null`) + - `typeAnnotation` (default: `null`) + +--- + +### ifStatement +```javascript +t.ifStatement(test, consequent, alternate) +``` + +See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`. + +Aliases: `Statement`, `Conditional` + + - `test`: `Expression` (required) + - `consequent`: `Statement` (required) + - `alternate`: `Statement` (default: `null`) + +--- + +### import +```javascript +t.import() +``` + +See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`. + +Aliases: `Expression` + + +--- + +### importDeclaration +```javascript +t.importDeclaration(specifiers, source) +``` + +See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`. + +Aliases: `Statement`, `Declaration`, `ModuleDeclaration` + + - `specifiers`: `Array` (required) + - `source`: `StringLiteral` (required) + +--- + +### importDefaultSpecifier +```javascript +t.importDefaultSpecifier(local) +``` + +See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`. + +Aliases: `ModuleSpecifier` + + - `local`: `Identifier` (required) + +--- + +### importNamespaceSpecifier +```javascript +t.importNamespaceSpecifier(local) +``` + +See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`. + +Aliases: `ModuleSpecifier` + + - `local`: `Identifier` (required) + +--- + +### importSpecifier +```javascript +t.importSpecifier(local, imported) +``` + +See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`. + +Aliases: `ModuleSpecifier` + + - `local`: `Identifier` (required) + - `imported`: `Identifier` (required) + - `importKind`: `null | 'type' | 'typeof'` (default: `null`) + +--- + +### interfaceDeclaration +```javascript +t.interfaceDeclaration(id, typeParameters, extends, body) +``` + +See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `typeParameters` (required) + - `extends` (required) + - `body` (required) + +--- + +### interfaceExtends +```javascript +t.interfaceExtends(id, typeParameters) +``` + +See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`. + +Aliases: `Flow` + + - `id` (required) + - `typeParameters` (required) + +--- + +### intersectionTypeAnnotation +```javascript +t.intersectionTypeAnnotation(types) +``` + +See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `types` (required) + +--- + +### jSXAttribute +```javascript +t.jSXAttribute(name, value) +``` + +See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`. + +Aliases: `JSX`, `Immutable` + + - `name`: `JSXIdentifier | JSXNamespacedName` (required) + - `value`: `JSXElement | StringLiteral | JSXExpressionContainer` (default: `null`) + +--- + +### jSXClosingElement +```javascript +t.jSXClosingElement(name) +``` + +See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`. + +Aliases: `JSX`, `Immutable` + + - `name`: `JSXIdentifier | JSXMemberExpression` (required) + +--- + +### jSXElement +```javascript +t.jSXElement(openingElement, closingElement, children, selfClosing) +``` + +See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`. + +Aliases: `JSX`, `Immutable`, `Expression` + + - `openingElement`: `JSXOpeningElement` (required) + - `closingElement`: `JSXClosingElement` (default: `null`) + - `children`: `Array` (required) + - `selfClosing` (required) + +--- + +### jSXEmptyExpression +```javascript +t.jSXEmptyExpression() +``` + +See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`. + +Aliases: `JSX`, `Expression` + + +--- + +### jSXExpressionContainer +```javascript +t.jSXExpressionContainer(expression) +``` + +See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`. + +Aliases: `JSX`, `Immutable` + + - `expression`: `Expression` (required) + +--- + +### jSXIdentifier +```javascript +t.jSXIdentifier(name) +``` + +See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`. + +Aliases: `JSX`, `Expression` + + - `name`: `string` (required) + +--- + +### jSXMemberExpression +```javascript +t.jSXMemberExpression(object, property) +``` + +See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`. + +Aliases: `JSX`, `Expression` + + - `object`: `JSXMemberExpression | JSXIdentifier` (required) + - `property`: `JSXIdentifier` (required) + +--- + +### jSXNamespacedName +```javascript +t.jSXNamespacedName(namespace, name) +``` + +See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`. + +Aliases: `JSX` + + - `namespace`: `JSXIdentifier` (required) + - `name`: `JSXIdentifier` (required) + +--- + +### jSXOpeningElement +```javascript +t.jSXOpeningElement(name, attributes, selfClosing) +``` + +See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`. + +Aliases: `JSX`, `Immutable` + + - `name`: `JSXIdentifier | JSXMemberExpression` (required) + - `attributes`: `Array` (required) + - `selfClosing`: `boolean` (default: `false`) + +--- + +### jSXSpreadAttribute +```javascript +t.jSXSpreadAttribute(argument) +``` + +See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`. + +Aliases: `JSX` + + - `argument`: `Expression` (required) + +--- + +### jSXSpreadChild +```javascript +t.jSXSpreadChild(expression) +``` + +See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`. + +Aliases: `JSX`, `Immutable` + + - `expression`: `Expression` (required) + +--- + +### jSXText +```javascript +t.jSXText(value) +``` + +See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`. + +Aliases: `JSX`, `Immutable` + + - `value`: `string` (required) + +--- + +### labeledStatement +```javascript +t.labeledStatement(label, body) +``` + +See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`. + +Aliases: `Statement` + + - `label`: `Identifier` (required) + - `body`: `Statement` (required) + +--- + +### logicalExpression +```javascript +t.logicalExpression(operator, left, right) +``` + +See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`. + +Aliases: `Binary`, `Expression` + + - `operator`: `'||' | '&&'` (required) + - `left`: `Expression` (required) + - `right`: `Expression` (required) + +--- + +### memberExpression +```javascript +t.memberExpression(object, property, computed) +``` + +See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`. + +Aliases: `Expression`, `LVal` + + - `object`: `Expression` (required) + - `property`if computed then `Expression` else `Identifier` (required) + - `computed`: `boolean` (default: `false`) + +--- + +### metaProperty +```javascript +t.metaProperty(meta, property) +``` + +See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`. + +Aliases: `Expression` + + - `meta`: `string` (required) + - `property`: `string` (required) + +--- + +### mixedTypeAnnotation +```javascript +t.mixedTypeAnnotation() +``` + +See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### newExpression +```javascript +t.newExpression(callee, arguments) +``` + +See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`. + +Aliases: `Expression` + + - `callee`: `Expression` (required) + - `arguments`: `Array` (required) + +--- + +### noop +```javascript +t.noop() +``` + +See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`. + + +--- + +### nullLiteral +```javascript +t.nullLiteral() +``` + +See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`. + +Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` + + +--- + +### nullLiteralTypeAnnotation +```javascript +t.nullLiteralTypeAnnotation() +``` + +See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### nullableTypeAnnotation +```javascript +t.nullableTypeAnnotation(typeAnnotation) +``` + +See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `typeAnnotation` (required) + +--- + +### numberTypeAnnotation +```javascript +t.numberTypeAnnotation() +``` + +See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### numericLiteral +```javascript +t.numericLiteral(value) +``` + +See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`. + +Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` + + - `value`: `number` (required) + +--- + +### numericLiteralTypeAnnotation +```javascript +t.numericLiteralTypeAnnotation() +``` + +See also `t.isNumericLiteralTypeAnnotation(node, opts)` and `t.assertNumericLiteralTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + +--- + +### objectExpression +```javascript +t.objectExpression(properties) +``` + +See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`. + +Aliases: `Expression` + + - `properties`: `Array` (required) + +--- + +### objectMethod +```javascript +t.objectMethod(kind, key, params, body, computed) +``` + +See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`. + +Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember` + + - `kind`: `"method" | "get" | "set"` (default: `'method'`) + - `key`if computed then `Expression` else `Identifier | Literal` (required) + - `params` (required) + - `body`: `BlockStatement` (required) + - `computed`: `boolean` (default: `false`) + - `async`: `boolean` (default: `false`) + - `decorators`: `Array` (default: `null`) + - `generator`: `boolean` (default: `false`) + - `returnType` (default: `null`) + - `typeParameters` (default: `null`) + +--- + +### objectPattern +```javascript +t.objectPattern(properties, typeAnnotation) +``` + +See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`. + +Aliases: `Pattern`, `LVal` + + - `properties`: `Array` (required) + - `typeAnnotation` (required) + - `decorators`: `Array` (default: `null`) + +--- + +### objectProperty +```javascript +t.objectProperty(key, value, computed, shorthand, decorators) +``` + +See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`. + +Aliases: `UserWhitespacable`, `Property`, `ObjectMember` + + - `key`if computed then `Expression` else `Identifier | Literal` (required) + - `value`: `Expression | Pattern | RestElement` (required) + - `computed`: `boolean` (default: `false`) + - `shorthand`: `boolean` (default: `false`) + - `decorators`: `Array` (default: `null`) + +--- + +### objectTypeAnnotation +```javascript +t.objectTypeAnnotation(properties, indexers, callProperties) +``` + +See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `properties` (required) + - `indexers` (required) + - `callProperties` (required) + +--- + +### objectTypeCallProperty +```javascript +t.objectTypeCallProperty(value) +``` + +See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`. + +Aliases: `Flow`, `UserWhitespacable` + + - `value` (required) + +--- + +### objectTypeIndexer +```javascript +t.objectTypeIndexer(id, key, value) +``` + +See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`. + +Aliases: `Flow`, `UserWhitespacable` + + - `id` (required) + - `key` (required) + - `value` (required) + +--- + +### objectTypeProperty +```javascript +t.objectTypeProperty(key, value) +``` + +See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`. + +Aliases: `Flow`, `UserWhitespacable` + + - `key` (required) + - `value` (required) + +--- + +### objectTypeSpreadProperty +```javascript +t.objectTypeSpreadProperty(argument) +``` + +See also `t.isObjectTypeSpreadProperty(node, opts)` and `t.assertObjectTypeSpreadProperty(node, opts)`. + +Aliases: `Flow`, `UserWhitespacable` + + - `argument` (required) + +--- + +### opaqueType +```javascript +t.opaqueType(id, typeParameters, impltype, supertype) +``` + +See also `t.isOpaqueType(node, opts)` and `t.assertOpaqueType(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `typeParameters` (required) + - `impltype` (required) + - `supertype` (required) + +--- + +### parenthesizedExpression +```javascript +t.parenthesizedExpression(expression) +``` + +See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`. + +Aliases: `Expression`, `ExpressionWrapper` + + - `expression`: `Expression` (required) + +--- + +### program +```javascript +t.program(body, directives) +``` + +See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`. + +Aliases: `Scopable`, `BlockParent`, `Block`, `FunctionParent` + + - `body`: `Array` (required) + - `directives`: `Array` (default: `[]`) + +--- + +### qualifiedTypeIdentifier +```javascript +t.qualifiedTypeIdentifier(id, qualification) +``` + +See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`. + +Aliases: `Flow` + + - `id` (required) + - `qualification` (required) + +--- + +### regExpLiteral +```javascript +t.regExpLiteral(pattern, flags) +``` + +See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`. + +Aliases: `Expression`, `Literal` + + - `pattern`: `string` (required) + - `flags`: `string` (default: `''`) + +--- + +### restElement +```javascript +t.restElement(argument, typeAnnotation) +``` + +See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`. + +Aliases: `LVal` + + - `argument`: `LVal` (required) + - `typeAnnotation` (required) + - `decorators`: `Array` (default: `null`) + +--- + +### restProperty +```javascript +t.restProperty(argument) +``` + +See also `t.isRestProperty(node, opts)` and `t.assertRestProperty(node, opts)`. + +Aliases: `UnaryLike` + + - `argument`: `LVal` (required) + +--- + +### returnStatement +```javascript +t.returnStatement(argument) +``` + +See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`. + +Aliases: `Statement`, `Terminatorless`, `CompletionStatement` + + - `argument`: `Expression` (default: `null`) + +--- + +### sequenceExpression +```javascript +t.sequenceExpression(expressions) +``` + +See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`. + +Aliases: `Expression` + + - `expressions`: `Array` (required) + +--- + +### spreadElement +```javascript +t.spreadElement(argument) +``` + +See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`. + +Aliases: `UnaryLike` + + - `argument`: `Expression` (required) + +--- + +### spreadProperty +```javascript +t.spreadProperty(argument) +``` + +See also `t.isSpreadProperty(node, opts)` and `t.assertSpreadProperty(node, opts)`. + +Aliases: `UnaryLike` + + - `argument`: `Expression` (required) + +--- + +### stringLiteral +```javascript +t.stringLiteral(value) +``` + +See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`. + +Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` + + - `value`: `string` (required) + +--- + +### stringLiteralTypeAnnotation +```javascript +t.stringLiteralTypeAnnotation() +``` + +See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + +--- + +### stringTypeAnnotation +```javascript +t.stringTypeAnnotation() +``` + +See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### super +```javascript +t.super() +``` + +See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`. + +Aliases: `Expression` + + +--- + +### switchCase +```javascript +t.switchCase(test, consequent) +``` + +See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`. + + - `test`: `Expression` (default: `null`) + - `consequent`: `Array` (required) + +--- + +### switchStatement +```javascript +t.switchStatement(discriminant, cases) +``` + +See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`. + +Aliases: `Statement`, `BlockParent`, `Scopable` + + - `discriminant`: `Expression` (required) + - `cases`: `Array` (required) + +--- + +### taggedTemplateExpression +```javascript +t.taggedTemplateExpression(tag, quasi) +``` + +See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`. + +Aliases: `Expression` + + - `tag`: `Expression` (required) + - `quasi`: `TemplateLiteral` (required) + +--- + +### templateElement +```javascript +t.templateElement(value, tail) +``` + +See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`. + + - `value` (required) + - `tail`: `boolean` (default: `false`) + +--- + +### templateLiteral +```javascript +t.templateLiteral(quasis, expressions) +``` + +See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`. + +Aliases: `Expression`, `Literal` + + - `quasis`: `Array` (required) + - `expressions`: `Array` (required) + +--- + +### thisExpression +```javascript +t.thisExpression() +``` + +See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`. + +Aliases: `Expression` + + +--- + +### thisTypeAnnotation +```javascript +t.thisTypeAnnotation() +``` + +See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### throwStatement +```javascript +t.throwStatement(argument) +``` + +See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`. + +Aliases: `Statement`, `Terminatorless`, `CompletionStatement` + + - `argument`: `Expression` (required) + +--- + +### tryStatement +```javascript +t.tryStatement(block, handler, finalizer) +``` + +See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`. + +Aliases: `Statement` + + - `block` (required) + - `handler` (default: `null`) + - `finalizer`: `BlockStatement` (default: `null`) + - `body`: `BlockStatement` (default: `null`) + +--- + +### tupleTypeAnnotation +```javascript +t.tupleTypeAnnotation(types) +``` + +See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `types` (required) + +--- + +### typeAlias +```javascript +t.typeAlias(id, typeParameters, right) +``` + +See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `id` (required) + - `typeParameters` (required) + - `right` (required) + +--- + +### typeAnnotation +```javascript +t.typeAnnotation(typeAnnotation) +``` + +See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `typeAnnotation` (required) + +--- + +### typeCastExpression +```javascript +t.typeCastExpression(expression, typeAnnotation) +``` + +See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`. + +Aliases: `Flow`, `ExpressionWrapper`, `Expression` + + - `expression` (required) + - `typeAnnotation` (required) + +--- + +### typeParameter +```javascript +t.typeParameter(bound) +``` + +See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`. + +Aliases: `Flow` + + - `bound` (required) + +--- + +### typeParameterDeclaration +```javascript +t.typeParameterDeclaration(params) +``` + +See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`. + +Aliases: `Flow` + + - `params` (required) + +--- + +### typeParameterInstantiation +```javascript +t.typeParameterInstantiation(params) +``` + +See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`. + +Aliases: `Flow` + + - `params` (required) + +--- + +### typeofTypeAnnotation +```javascript +t.typeofTypeAnnotation(argument) +``` + +See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `argument` (required) + +--- + +### unaryExpression +```javascript +t.unaryExpression(operator, argument, prefix) +``` + +See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`. + +Aliases: `UnaryLike`, `Expression` + + - `operator`: `'void' | 'delete' | '!' | '+' | '-' | '++' | '--' | '~' | 'typeof'` (required) + - `argument`: `Expression` (required) + - `prefix`: `boolean` (default: `true`) + +--- + +### unionTypeAnnotation +```javascript +t.unionTypeAnnotation(types) +``` + +See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`. + +Aliases: `Flow` + + - `types` (required) + +--- + +### updateExpression +```javascript +t.updateExpression(operator, argument, prefix) +``` + +See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`. + +Aliases: `Expression` + + - `operator`: `'++' | '--'` (required) + - `argument`: `Expression` (required) + - `prefix`: `boolean` (default: `false`) + +--- + +### variableDeclaration +```javascript +t.variableDeclaration(kind, declarations) +``` + +See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`. + +Aliases: `Statement`, `Declaration` + + - `kind`: `"var" | "let" | "const"` (required) + - `declarations`: `Array` (required) + +--- + +### variableDeclarator +```javascript +t.variableDeclarator(id, init) +``` + +See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`. + + - `id`: `LVal` (required) + - `init`: `Expression` (default: `null`) + +--- + +### voidTypeAnnotation +```javascript +t.voidTypeAnnotation() +``` + +See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`. + +Aliases: `Flow`, `FlowBaseAnnotation` + + +--- + +### whileStatement +```javascript +t.whileStatement(test, body) +``` + +See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`. + +Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` + + - `test`: `Expression` (required) + - `body`: `BlockStatement | Statement` (required) + +--- + +### withStatement +```javascript +t.withStatement(object, body) +``` + +See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`. + +Aliases: `Statement` + + - `object` (required) + - `body`: `BlockStatement | Statement` (required) + +--- + +### yieldExpression +```javascript +t.yieldExpression(argument, delegate) +``` + +See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`. + +Aliases: `Expression`, `Terminatorless` + + - `argument`: `Expression` (default: `null`) + - `delegate`: `boolean` (default: `false`) + +--- + + + + diff --git a/socket/node_modules/babel-types/lib/constants.js b/socket/node_modules/babel-types/lib/constants.js new file mode 100644 index 0000000..ba15090 --- /dev/null +++ b/socket/node_modules/babel-types/lib/constants.js @@ -0,0 +1,38 @@ +"use strict"; + +exports.__esModule = true; +exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined; + +var _for = require("babel-runtime/core-js/symbol/for"); + +var _for2 = _interopRequireDefault(_for); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var STATEMENT_OR_BLOCK_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; +var FLATTENABLE_KEYS = exports.FLATTENABLE_KEYS = ["body", "expressions"]; +var FOR_INIT_KEYS = exports.FOR_INIT_KEYS = ["left", "init"]; +var COMMENT_KEYS = exports.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; + +var LOGICAL_OPERATORS = exports.LOGICAL_OPERATORS = ["||", "&&"]; +var UPDATE_OPERATORS = exports.UPDATE_OPERATORS = ["++", "--"]; + +var BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; +var EQUALITY_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; +var COMPARISON_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]); +var BOOLEAN_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS); +var NUMBER_BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; +var BINARY_OPERATORS = exports.BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS); + +var BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; +var NUMBER_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = ["+", "-", "++", "--", "~"]; +var STRING_UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = ["typeof"]; +var UNARY_OPERATORS = exports.UNARY_OPERATORS = ["void"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS); + +var INHERIT_KEYS = exports.INHERIT_KEYS = { + optional: ["typeAnnotation", "typeParameters", "returnType"], + force: ["start", "loc", "end"] +}; + +var BLOCK_SCOPED_SYMBOL = exports.BLOCK_SCOPED_SYMBOL = (0, _for2.default)("var used to be block scoped"); +var NOT_LOCAL_BINDING = exports.NOT_LOCAL_BINDING = (0, _for2.default)("should not be considered a local binding"); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/converters.js b/socket/node_modules/babel-types/lib/converters.js new file mode 100644 index 0000000..bd0a3c6 --- /dev/null +++ b/socket/node_modules/babel-types/lib/converters.js @@ -0,0 +1,350 @@ +"use strict"; + +exports.__esModule = true; + +var _maxSafeInteger = require("babel-runtime/core-js/number/max-safe-integer"); + +var _maxSafeInteger2 = _interopRequireDefault(_maxSafeInteger); + +var _stringify = require("babel-runtime/core-js/json/stringify"); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.toComputedKey = toComputedKey; +exports.toSequenceExpression = toSequenceExpression; +exports.toKeyAlias = toKeyAlias; +exports.toIdentifier = toIdentifier; +exports.toBindingIdentifierName = toBindingIdentifierName; +exports.toStatement = toStatement; +exports.toExpression = toExpression; +exports.toBlock = toBlock; +exports.valueToNode = valueToNode; + +var _isPlainObject = require("lodash/isPlainObject"); + +var _isPlainObject2 = _interopRequireDefault(_isPlainObject); + +var _isRegExp = require("lodash/isRegExp"); + +var _isRegExp2 = _interopRequireDefault(_isRegExp); + +var _index = require("./index"); + +var t = _interopRequireWildcard(_index); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toComputedKey(node) { + var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key || node.property; + + if (!node.computed) { + if (t.isIdentifier(key)) key = t.stringLiteral(key.name); + } + return key; +} + +function gatherSequenceExpressions(nodes, scope, declars) { + var exprs = []; + var ensureLastUndefined = true; + + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + + ensureLastUndefined = false; + + if (t.isExpression(node)) { + exprs.push(node); + } else if (t.isExpressionStatement(node)) { + exprs.push(node.expression); + } else if (t.isVariableDeclaration(node)) { + if (node.kind !== "var") return; + + for (var _iterator2 = node.declarations, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var declar = _ref2; + + var bindings = t.getBindingIdentifiers(declar); + for (var key in bindings) { + declars.push({ + kind: node.kind, + id: bindings[key] + }); + } + + if (declar.init) { + exprs.push(t.assignmentExpression("=", declar.id, declar.init)); + } + } + + ensureLastUndefined = true; + } else if (t.isIfStatement(node)) { + var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); + var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); + if (!consequent || !alternate) return; + + exprs.push(t.conditionalExpression(node.test, consequent, alternate)); + } else if (t.isBlockStatement(node)) { + var body = gatherSequenceExpressions(node.body, scope, declars); + if (!body) return; + + exprs.push(body); + } else if (t.isEmptyStatement(node)) { + ensureLastUndefined = true; + } else { + return; + } + } + + if (ensureLastUndefined) { + exprs.push(scope.buildUndefinedNode()); + } + + if (exprs.length === 1) { + return exprs[0]; + } else { + return t.sequenceExpression(exprs); + } +} + +function toSequenceExpression(nodes, scope) { + if (!nodes || !nodes.length) return; + + var declars = []; + var result = gatherSequenceExpressions(nodes, scope, declars); + if (!result) return; + + for (var _iterator3 = declars, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var declar = _ref3; + + scope.push(declar); + } + + return result; +} + +function toKeyAlias(node) { + var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key; + + var alias = void 0; + + if (node.kind === "method") { + return toKeyAlias.increment() + ""; + } else if (t.isIdentifier(key)) { + alias = key.name; + } else if (t.isStringLiteral(key)) { + alias = (0, _stringify2.default)(key.value); + } else { + alias = (0, _stringify2.default)(t.removePropertiesDeep(t.cloneDeep(key))); + } + + if (node.computed) { + alias = "[" + alias + "]"; + } + + if (node.static) { + alias = "static:" + alias; + } + + return alias; +} + +toKeyAlias.uid = 0; + +toKeyAlias.increment = function () { + if (toKeyAlias.uid >= _maxSafeInteger2.default) { + return toKeyAlias.uid = 0; + } else { + return toKeyAlias.uid++; + } +}; + +function toIdentifier(name) { + name = name + ""; + + name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); + + name = name.replace(/^[-0-9]+/, ""); + + name = name.replace(/[-\s]+(.)?/g, function (match, c) { + return c ? c.toUpperCase() : ""; + }); + + if (!t.isValidIdentifier(name)) { + name = "_" + name; + } + + return name || "_"; +} + +function toBindingIdentifierName(name) { + name = toIdentifier(name); + if (name === "eval" || name === "arguments") name = "_" + name; + return name; +} + +function toStatement(node, ignore) { + if (t.isStatement(node)) { + return node; + } + + var mustHaveId = false; + var newType = void 0; + + if (t.isClass(node)) { + mustHaveId = true; + newType = "ClassDeclaration"; + } else if (t.isFunction(node)) { + mustHaveId = true; + newType = "FunctionDeclaration"; + } else if (t.isAssignmentExpression(node)) { + return t.expressionStatement(node); + } + + if (mustHaveId && !node.id) { + newType = false; + } + + if (!newType) { + if (ignore) { + return false; + } else { + throw new Error("cannot turn " + node.type + " to a statement"); + } + } + + node.type = newType; + + return node; +} + +function toExpression(node) { + if (t.isExpressionStatement(node)) { + node = node.expression; + } + + if (t.isExpression(node)) { + return node; + } + + if (t.isClass(node)) { + node.type = "ClassExpression"; + } else if (t.isFunction(node)) { + node.type = "FunctionExpression"; + } + + if (!t.isExpression(node)) { + throw new Error("cannot turn " + node.type + " to an expression"); + } + + return node; +} + +function toBlock(node, parent) { + if (t.isBlockStatement(node)) { + return node; + } + + if (t.isEmptyStatement(node)) { + node = []; + } + + if (!Array.isArray(node)) { + if (!t.isStatement(node)) { + if (t.isFunction(parent)) { + node = t.returnStatement(node); + } else { + node = t.expressionStatement(node); + } + } + + node = [node]; + } + + return t.blockStatement(node); +} + +function valueToNode(value) { + if (value === undefined) { + return t.identifier("undefined"); + } + + if (value === true || value === false) { + return t.booleanLiteral(value); + } + + if (value === null) { + return t.nullLiteral(); + } + + if (typeof value === "string") { + return t.stringLiteral(value); + } + + if (typeof value === "number") { + return t.numericLiteral(value); + } + + if ((0, _isRegExp2.default)(value)) { + var pattern = value.source; + var flags = value.toString().match(/\/([a-z]+|)$/)[1]; + return t.regExpLiteral(pattern, flags); + } + + if (Array.isArray(value)) { + return t.arrayExpression(value.map(t.valueToNode)); + } + + if ((0, _isPlainObject2.default)(value)) { + var props = []; + for (var key in value) { + var nodeKey = void 0; + if (t.isValidIdentifier(key)) { + nodeKey = t.identifier(key); + } else { + nodeKey = t.stringLiteral(key); + } + props.push(t.objectProperty(nodeKey, t.valueToNode(value[key]))); + } + return t.objectExpression(props); + } + + throw new Error("don't know how to turn this value into a node"); +} \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/core.js b/socket/node_modules/babel-types/lib/definitions/core.js new file mode 100644 index 0000000..413faf8 --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/core.js @@ -0,0 +1,701 @@ +"use strict"; + +var _index = require("../index"); + +var t = _interopRequireWildcard(_index); + +var _constants = require("../constants"); + +var _index2 = require("./index"); + +var _index3 = _interopRequireDefault(_index2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +(0, _index3.default)("ArrayExpression", { + fields: { + elements: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: [] + } + }, + visitor: ["elements"], + aliases: ["Expression"] +}); + +(0, _index3.default)("AssignmentExpression", { + fields: { + operator: { + validate: (0, _index2.assertValueType)("string") + }, + left: { + validate: (0, _index2.assertNodeType)("LVal") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") + } + }, + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Expression"] +}); + +(0, _index3.default)("BinaryExpression", { + builder: ["operator", "left", "right"], + fields: { + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS) + }, + left: { + validate: (0, _index2.assertNodeType)("Expression") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") + } + }, + visitor: ["left", "right"], + aliases: ["Binary", "Expression"] +}); + +(0, _index3.default)("Directive", { + visitor: ["value"], + fields: { + value: { + validate: (0, _index2.assertNodeType)("DirectiveLiteral") + } + } +}); + +(0, _index3.default)("DirectiveLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _index2.assertValueType)("string") + } + } +}); + +(0, _index3.default)("BlockStatement", { + builder: ["body", "directives"], + visitor: ["directives", "body"], + fields: { + directives: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "Statement"] +}); + +(0, _index3.default)("BreakStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _index2.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); + +(0, _index3.default)("CallExpression", { + visitor: ["callee", "arguments"], + fields: { + callee: { + validate: (0, _index2.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement"))) + } + }, + aliases: ["Expression"] +}); + +(0, _index3.default)("CatchClause", { + visitor: ["param", "body"], + fields: { + param: { + validate: (0, _index2.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + } + }, + aliases: ["Scopable"] +}); + +(0, _index3.default)("ConditionalExpression", { + visitor: ["test", "consequent", "alternate"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _index2.assertNodeType)("Expression") + }, + alternate: { + validate: (0, _index2.assertNodeType)("Expression") + } + }, + aliases: ["Expression", "Conditional"] +}); + +(0, _index3.default)("ContinueStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _index2.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); + +(0, _index3.default)("DebuggerStatement", { + aliases: ["Statement"] +}); + +(0, _index3.default)("DoWhileStatement", { + visitor: ["test", "body"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") + } + }, + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] +}); + +(0, _index3.default)("EmptyStatement", { + aliases: ["Statement"] +}); + +(0, _index3.default)("ExpressionStatement", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _index2.assertNodeType)("Expression") + } + }, + aliases: ["Statement", "ExpressionWrapper"] +}); + +(0, _index3.default)("File", { + builder: ["program", "comments", "tokens"], + visitor: ["program"], + fields: { + program: { + validate: (0, _index2.assertNodeType)("Program") + } + } +}); + +(0, _index3.default)("ForInStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _index2.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") + } + } +}); + +(0, _index3.default)("ForStatement", { + visitor: ["init", "test", "update", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], + fields: { + init: { + validate: (0, _index2.assertNodeType)("VariableDeclaration", "Expression"), + optional: true + }, + test: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + }, + update: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") + } + } +}); + +(0, _index3.default)("FunctionDeclaration", { + builder: ["id", "params", "body", "generator", "async"], + visitor: ["id", "params", "body", "returnType", "typeParameters"], + fields: { + id: { + validate: (0, _index2.assertNodeType)("Identifier") + }, + params: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + } + }, + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] +}); + +(0, _index3.default)("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: { + id: { + validate: (0, _index2.assertNodeType)("Identifier"), + optional: true + }, + params: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + } + } +}); + +(0, _index3.default)("Identifier", { + builder: ["name"], + visitor: ["typeAnnotation"], + aliases: ["Expression", "LVal"], + fields: { + name: { + validate: function validate(node, key, val) { + if (!t.isValidIdentifier(val)) {} + } + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) + } + } +}); + +(0, _index3.default)("IfStatement", { + visitor: ["test", "consequent", "alternate"], + aliases: ["Statement", "Conditional"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _index2.assertNodeType)("Statement") + }, + alternate: { + optional: true, + validate: (0, _index2.assertNodeType)("Statement") + } + } +}); + +(0, _index3.default)("LabeledStatement", { + visitor: ["label", "body"], + aliases: ["Statement"], + fields: { + label: { + validate: (0, _index2.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index2.assertNodeType)("Statement") + } + } +}); + +(0, _index3.default)("StringLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _index2.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); + +(0, _index3.default)("NumericLiteral", { + builder: ["value"], + deprecatedAlias: "NumberLiteral", + fields: { + value: { + validate: (0, _index2.assertValueType)("number") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); + +(0, _index3.default)("NullLiteral", { + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); + +(0, _index3.default)("BooleanLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _index2.assertValueType)("boolean") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); + +(0, _index3.default)("RegExpLiteral", { + builder: ["pattern", "flags"], + deprecatedAlias: "RegexLiteral", + aliases: ["Expression", "Literal"], + fields: { + pattern: { + validate: (0, _index2.assertValueType)("string") + }, + flags: { + validate: (0, _index2.assertValueType)("string"), + default: "" + } + } +}); + +(0, _index3.default)("LogicalExpression", { + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Binary", "Expression"], + fields: { + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS) + }, + left: { + validate: (0, _index2.assertNodeType)("Expression") + }, + right: { + validate: (0, _index2.assertNodeType)("Expression") + } + } +}); + +(0, _index3.default)("MemberExpression", { + builder: ["object", "property", "computed"], + visitor: ["object", "property"], + aliases: ["Expression", "LVal"], + fields: { + object: { + validate: (0, _index2.assertNodeType)("Expression") + }, + property: { + validate: function validate(node, key, val) { + var expectedType = node.computed ? "Expression" : "Identifier"; + (0, _index2.assertNodeType)(expectedType)(node, key, val); + } + }, + computed: { + default: false + } + } +}); + +(0, _index3.default)("NewExpression", { + visitor: ["callee", "arguments"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _index2.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement"))) + } + } +}); + +(0, _index3.default)("Program", { + visitor: ["directives", "body"], + builder: ["body", "directives"], + fields: { + directives: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"] +}); + +(0, _index3.default)("ObjectExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadProperty"))) + } + } +}); + +(0, _index3.default)("ObjectMethod", { + builder: ["kind", "key", "params", "body", "computed"], + fields: { + kind: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("method", "get", "set")), + default: "method" + }, + computed: { + validate: (0, _index2.assertValueType)("boolean"), + default: false + }, + key: { + validate: function validate(node, key, val) { + var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; + _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); + } + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index2.assertValueType)("boolean") + } + }, + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] +}); + +(0, _index3.default)("ObjectProperty", { + builder: ["key", "value", "computed", "shorthand", "decorators"], + fields: { + computed: { + validate: (0, _index2.assertValueType)("boolean"), + default: false + }, + key: { + validate: function validate(node, key, val) { + var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; + _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); + } + }, + value: { + validate: (0, _index2.assertNodeType)("Expression", "Pattern", "RestElement") + }, + shorthand: { + validate: (0, _index2.assertValueType)("boolean"), + default: false + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))), + optional: true + } + }, + visitor: ["key", "value", "decorators"], + aliases: ["UserWhitespacable", "Property", "ObjectMember"] +}); + +(0, _index3.default)("RestElement", { + visitor: ["argument", "typeAnnotation"], + aliases: ["LVal"], + fields: { + argument: { + validate: (0, _index2.assertNodeType)("LVal") + }, + decorators: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) + } + } +}); + +(0, _index3.default)("ReturnStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + } + } +}); + +(0, _index3.default)("SequenceExpression", { + visitor: ["expressions"], + fields: { + expressions: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression"))) + } + }, + aliases: ["Expression"] +}); + +(0, _index3.default)("SwitchCase", { + visitor: ["test", "consequent"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression"), + optional: true + }, + consequent: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) + } + } +}); + +(0, _index3.default)("SwitchStatement", { + visitor: ["discriminant", "cases"], + aliases: ["Statement", "BlockParent", "Scopable"], + fields: { + discriminant: { + validate: (0, _index2.assertNodeType)("Expression") + }, + cases: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("SwitchCase"))) + } + } +}); + +(0, _index3.default)("ThisExpression", { + aliases: ["Expression"] +}); + +(0, _index3.default)("ThrowStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _index2.assertNodeType)("Expression") + } + } +}); + +(0, _index3.default)("TryStatement", { + visitor: ["block", "handler", "finalizer"], + aliases: ["Statement"], + fields: { + body: { + validate: (0, _index2.assertNodeType)("BlockStatement") + }, + handler: { + optional: true, + handler: (0, _index2.assertNodeType)("BlockStatement") + }, + finalizer: { + optional: true, + validate: (0, _index2.assertNodeType)("BlockStatement") + } + } +}); + +(0, _index3.default)("UnaryExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: true + }, + argument: { + validate: (0, _index2.assertNodeType)("Expression") + }, + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["UnaryLike", "Expression"] +}); + +(0, _index3.default)("UpdateExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: false + }, + argument: { + validate: (0, _index2.assertNodeType)("Expression") + }, + operator: { + validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["Expression"] +}); + +(0, _index3.default)("VariableDeclaration", { + builder: ["kind", "declarations"], + visitor: ["declarations"], + aliases: ["Statement", "Declaration"], + fields: { + kind: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("var", "let", "const")) + }, + declarations: { + validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("VariableDeclarator"))) + } + } +}); + +(0, _index3.default)("VariableDeclarator", { + visitor: ["id", "init"], + fields: { + id: { + validate: (0, _index2.assertNodeType)("LVal") + }, + init: { + optional: true, + validate: (0, _index2.assertNodeType)("Expression") + } + } +}); + +(0, _index3.default)("WhileStatement", { + visitor: ["test", "body"], + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], + fields: { + test: { + validate: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement", "Statement") + } + } +}); + +(0, _index3.default)("WithStatement", { + visitor: ["object", "body"], + aliases: ["Statement"], + fields: { + object: { + object: (0, _index2.assertNodeType)("Expression") + }, + body: { + validate: (0, _index2.assertNodeType)("BlockStatement", "Statement") + } + } +}); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/es2015.js b/socket/node_modules/babel-types/lib/definitions/es2015.js new file mode 100644 index 0000000..5f57b44 --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/es2015.js @@ -0,0 +1,354 @@ +"use strict"; + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _index2.default)("AssignmentPattern", { + visitor: ["left", "right"], + aliases: ["Pattern", "LVal"], + fields: { + left: { + validate: (0, _index.assertNodeType)("Identifier") + }, + right: { + validate: (0, _index.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } +}); + +(0, _index2.default)("ArrayPattern", { + visitor: ["elements", "typeAnnotation"], + aliases: ["Pattern", "LVal"], + fields: { + elements: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Identifier", "Pattern", "RestElement"))) + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } +}); + +(0, _index2.default)("ArrowFunctionExpression", { + builder: ["params", "body", "async"], + visitor: ["params", "body", "returnType", "typeParameters"], + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: { + params: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index.assertNodeType)("BlockStatement", "Expression") + }, + async: { + validate: (0, _index.assertValueType)("boolean"), + default: false + } + } +}); + +(0, _index2.default)("ClassBody", { + visitor: ["body"], + fields: { + body: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ClassMethod", "ClassProperty"))) + } + } +}); + +(0, _index2.default)("ClassDeclaration", { + builder: ["id", "superClass", "body", "decorators"], + visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], + aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], + fields: { + id: { + validate: (0, _index.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _index.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } +}); + +(0, _index2.default)("ClassExpression", { + inherits: "ClassDeclaration", + aliases: ["Scopable", "Class", "Expression", "Pureish"], + fields: { + id: { + optional: true, + validate: (0, _index.assertNodeType)("Identifier") + }, + body: { + validate: (0, _index.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _index.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } +}); + +(0, _index2.default)("ExportAllDeclaration", { + visitor: ["source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + source: { + validate: (0, _index.assertNodeType)("StringLiteral") + } + } +}); + +(0, _index2.default)("ExportDefaultDeclaration", { + visitor: ["declaration"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _index.assertNodeType)("FunctionDeclaration", "ClassDeclaration", "Expression") + } + } +}); + +(0, _index2.default)("ExportNamedDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _index.assertNodeType)("Declaration"), + optional: true + }, + specifiers: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ExportSpecifier"))) + }, + source: { + validate: (0, _index.assertNodeType)("StringLiteral"), + optional: true + } + } +}); + +(0, _index2.default)("ExportSpecifier", { + visitor: ["local", "exported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + }, + exported: { + validate: (0, _index.assertNodeType)("Identifier") + } + } +}); + +(0, _index2.default)("ForOfStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _index.assertNodeType)("Expression") + }, + body: { + validate: (0, _index.assertNodeType)("Statement") + } + } +}); + +(0, _index2.default)("ImportDeclaration", { + visitor: ["specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration"], + fields: { + specifiers: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) + }, + source: { + validate: (0, _index.assertNodeType)("StringLiteral") + } + } +}); + +(0, _index2.default)("ImportDefaultSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + } + } +}); + +(0, _index2.default)("ImportNamespaceSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + } + } +}); + +(0, _index2.default)("ImportSpecifier", { + visitor: ["local", "imported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _index.assertNodeType)("Identifier") + }, + imported: { + validate: (0, _index.assertNodeType)("Identifier") + }, + importKind: { + validate: (0, _index.assertOneOf)(null, "type", "typeof") + } + } +}); + +(0, _index2.default)("MetaProperty", { + visitor: ["meta", "property"], + aliases: ["Expression"], + fields: { + meta: { + validate: (0, _index.assertValueType)("string") + }, + property: { + validate: (0, _index.assertValueType)("string") + } + } +}); + +(0, _index2.default)("ClassMethod", { + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], + builder: ["kind", "key", "params", "body", "computed", "static"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + fields: { + kind: { + validate: (0, _index.chain)((0, _index.assertValueType)("string"), (0, _index.assertOneOf)("get", "set", "method", "constructor")), + default: "method" + }, + computed: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + static: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + key: { + validate: function validate(node, key, val) { + var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; + _index.assertNodeType.apply(undefined, expectedTypes)(node, key, val); + } + }, + params: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal"))) + }, + body: { + validate: (0, _index.assertNodeType)("BlockStatement") + }, + generator: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + async: { + default: false, + validate: (0, _index.assertValueType)("boolean") + } + } +}); + +(0, _index2.default)("ObjectPattern", { + visitor: ["properties", "typeAnnotation"], + aliases: ["Pattern", "LVal"], + fields: { + properties: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("RestProperty", "Property"))) + }, + decorators: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) + } + } +}); + +(0, _index2.default)("SpreadElement", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); + +(0, _index2.default)("Super", { + aliases: ["Expression"] +}); + +(0, _index2.default)("TaggedTemplateExpression", { + visitor: ["tag", "quasi"], + aliases: ["Expression"], + fields: { + tag: { + validate: (0, _index.assertNodeType)("Expression") + }, + quasi: { + validate: (0, _index.assertNodeType)("TemplateLiteral") + } + } +}); + +(0, _index2.default)("TemplateElement", { + builder: ["value", "tail"], + fields: { + value: {}, + tail: { + validate: (0, _index.assertValueType)("boolean"), + default: false + } + } +}); + +(0, _index2.default)("TemplateLiteral", { + visitor: ["quasis", "expressions"], + aliases: ["Expression", "Literal"], + fields: { + quasis: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("TemplateElement"))) + }, + expressions: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Expression"))) + } + } +}); + +(0, _index2.default)("YieldExpression", { + builder: ["argument", "delegate"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + delegate: { + validate: (0, _index.assertValueType)("boolean"), + default: false + }, + argument: { + optional: true, + validate: (0, _index.assertNodeType)("Expression") + } + } +}); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/experimental.js b/socket/node_modules/babel-types/lib/definitions/experimental.js new file mode 100644 index 0000000..d65d609 --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/experimental.js @@ -0,0 +1,103 @@ +"use strict"; + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _index2.default)("AwaitExpression", { + builder: ["argument"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); + +(0, _index2.default)("ForAwaitStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _index.assertNodeType)("Expression") + }, + body: { + validate: (0, _index.assertNodeType)("Statement") + } + } +}); + +(0, _index2.default)("BindExpression", { + visitor: ["object", "callee"], + aliases: ["Expression"], + fields: {} +}); + +(0, _index2.default)("Import", { + aliases: ["Expression"] +}); + +(0, _index2.default)("Decorator", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); + +(0, _index2.default)("DoExpression", { + visitor: ["body"], + aliases: ["Expression"], + fields: { + body: { + validate: (0, _index.assertNodeType)("BlockStatement") + } + } +}); + +(0, _index2.default)("ExportDefaultSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _index.assertNodeType)("Identifier") + } + } +}); + +(0, _index2.default)("ExportNamespaceSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _index.assertNodeType)("Identifier") + } + } +}); + +(0, _index2.default)("RestProperty", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("LVal") + } + } +}); + +(0, _index2.default)("SpreadProperty", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/flow.js b/socket/node_modules/babel-types/lib/definitions/flow.js new file mode 100644 index 0000000..89c6302 --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/flow.js @@ -0,0 +1,285 @@ +"use strict"; + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _index2.default)("AnyTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} +}); + +(0, _index2.default)("ArrayTypeAnnotation", { + visitor: ["elementType"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("BooleanTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} +}); + +(0, _index2.default)("BooleanLiteralTypeAnnotation", { + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("NullLiteralTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} +}); + +(0, _index2.default)("ClassImplements", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("ClassProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + builder: ["key", "value", "typeAnnotation", "decorators", "computed"], + aliases: ["Property"], + fields: { + computed: { + validate: (0, _index.assertValueType)("boolean"), + default: false + } + } +}); + +(0, _index2.default)("DeclareClass", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareFunction", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareInterface", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareModule", { + visitor: ["id", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareModuleExports", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareTypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareOpaqueType", { + visitor: ["id", "typeParameters", "supertype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareVariable", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("DeclareExportDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("ExistentialTypeParam", { + aliases: ["Flow"] +}); + +(0, _index2.default)("FunctionTypeAnnotation", { + visitor: ["typeParameters", "params", "rest", "returnType"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("FunctionTypeParam", { + visitor: ["name", "typeAnnotation"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("GenericTypeAnnotation", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("InterfaceExtends", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("InterfaceDeclaration", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("IntersectionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("MixedTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"] +}); + +(0, _index2.default)("EmptyTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"] +}); + +(0, _index2.default)("NullableTypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("NumericLiteralTypeAnnotation", { + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("NumberTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} +}); + +(0, _index2.default)("StringLiteralTypeAnnotation", { + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("StringTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} +}); + +(0, _index2.default)("ThisTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} +}); + +(0, _index2.default)("TupleTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("TypeofTypeAnnotation", { + visitor: ["argument"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("TypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("OpaqueType", { + visitor: ["id", "typeParameters", "impltype", "supertype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} +}); + +(0, _index2.default)("TypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("TypeCastExpression", { + visitor: ["expression", "typeAnnotation"], + aliases: ["Flow", "ExpressionWrapper", "Expression"], + fields: {} +}); + +(0, _index2.default)("TypeParameter", { + visitor: ["bound"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("TypeParameterDeclaration", { + visitor: ["params"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("TypeParameterInstantiation", { + visitor: ["params"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("ObjectTypeAnnotation", { + visitor: ["properties", "indexers", "callProperties"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("ObjectTypeCallProperty", { + visitor: ["value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} +}); + +(0, _index2.default)("ObjectTypeIndexer", { + visitor: ["id", "key", "value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} +}); + +(0, _index2.default)("ObjectTypeProperty", { + visitor: ["key", "value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} +}); + +(0, _index2.default)("ObjectTypeSpreadProperty", { + visitor: ["argument"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} +}); + +(0, _index2.default)("QualifiedTypeIdentifier", { + visitor: ["id", "qualification"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("UnionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} +}); + +(0, _index2.default)("VoidTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} +}); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/index.js b/socket/node_modules/babel-types/lib/definitions/index.js new file mode 100644 index 0000000..d512114 --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/index.js @@ -0,0 +1,249 @@ +"use strict"; + +exports.__esModule = true; +exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = undefined; + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _stringify = require("babel-runtime/core-js/json/stringify"); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = require("babel-runtime/helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +exports.assertEach = assertEach; +exports.assertOneOf = assertOneOf; +exports.assertNodeType = assertNodeType; +exports.assertNodeOrValueType = assertNodeOrValueType; +exports.assertValueType = assertValueType; +exports.chain = chain; +exports.default = defineType; + +var _index = require("../index"); + +var t = _interopRequireWildcard(_index); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var VISITOR_KEYS = exports.VISITOR_KEYS = {}; +var ALIAS_KEYS = exports.ALIAS_KEYS = {}; +var NODE_FIELDS = exports.NODE_FIELDS = {}; +var BUILDER_KEYS = exports.BUILDER_KEYS = {}; +var DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {}; + +function getType(val) { + if (Array.isArray(val)) { + return "array"; + } else if (val === null) { + return "null"; + } else if (val === undefined) { + return "undefined"; + } else { + return typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val); + } +} + +function assertEach(callback) { + function validator(node, key, val) { + if (!Array.isArray(val)) return; + + for (var i = 0; i < val.length; i++) { + callback(node, key + "[" + i + "]", val[i]); + } + } + validator.each = callback; + return validator; +} + +function assertOneOf() { + for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) { + vals[_key] = arguments[_key]; + } + + function validate(node, key, val) { + if (vals.indexOf(val) < 0) { + throw new TypeError("Property " + key + " expected value to be one of " + (0, _stringify2.default)(vals) + " but got " + (0, _stringify2.default)(val)); + } + } + + validate.oneOf = vals; + + return validate; +} + +function assertNodeType() { + for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + types[_key2] = arguments[_key2]; + } + + function validate(node, key, val) { + var valid = false; + + for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var type = _ref; + + if (t.is(type, val)) { + valid = true; + break; + } + } + + if (!valid) { + throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type))); + } + } + + validate.oneOfNodeTypes = types; + + return validate; +} + +function assertNodeOrValueType() { + for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + types[_key3] = arguments[_key3]; + } + + function validate(node, key, val) { + var valid = false; + + for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var type = _ref2; + + if (getType(val) === type || t.is(type, val)) { + valid = true; + break; + } + } + + if (!valid) { + throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type))); + } + } + + validate.oneOfNodeOrValueTypes = types; + + return validate; +} + +function assertValueType(type) { + function validate(node, key, val) { + var valid = getType(val) === type; + + if (!valid) { + throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val)); + } + } + + validate.type = type; + + return validate; +} + +function chain() { + for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + fns[_key4] = arguments[_key4]; + } + + function validate() { + for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var fn = _ref3; + + fn.apply(undefined, arguments); + } + } + validate.chainOf = fns; + return validate; +} + +function defineType(type) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var inherits = opts.inherits && store[opts.inherits] || {}; + + opts.fields = opts.fields || inherits.fields || {}; + opts.visitor = opts.visitor || inherits.visitor || []; + opts.aliases = opts.aliases || inherits.aliases || []; + opts.builder = opts.builder || inherits.builder || opts.visitor || []; + + if (opts.deprecatedAlias) { + DEPRECATED_KEYS[opts.deprecatedAlias] = type; + } + + for (var _iterator4 = opts.visitor.concat(opts.builder), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var _key5 = _ref4; + + opts.fields[_key5] = opts.fields[_key5] || {}; + } + + for (var key in opts.fields) { + var field = opts.fields[key]; + + if (opts.builder.indexOf(key) === -1) { + field.optional = true; + } + if (field.default === undefined) { + field.default = null; + } else if (!field.validate) { + field.validate = assertValueType(getType(field.default)); + } + } + + VISITOR_KEYS[type] = opts.visitor; + BUILDER_KEYS[type] = opts.builder; + NODE_FIELDS[type] = opts.fields; + ALIAS_KEYS[type] = opts.aliases; + + store[type] = opts; +} + +var store = {}; \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/init.js b/socket/node_modules/babel-types/lib/definitions/init.js new file mode 100644 index 0000000..a3334fe --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/init.js @@ -0,0 +1,15 @@ +"use strict"; + +require("./index"); + +require("./core"); + +require("./es2015"); + +require("./flow"); + +require("./jsx"); + +require("./misc"); + +require("./experimental"); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/jsx.js b/socket/node_modules/babel-types/lib/definitions/jsx.js new file mode 100644 index 0000000..1c0c066 --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/jsx.js @@ -0,0 +1,147 @@ +"use strict"; + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _index2.default)("JSXAttribute", { + visitor: ["name", "value"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXNamespacedName") + }, + value: { + optional: true, + validate: (0, _index.assertNodeType)("JSXElement", "StringLiteral", "JSXExpressionContainer") + } + } +}); + +(0, _index2.default)("JSXClosingElement", { + visitor: ["name"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + } + } +}); + +(0, _index2.default)("JSXElement", { + builder: ["openingElement", "closingElement", "children", "selfClosing"], + visitor: ["openingElement", "children", "closingElement"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingElement: { + validate: (0, _index.assertNodeType)("JSXOpeningElement") + }, + closingElement: { + optional: true, + validate: (0, _index.assertNodeType)("JSXClosingElement") + }, + children: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement"))) + } + } +}); + +(0, _index2.default)("JSXEmptyExpression", { + aliases: ["JSX", "Expression"] +}); + +(0, _index2.default)("JSXExpressionContainer", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); + +(0, _index2.default)("JSXSpreadChild", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); + +(0, _index2.default)("JSXIdentifier", { + builder: ["name"], + aliases: ["JSX", "Expression"], + fields: { + name: { + validate: (0, _index.assertValueType)("string") + } + } +}); + +(0, _index2.default)("JSXMemberExpression", { + visitor: ["object", "property"], + aliases: ["JSX", "Expression"], + fields: { + object: { + validate: (0, _index.assertNodeType)("JSXMemberExpression", "JSXIdentifier") + }, + property: { + validate: (0, _index.assertNodeType)("JSXIdentifier") + } + } +}); + +(0, _index2.default)("JSXNamespacedName", { + visitor: ["namespace", "name"], + aliases: ["JSX"], + fields: { + namespace: { + validate: (0, _index.assertNodeType)("JSXIdentifier") + }, + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier") + } + } +}); + +(0, _index2.default)("JSXOpeningElement", { + builder: ["name", "attributes", "selfClosing"], + visitor: ["name", "attributes"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + }, + selfClosing: { + default: false, + validate: (0, _index.assertValueType)("boolean") + }, + attributes: { + validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) + } + } +}); + +(0, _index2.default)("JSXSpreadAttribute", { + visitor: ["argument"], + aliases: ["JSX"], + fields: { + argument: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); + +(0, _index2.default)("JSXText", { + aliases: ["JSX", "Immutable"], + builder: ["value"], + fields: { + value: { + validate: (0, _index.assertValueType)("string") + } + } +}); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/definitions/misc.js b/socket/node_modules/babel-types/lib/definitions/misc.js new file mode 100644 index 0000000..f982b9a --- /dev/null +++ b/socket/node_modules/babel-types/lib/definitions/misc.js @@ -0,0 +1,21 @@ +"use strict"; + +var _index = require("./index"); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _index2.default)("Noop", { + visitor: [] +}); + +(0, _index2.default)("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { + expression: { + validate: (0, _index.assertNodeType)("Expression") + } + } +}); \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/flow.js b/socket/node_modules/babel-types/lib/flow.js new file mode 100644 index 0000000..2857915 --- /dev/null +++ b/socket/node_modules/babel-types/lib/flow.js @@ -0,0 +1,108 @@ +"use strict"; + +exports.__esModule = true; +exports.createUnionTypeAnnotation = createUnionTypeAnnotation; +exports.removeTypeDuplicates = removeTypeDuplicates; +exports.createTypeAnnotationBasedOnTypeof = createTypeAnnotationBasedOnTypeof; + +var _index = require("./index"); + +var t = _interopRequireWildcard(_index); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function createUnionTypeAnnotation(types) { + var flattened = removeTypeDuplicates(types); + + if (flattened.length === 1) { + return flattened[0]; + } else { + return t.unionTypeAnnotation(flattened); + } +} + +function removeTypeDuplicates(nodes) { + var generics = {}; + var bases = {}; + + var typeGroups = []; + + var types = []; + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (!node) continue; + + if (types.indexOf(node) >= 0) { + continue; + } + + if (t.isAnyTypeAnnotation(node)) { + return [node]; + } + + if (t.isFlowBaseAnnotation(node)) { + bases[node.type] = node; + continue; + } + + if (t.isUnionTypeAnnotation(node)) { + if (typeGroups.indexOf(node.types) < 0) { + nodes = nodes.concat(node.types); + typeGroups.push(node.types); + } + continue; + } + + if (t.isGenericTypeAnnotation(node)) { + var name = node.id.name; + + if (generics[name]) { + var existing = generics[name]; + if (existing.typeParameters) { + if (node.typeParameters) { + existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); + } + } else { + existing = node.typeParameters; + } + } else { + generics[name] = node; + } + + continue; + } + + types.push(node); + } + + for (var type in bases) { + types.push(bases[type]); + } + + for (var _name in generics) { + types.push(generics[_name]); + } + + return types; +} + +function createTypeAnnotationBasedOnTypeof(type) { + if (type === "string") { + return t.stringTypeAnnotation(); + } else if (type === "number") { + return t.numberTypeAnnotation(); + } else if (type === "undefined") { + return t.voidTypeAnnotation(); + } else if (type === "boolean") { + return t.booleanTypeAnnotation(); + } else if (type === "function") { + return t.genericTypeAnnotation(t.identifier("Function")); + } else if (type === "object") { + return t.genericTypeAnnotation(t.identifier("Object")); + } else if (type === "symbol") { + return t.genericTypeAnnotation(t.identifier("Symbol")); + } else { + throw new Error("Invalid typeof value"); + } +} \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/index.js b/socket/node_modules/babel-types/lib/index.js new file mode 100644 index 0000000..4c00703 --- /dev/null +++ b/socket/node_modules/babel-types/lib/index.js @@ -0,0 +1,835 @@ +"use strict"; + +exports.__esModule = true; +exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isNodesEquivalent = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined; + +var _getOwnPropertySymbols = require("babel-runtime/core-js/object/get-own-property-symbols"); + +var _getOwnPropertySymbols2 = _interopRequireDefault(_getOwnPropertySymbols); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +var _stringify = require("babel-runtime/core-js/json/stringify"); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _constants = require("./constants"); + +Object.defineProperty(exports, "STATEMENT_OR_BLOCK_KEYS", { + enumerable: true, + get: function get() { + return _constants.STATEMENT_OR_BLOCK_KEYS; + } +}); +Object.defineProperty(exports, "FLATTENABLE_KEYS", { + enumerable: true, + get: function get() { + return _constants.FLATTENABLE_KEYS; + } +}); +Object.defineProperty(exports, "FOR_INIT_KEYS", { + enumerable: true, + get: function get() { + return _constants.FOR_INIT_KEYS; + } +}); +Object.defineProperty(exports, "COMMENT_KEYS", { + enumerable: true, + get: function get() { + return _constants.COMMENT_KEYS; + } +}); +Object.defineProperty(exports, "LOGICAL_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.LOGICAL_OPERATORS; + } +}); +Object.defineProperty(exports, "UPDATE_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.UPDATE_OPERATORS; + } +}); +Object.defineProperty(exports, "BOOLEAN_NUMBER_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BOOLEAN_NUMBER_BINARY_OPERATORS; + } +}); +Object.defineProperty(exports, "EQUALITY_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.EQUALITY_BINARY_OPERATORS; + } +}); +Object.defineProperty(exports, "COMPARISON_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.COMPARISON_BINARY_OPERATORS; + } +}); +Object.defineProperty(exports, "BOOLEAN_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BOOLEAN_BINARY_OPERATORS; + } +}); +Object.defineProperty(exports, "NUMBER_BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.NUMBER_BINARY_OPERATORS; + } +}); +Object.defineProperty(exports, "BINARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BINARY_OPERATORS; + } +}); +Object.defineProperty(exports, "BOOLEAN_UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.BOOLEAN_UNARY_OPERATORS; + } +}); +Object.defineProperty(exports, "NUMBER_UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.NUMBER_UNARY_OPERATORS; + } +}); +Object.defineProperty(exports, "STRING_UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.STRING_UNARY_OPERATORS; + } +}); +Object.defineProperty(exports, "UNARY_OPERATORS", { + enumerable: true, + get: function get() { + return _constants.UNARY_OPERATORS; + } +}); +Object.defineProperty(exports, "INHERIT_KEYS", { + enumerable: true, + get: function get() { + return _constants.INHERIT_KEYS; + } +}); +Object.defineProperty(exports, "BLOCK_SCOPED_SYMBOL", { + enumerable: true, + get: function get() { + return _constants.BLOCK_SCOPED_SYMBOL; + } +}); +Object.defineProperty(exports, "NOT_LOCAL_BINDING", { + enumerable: true, + get: function get() { + return _constants.NOT_LOCAL_BINDING; + } +}); +exports.is = is; +exports.isType = isType; +exports.validate = validate; +exports.shallowEqual = shallowEqual; +exports.appendToMemberExpression = appendToMemberExpression; +exports.prependToMemberExpression = prependToMemberExpression; +exports.ensureBlock = ensureBlock; +exports.clone = clone; +exports.cloneWithoutLoc = cloneWithoutLoc; +exports.cloneDeep = cloneDeep; +exports.buildMatchMemberExpression = buildMatchMemberExpression; +exports.removeComments = removeComments; +exports.inheritsComments = inheritsComments; +exports.inheritTrailingComments = inheritTrailingComments; +exports.inheritLeadingComments = inheritLeadingComments; +exports.inheritInnerComments = inheritInnerComments; +exports.inherits = inherits; +exports.assertNode = assertNode; +exports.isNode = isNode; +exports.traverseFast = traverseFast; +exports.removeProperties = removeProperties; +exports.removePropertiesDeep = removePropertiesDeep; + +var _retrievers = require("./retrievers"); + +Object.defineProperty(exports, "getBindingIdentifiers", { + enumerable: true, + get: function get() { + return _retrievers.getBindingIdentifiers; + } +}); +Object.defineProperty(exports, "getOuterBindingIdentifiers", { + enumerable: true, + get: function get() { + return _retrievers.getOuterBindingIdentifiers; + } +}); + +var _validators = require("./validators"); + +Object.defineProperty(exports, "isBinding", { + enumerable: true, + get: function get() { + return _validators.isBinding; + } +}); +Object.defineProperty(exports, "isReferenced", { + enumerable: true, + get: function get() { + return _validators.isReferenced; + } +}); +Object.defineProperty(exports, "isValidIdentifier", { + enumerable: true, + get: function get() { + return _validators.isValidIdentifier; + } +}); +Object.defineProperty(exports, "isLet", { + enumerable: true, + get: function get() { + return _validators.isLet; + } +}); +Object.defineProperty(exports, "isBlockScoped", { + enumerable: true, + get: function get() { + return _validators.isBlockScoped; + } +}); +Object.defineProperty(exports, "isVar", { + enumerable: true, + get: function get() { + return _validators.isVar; + } +}); +Object.defineProperty(exports, "isSpecifierDefault", { + enumerable: true, + get: function get() { + return _validators.isSpecifierDefault; + } +}); +Object.defineProperty(exports, "isScope", { + enumerable: true, + get: function get() { + return _validators.isScope; + } +}); +Object.defineProperty(exports, "isImmutable", { + enumerable: true, + get: function get() { + return _validators.isImmutable; + } +}); +Object.defineProperty(exports, "isNodesEquivalent", { + enumerable: true, + get: function get() { + return _validators.isNodesEquivalent; + } +}); + +var _converters = require("./converters"); + +Object.defineProperty(exports, "toComputedKey", { + enumerable: true, + get: function get() { + return _converters.toComputedKey; + } +}); +Object.defineProperty(exports, "toSequenceExpression", { + enumerable: true, + get: function get() { + return _converters.toSequenceExpression; + } +}); +Object.defineProperty(exports, "toKeyAlias", { + enumerable: true, + get: function get() { + return _converters.toKeyAlias; + } +}); +Object.defineProperty(exports, "toIdentifier", { + enumerable: true, + get: function get() { + return _converters.toIdentifier; + } +}); +Object.defineProperty(exports, "toBindingIdentifierName", { + enumerable: true, + get: function get() { + return _converters.toBindingIdentifierName; + } +}); +Object.defineProperty(exports, "toStatement", { + enumerable: true, + get: function get() { + return _converters.toStatement; + } +}); +Object.defineProperty(exports, "toExpression", { + enumerable: true, + get: function get() { + return _converters.toExpression; + } +}); +Object.defineProperty(exports, "toBlock", { + enumerable: true, + get: function get() { + return _converters.toBlock; + } +}); +Object.defineProperty(exports, "valueToNode", { + enumerable: true, + get: function get() { + return _converters.valueToNode; + } +}); + +var _flow = require("./flow"); + +Object.defineProperty(exports, "createUnionTypeAnnotation", { + enumerable: true, + get: function get() { + return _flow.createUnionTypeAnnotation; + } +}); +Object.defineProperty(exports, "removeTypeDuplicates", { + enumerable: true, + get: function get() { + return _flow.removeTypeDuplicates; + } +}); +Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { + enumerable: true, + get: function get() { + return _flow.createTypeAnnotationBasedOnTypeof; + } +}); + +var _toFastProperties = require("to-fast-properties"); + +var _toFastProperties2 = _interopRequireDefault(_toFastProperties); + +var _clone = require("lodash/clone"); + +var _clone2 = _interopRequireDefault(_clone); + +var _uniq = require("lodash/uniq"); + +var _uniq2 = _interopRequireDefault(_uniq); + +require("./definitions/init"); + +var _definitions = require("./definitions"); + +var _react2 = require("./react"); + +var _react = _interopRequireWildcard(_react2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var t = exports; + +function registerType(type) { + var is = t["is" + type]; + if (!is) { + is = t["is" + type] = function (node, opts) { + return t.is(type, node, opts); + }; + } + + t["assert" + type] = function (node, opts) { + opts = opts || {}; + if (!is(node, opts)) { + throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts)); + } + }; +} + +exports.VISITOR_KEYS = _definitions.VISITOR_KEYS; +exports.ALIAS_KEYS = _definitions.ALIAS_KEYS; +exports.NODE_FIELDS = _definitions.NODE_FIELDS; +exports.BUILDER_KEYS = _definitions.BUILDER_KEYS; +exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS; +exports.react = _react; + + +for (var type in t.VISITOR_KEYS) { + registerType(type); +} + +t.FLIPPED_ALIAS_KEYS = {}; + +(0, _keys2.default)(t.ALIAS_KEYS).forEach(function (type) { + t.ALIAS_KEYS[type].forEach(function (alias) { + var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || []; + types.push(type); + }); +}); + +(0, _keys2.default)(t.FLIPPED_ALIAS_KEYS).forEach(function (type) { + t[type.toUpperCase() + "_TYPES"] = t.FLIPPED_ALIAS_KEYS[type]; + registerType(type); +}); + +var TYPES = exports.TYPES = (0, _keys2.default)(t.VISITOR_KEYS).concat((0, _keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0, _keys2.default)(t.DEPRECATED_KEYS)); + +function is(type, node, opts) { + if (!node) return false; + + var matches = isType(node.type, type); + if (!matches) return false; + + if (typeof opts === "undefined") { + return true; + } else { + return t.shallowEqual(node, opts); + } +} + +function isType(nodeType, targetType) { + if (nodeType === targetType) return true; + + if (t.ALIAS_KEYS[targetType]) return false; + + var aliases = t.FLIPPED_ALIAS_KEYS[targetType]; + if (aliases) { + if (aliases[0] === nodeType) return true; + + for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var alias = _ref; + + if (nodeType === alias) return true; + } + } + + return false; +} + +(0, _keys2.default)(t.BUILDER_KEYS).forEach(function (type) { + var keys = t.BUILDER_KEYS[type]; + + function builder() { + if (arguments.length > keys.length) { + throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length)); + } + + var node = {}; + node.type = type; + + var i = 0; + + for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _key = _ref2; + + var field = t.NODE_FIELDS[type][_key]; + + var arg = arguments[i++]; + if (arg === undefined) arg = (0, _clone2.default)(field.default); + + node[_key] = arg; + } + + for (var key in node) { + validate(node, key, node[key]); + } + + return node; + } + + t[type] = builder; + t[type[0].toLowerCase() + type.slice(1)] = builder; +}); + +var _loop = function _loop(_type) { + var newType = t.DEPRECATED_KEYS[_type]; + + function proxy(fn) { + return function () { + console.trace("The node type " + _type + " has been renamed to " + newType); + return fn.apply(this, arguments); + }; + } + + t[_type] = t[_type[0].toLowerCase() + _type.slice(1)] = proxy(t[newType]); + t["is" + _type] = proxy(t["is" + newType]); + t["assert" + _type] = proxy(t["assert" + newType]); +}; + +for (var _type in t.DEPRECATED_KEYS) { + _loop(_type); +} + +function validate(node, key, val) { + if (!node) return; + + var fields = t.NODE_FIELDS[node.type]; + if (!fields) return; + + var field = fields[key]; + if (!field || !field.validate) return; + if (field.optional && val == null) return; + + field.validate(node, key, val); +} + +function shallowEqual(actual, expected) { + var keys = (0, _keys2.default)(expected); + + for (var _iterator3 = keys, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var key = _ref3; + + if (actual[key] !== expected[key]) { + return false; + } + } + + return true; +} + +function appendToMemberExpression(member, append, computed) { + member.object = t.memberExpression(member.object, member.property, member.computed); + member.property = append; + member.computed = !!computed; + return member; +} + +function prependToMemberExpression(member, prepend) { + member.object = t.memberExpression(prepend, member.object); + return member; +} + +function ensureBlock(node) { + var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "body"; + + return node[key] = t.toBlock(node[key], node); +} + +function clone(node) { + if (!node) return node; + var newNode = {}; + for (var key in node) { + if (key[0] === "_") continue; + newNode[key] = node[key]; + } + return newNode; +} + +function cloneWithoutLoc(node) { + var newNode = clone(node); + delete newNode.loc; + return newNode; +} + +function cloneDeep(node) { + if (!node) return node; + var newNode = {}; + + for (var key in node) { + if (key[0] === "_") continue; + + var val = node[key]; + + if (val) { + if (val.type) { + val = t.cloneDeep(val); + } else if (Array.isArray(val)) { + val = val.map(t.cloneDeep); + } + } + + newNode[key] = val; + } + + return newNode; +} + +function buildMatchMemberExpression(match, allowPartial) { + var parts = match.split("."); + + return function (member) { + if (!t.isMemberExpression(member)) return false; + + var search = [member]; + var i = 0; + + while (search.length) { + var node = search.shift(); + + if (allowPartial && i === parts.length) { + return true; + } + + if (t.isIdentifier(node)) { + if (parts[i] !== node.name) return false; + } else if (t.isStringLiteral(node)) { + if (parts[i] !== node.value) return false; + } else if (t.isMemberExpression(node)) { + if (node.computed && !t.isStringLiteral(node.property)) { + return false; + } else { + search.push(node.object); + search.push(node.property); + continue; + } + } else { + return false; + } + + if (++i > parts.length) { + return false; + } + } + + return true; + }; +} + +function removeComments(node) { + for (var _iterator4 = t.COMMENT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var key = _ref4; + + delete node[key]; + } + return node; +} + +function inheritsComments(child, parent) { + inheritTrailingComments(child, parent); + inheritLeadingComments(child, parent); + inheritInnerComments(child, parent); + return child; +} + +function inheritTrailingComments(child, parent) { + _inheritComments("trailingComments", child, parent); +} + +function inheritLeadingComments(child, parent) { + _inheritComments("leadingComments", child, parent); +} + +function inheritInnerComments(child, parent) { + _inheritComments("innerComments", child, parent); +} + +function _inheritComments(key, child, parent) { + if (child && parent) { + child[key] = (0, _uniq2.default)([].concat(child[key], parent[key]).filter(Boolean)); + } +} + +function inherits(child, parent) { + if (!child || !parent) return child; + + for (var _iterator5 = t.INHERIT_KEYS.optional, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var _key2 = _ref5; + + if (child[_key2] == null) { + child[_key2] = parent[_key2]; + } + } + + for (var key in parent) { + if (key[0] === "_") child[key] = parent[key]; + } + + for (var _iterator6 = t.INHERIT_KEYS.force, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var _key3 = _ref6; + + child[_key3] = parent[_key3]; + } + + t.inheritsComments(child, parent); + + return child; +} + +function assertNode(node) { + if (!isNode(node)) { + throw new TypeError("Not a valid node " + (node && node.type)); + } +} + +function isNode(node) { + return !!(node && _definitions.VISITOR_KEYS[node.type]); +} + +(0, _toFastProperties2.default)(t); +(0, _toFastProperties2.default)(t.VISITOR_KEYS); + +function traverseFast(node, enter, opts) { + if (!node) return; + + var keys = t.VISITOR_KEYS[node.type]; + if (!keys) return; + + opts = opts || {}; + enter(node, opts); + + for (var _iterator7 = keys, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var key = _ref7; + + var subNode = node[key]; + + if (Array.isArray(subNode)) { + for (var _iterator8 = subNode, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { + var _ref8; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref8 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref8 = _i8.value; + } + + var _node = _ref8; + + traverseFast(_node, enter, opts); + } + } else { + traverseFast(subNode, enter, opts); + } + } +} + +var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; + +var CLEAR_KEYS_PLUS_COMMENTS = t.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); + +function removeProperties(node, opts) { + opts = opts || {}; + var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; + for (var _iterator9 = map, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { + var _ref9; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref9 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref9 = _i9.value; + } + + var _key4 = _ref9; + + if (node[_key4] != null) node[_key4] = undefined; + } + + for (var key in node) { + if (key[0] === "_" && node[key] != null) node[key] = undefined; + } + + var syms = (0, _getOwnPropertySymbols2.default)(node); + for (var _iterator10 = syms, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) { + var _ref10; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref10 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref10 = _i10.value; + } + + var sym = _ref10; + + node[sym] = null; + } +} + +function removePropertiesDeep(tree, opts) { + traverseFast(tree, removeProperties, opts); + return tree; +} \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/react.js b/socket/node_modules/babel-types/lib/react.js new file mode 100644 index 0000000..923ee12 --- /dev/null +++ b/socket/node_modules/babel-types/lib/react.js @@ -0,0 +1,80 @@ +"use strict"; + +exports.__esModule = true; +exports.isReactComponent = undefined; +exports.isCompatTag = isCompatTag; +exports.buildChildren = buildChildren; + +var _index = require("./index"); + +var t = _interopRequireWildcard(_index); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var isReactComponent = exports.isReactComponent = t.buildMatchMemberExpression("React.Component"); + +function isCompatTag(tagName) { + return !!tagName && /^[a-z]|\-/.test(tagName); +} + +function cleanJSXElementLiteralChild(child, args) { + var lines = child.value.split(/\r\n|\n|\r/); + + var lastNonEmptyLine = 0; + + for (var i = 0; i < lines.length; i++) { + if (lines[i].match(/[^ \t]/)) { + lastNonEmptyLine = i; + } + } + + var str = ""; + + for (var _i = 0; _i < lines.length; _i++) { + var line = lines[_i]; + + var isFirstLine = _i === 0; + var isLastLine = _i === lines.length - 1; + var isLastNonEmptyLine = _i === lastNonEmptyLine; + + var trimmedLine = line.replace(/\t/g, " "); + + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ""); + } + + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ""); + } + + if (trimmedLine) { + if (!isLastNonEmptyLine) { + trimmedLine += " "; + } + + str += trimmedLine; + } + } + + if (str) args.push(t.stringLiteral(str)); +} + +function buildChildren(node) { + var elems = []; + + for (var i = 0; i < node.children.length; i++) { + var child = node.children[i]; + + if (t.isJSXText(child)) { + cleanJSXElementLiteralChild(child, elems); + continue; + } + + if (t.isJSXExpressionContainer(child)) child = child.expression; + if (t.isJSXEmptyExpression(child)) continue; + + elems.push(child); + } + + return elems; +} \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/retrievers.js b/socket/node_modules/babel-types/lib/retrievers.js new file mode 100644 index 0000000..ae7987f --- /dev/null +++ b/socket/node_modules/babel-types/lib/retrievers.js @@ -0,0 +1,116 @@ +"use strict"; + +exports.__esModule = true; + +var _create = require("babel-runtime/core-js/object/create"); + +var _create2 = _interopRequireDefault(_create); + +exports.getBindingIdentifiers = getBindingIdentifiers; +exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; + +var _index = require("./index"); + +var t = _interopRequireWildcard(_index); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getBindingIdentifiers(node, duplicates, outerOnly) { + var search = [].concat(node); + var ids = (0, _create2.default)(null); + + while (search.length) { + var id = search.shift(); + if (!id) continue; + + var keys = t.getBindingIdentifiers.keys[id.type]; + + if (t.isIdentifier(id)) { + if (duplicates) { + var _ids = ids[id.name] = ids[id.name] || []; + _ids.push(id); + } else { + ids[id.name] = id; + } + continue; + } + + if (t.isExportDeclaration(id)) { + if (t.isDeclaration(id.declaration)) { + search.push(id.declaration); + } + continue; + } + + if (outerOnly) { + if (t.isFunctionDeclaration(id)) { + search.push(id.id); + continue; + } + + if (t.isFunctionExpression(id)) { + continue; + } + } + + if (keys) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (id[key]) { + search = search.concat(id[key]); + } + } + } + } + + return ids; +} + +getBindingIdentifiers.keys = { + DeclareClass: ["id"], + DeclareFunction: ["id"], + DeclareModule: ["id"], + DeclareVariable: ["id"], + InterfaceDeclaration: ["id"], + TypeAlias: ["id"], + OpaqueType: ["id"], + + CatchClause: ["param"], + LabeledStatement: ["label"], + UnaryExpression: ["argument"], + AssignmentExpression: ["left"], + + ImportSpecifier: ["local"], + ImportNamespaceSpecifier: ["local"], + ImportDefaultSpecifier: ["local"], + ImportDeclaration: ["specifiers"], + + ExportSpecifier: ["exported"], + ExportNamespaceSpecifier: ["exported"], + ExportDefaultSpecifier: ["exported"], + + FunctionDeclaration: ["id", "params"], + FunctionExpression: ["id", "params"], + + ClassDeclaration: ["id"], + ClassExpression: ["id"], + + RestElement: ["argument"], + UpdateExpression: ["argument"], + + RestProperty: ["argument"], + ObjectProperty: ["value"], + + AssignmentPattern: ["left"], + ArrayPattern: ["elements"], + ObjectPattern: ["properties"], + + VariableDeclaration: ["declarations"], + VariableDeclarator: ["id"] +}; + +function getOuterBindingIdentifiers(node, duplicates) { + return getBindingIdentifiers(node, duplicates, true); +} \ No newline at end of file diff --git a/socket/node_modules/babel-types/lib/validators.js b/socket/node_modules/babel-types/lib/validators.js new file mode 100644 index 0000000..ec30e55 --- /dev/null +++ b/socket/node_modules/babel-types/lib/validators.js @@ -0,0 +1,265 @@ +"use strict"; + +exports.__esModule = true; + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +var _typeof2 = require("babel-runtime/helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.isBinding = isBinding; +exports.isReferenced = isReferenced; +exports.isValidIdentifier = isValidIdentifier; +exports.isLet = isLet; +exports.isBlockScoped = isBlockScoped; +exports.isVar = isVar; +exports.isSpecifierDefault = isSpecifierDefault; +exports.isScope = isScope; +exports.isImmutable = isImmutable; +exports.isNodesEquivalent = isNodesEquivalent; + +var _retrievers = require("./retrievers"); + +var _esutils = require("esutils"); + +var _esutils2 = _interopRequireDefault(_esutils); + +var _index = require("./index"); + +var t = _interopRequireWildcard(_index); + +var _constants = require("./constants"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBinding(node, parent) { + var keys = _retrievers.getBindingIdentifiers.keys[parent.type]; + if (keys) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var val = parent[key]; + if (Array.isArray(val)) { + if (val.indexOf(node) >= 0) return true; + } else { + if (val === node) return true; + } + } + } + + return false; +} + +function isReferenced(node, parent) { + switch (parent.type) { + case "BindExpression": + return parent.object === node || parent.callee === node; + + case "MemberExpression": + case "JSXMemberExpression": + if (parent.property === node && parent.computed) { + return true; + } else if (parent.object === node) { + return true; + } else { + return false; + } + + case "MetaProperty": + return false; + + case "ObjectProperty": + if (parent.key === node) { + return parent.computed; + } + + case "VariableDeclarator": + return parent.id !== node; + + case "ArrowFunctionExpression": + case "FunctionDeclaration": + case "FunctionExpression": + for (var _iterator = parent.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var param = _ref; + + if (param === node) return false; + } + + return parent.id !== node; + + case "ExportSpecifier": + if (parent.source) { + return false; + } else { + return parent.local === node; + } + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + + case "JSXAttribute": + return parent.name !== node; + + case "ClassProperty": + if (parent.key === node) { + return parent.computed; + } else { + return parent.value === node; + } + + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + + case "ClassDeclaration": + case "ClassExpression": + return parent.id !== node; + + case "ClassMethod": + case "ObjectMethod": + return parent.key === node && parent.computed; + + case "LabeledStatement": + return false; + + case "CatchClause": + return parent.param !== node; + + case "RestElement": + return false; + + case "AssignmentExpression": + return parent.right === node; + + case "AssignmentPattern": + return parent.right === node; + + case "ObjectPattern": + case "ArrayPattern": + return false; + } + + return true; +} + +function isValidIdentifier(name) { + if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) { + return false; + } else if (name === "await") { + return false; + } else { + return _esutils2.default.keyword.isIdentifierNameES6(name); + } +} + +function isLet(node) { + return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); +} + +function isBlockScoped(node) { + return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node); +} + +function isVar(node) { + return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; +} + +function isSpecifierDefault(specifier) { + return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" }); +} + +function isScope(node, parent) { + if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) { + return false; + } + + return t.isScopable(node); +} + +function isImmutable(node) { + if (t.isType(node.type, "Immutable")) return true; + + if (t.isIdentifier(node)) { + if (node.name === "undefined") { + return true; + } else { + return false; + } + } + + return false; +} + +function isNodesEquivalent(a, b) { + if ((typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || (typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || a == null || b == null) { + return a === b; + } + + if (a.type !== b.type) { + return false; + } + + var fields = (0, _keys2.default)(t.NODE_FIELDS[a.type] || a.type); + + for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var field = _ref2; + + if ((0, _typeof3.default)(a[field]) !== (0, _typeof3.default)(b[field])) { + return false; + } + + if (Array.isArray(a[field])) { + if (!Array.isArray(b[field])) { + return false; + } + if (a[field].length !== b[field].length) { + return false; + } + + for (var i = 0; i < a[field].length; i++) { + if (!isNodesEquivalent(a[field][i], b[field][i])) { + return false; + } + } + continue; + } + + if (!isNodesEquivalent(a[field], b[field])) { + return false; + } + } + + return true; +} \ No newline at end of file diff --git a/socket/node_modules/babel-types/package-lock.json b/socket/node_modules/babel-types/package-lock.json new file mode 100644 index 0000000..49fefe9 --- /dev/null +++ b/socket/node_modules/babel-types/package-lock.json @@ -0,0 +1,29 @@ +{ + "name": "babel-types", + "version": "6.25.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + } + } +} diff --git a/socket/node_modules/babel-types/package.json b/socket/node_modules/babel-types/package.json new file mode 100644 index 0000000..c2acabb --- /dev/null +++ b/socket/node_modules/babel-types/package.json @@ -0,0 +1,54 @@ +{ + "_from": "babel-types@^6.24.1", + "_id": "babel-types@6.26.0", + "_inBundle": false, + "_integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "_location": "/babel-types", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "babel-types@^6.24.1", + "name": "babel-types", + "escapedName": "babel-types", + "rawSpec": "^6.24.1", + "saveSpec": null, + "fetchSpec": "^6.24.1" + }, + "_requiredBy": [ + "/babel-helper-function-name", + "/babel-helper-get-function-arity", + "/babel-template", + "/babel-traverse" + ], + "_resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "_shasum": "a3b073f94ab49eb6fa55cd65227a334380632497", + "_spec": "babel-types@^6.24.1", + "_where": "/var/www/htdocs/coze/socket/node_modules/babel-helper-function-name", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "deprecated": false, + "description": "Babel Types is a Lodash-esque utility library for AST nodes", + "devDependencies": { + "babel-generator": "^6.26.0", + "babylon": "^6.18.0" + }, + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "babel-types", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-types" + }, + "version": "6.26.0" +} diff --git a/socket/node_modules/babylon/CHANGELOG.md b/socket/node_modules/babylon/CHANGELOG.md new file mode 100644 index 0000000..f5f1794 --- /dev/null +++ b/socket/node_modules/babylon/CHANGELOG.md @@ -0,0 +1,979 @@ +# Changelog + +> **Tags:** +> - :boom: [Breaking Change] +> - :eyeglasses: [Spec Compliancy] +> - :rocket: [New Feature] +> - :bug: [Bug Fix] +> - :memo: [Documentation] +> - :house: [Internal] +> - :nail_care: [Polish] + +> Semver Policy: https://github.com/babel/babylon#semver + +_Note: Gaps between patch versions are faulty, broken or test releases._ + +See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. + +## 6.17.4 (2017-06-18) + + * Fix comment attachment for call expressions (#575) (aardito2) + * Correctly put typeParameters on FunctionExpression (#585) (Daniel Tschinder) + +## 6.17.3 (2017-06-09) + + * Fix location info on FunctionTypeParam nodes (#565) (#571) (Michal Srb) + * Fix stmt value being the raw value (#557) (#558) (Daniel Tschinder) + +## 6.17.2 (2017-05-31) + + * Fixed disappearing comments following a trailing comma on the last property of an object literal or the last argument of a call expression (#478) (aardito2) + * Fix #437: only prohibit 'export type from "module" ' when flow is enabled (#438) (Kevin Gibbons) + * Fix handling of anonymous parameters in `flowParseObjectTypeMethodish`. (#526) (Max Schaefer) + * Convert argument of SpreadElement correctly to assignable (#518) (Daniel Tschinder) + +## 6.17.1 (2017-05-10) + + * Fix typo in flow spread operator error (Brian Ng) + * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) + * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) + * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) + * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) + * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) + * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) + +## 6.17.0 (2017-04-20) + + * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) + * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) + * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) + * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) + * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) + * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) + +## 6.16.0 (2017-02-23) + +### :rocket: New Feature + +***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) + +We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) + +We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. + +To enable `estree` mode simply add the plugin in the config: +```json +{ + "plugins": [ "estree" ] +} +``` + +If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. + +Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) + +Babylon exports a new function to parse a single expression + +```js +import { parseExpression } from 'babylon'; + +const ast = parseExpression('x || y && z', options); +``` + +The returned AST will only consist of the expression. The options are the same as for `parse()` + +Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) + +A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`. +Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... + +Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) + +Added support for function predicates which flow introduced in version 0.33.0 + +```js +declare function is_number(x: mixed): boolean %checks(typeof x === "number"); +``` + +Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) + +Added support for imports within module declarations which flow introduced in version 0.37.0 + +```js +declare module "C" { + import type { DT } from "D"; + declare export type CT = { D: DT }; +} +``` + +### :eyeglasses: Spec Compliancy + +Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) + +This example now correctly throws an error when there is a semicolon after the decorator: + +```js +class A { +@a; +foo(){} +} +``` + +Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) + +Using keywords in imports is not allowed anymore: + +```js +import { default } from "foo"; +import { a as debugger } from "foo"; +``` + +Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) + +In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. + +Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) + +The following code now correctly throws an error + +```js +import type { type a } from "foo"; +``` + +Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) + +Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. + +If you enable the flow plugin you can only define the type of the class properties, but not initialize them. + +Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) + +Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. + +```js +export default async function bar() {}; +``` + +### :nail_care: Polish + +Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) + +### :bug: Bug Fix + +Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) + +Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) + +ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) + +Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) + +Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) + +Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) + +Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) + +Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) + + +### :house: Internal + +Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) + +Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) + +Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) + +chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) + +Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) + +Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) + +Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) + +devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) + +Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) + +Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) + +### :memo: Documentation + +Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) + +Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) + +Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) + +AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) + +## 6.15.0 (2017-01-10) + +### :eyeglasses: Spec Compliancy + +Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) + +This change implements flows new shorthand import syntax +and where previously you had to write this code: + +```js +import {someValue} from "blah"; +import type {someType} from "blah"; +import typeof {someOtherValue} from "blah"; +``` + +you can now write it like this: + +```js +import { + someValue, + type someType, + typeof someOtherValue, +} from "blah"; +``` + +For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. + +flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) + +This change now allows a leading pipe everywhere types can be used: +```js +var f = (x): | 1 | 2 => 1; +``` + +Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) + +Previously babylon parsed the following exports, although they are not valid: +```js +export typeof foo; +export new Foo(); +export function() {}; +export for (;;); +export while(foo); +``` + +### :bug: Bug Fix + +Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) + +This fixes parsing of this case: + +```js +const map = { + [age <= 17] : 'Too young' +}; +``` + +Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) + +The following case produced an invalid AST +```js +
{/* foo */}
+``` + +Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) + +When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. + +Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) + +Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) + +### :house: Internal + +User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) + +Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) + +Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) + +Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) + +Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) + +Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) + +Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) + +chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) + +chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) + +## 6.14.1 (2016-11-17) + +### :bug: Bug Fix + +Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) + +```js +{ + "plugins": ["*"] +} +``` + +Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. + +## 6.14.0 (2016-11-16) + +### :eyeglasses: Spec Compliancy + +Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) + +[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) + +Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). + +``` +class enum {} // throws +class await {} // throws in strict mode (module) +``` + +Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) + +So where you used to have to write + +```js +type A = (x: string, y: boolean) => number; +type B = (z: string) => number; +type C = { [key: string]: number }; +``` + +you can now write (with flow 0.34.0) + +```js +type A = (string, boolean) => number; +type B = string => number; +type C = { [string]: number }; +``` + +Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) + +Supports these form now of specifying array types: + +```js +var a: number[][][][]; +var b: string[][]; +``` + +### :bug: Bug Fix + +Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) + +``` +declare module "foo" { declare module.exports: number } +declare module "foo" { declare module.exports: number; } // also allowed now +``` + +### :house: Internal + + * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) + * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) + * Add node 7 (Daniel Tschinder) + * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) + +## v6.13.1 (2016-10-26) + +### :nail_care: Polish + +- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) + +```js +const babylon = require('babylon'); +const ast = babylon.parse('var foo = "lol";'); +``` + +With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. + +**Without bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) + +**With bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) + +- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) +- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) + +## v6.13.0 (2016-10-21) + +### :eyeglasses: Spec Compliancy + +Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) + +> See https://flowtype.org/docs/variance.html for more information + +```js +type T = { +p: T }; +interface T { -p: T }; +declare class T { +[k:K]: V }; +class T { -[k:K]: V }; +class C2 { +p: T = e }; +``` + +Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) + +```js +({ __proto__: 1, __proto__: 2 }) // Throws an error now +``` + +### :bug: Bug Fix + +Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) + +```js +declare class A { + static: T; +} +``` + +Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) + +```js +var foo = { async, bar }; +``` + +### :nail_care: Polish + +Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) + +> This improves the performance slightly (because of hidden classes) + +### :house: Internal + +Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) + +Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) + +Readd missin .eslinignore for IDEs (Daniel Tschinder) + +Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) + +Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) + +Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) + +## v6.12.0 (2016-10-14) + +### :eyeglasses: Spec Compliancy + +Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) + +#### Dynamic Import + +- Proposal Repo: https://github.com/domenic/proposal-dynamic-import +- Championed by [@domenic](https://github.com/domenic) +- stage-2 +- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) + +> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript + +```js +import(`./section-modules/${link.dataset.entryModule}.js`) +.then(module => { + module.loadPageInto(main); +}) +``` + +Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) + +#### EmptyTypeAnnotation + +Just wasn't covered before. + +```js +type T = empty; +``` + +### :bug: Bug Fix + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing due to sparse array +export const { foo: [ ,, qux7 ] } = bar; +``` + +Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) + +```js +declare class X { + foobar(): void; + static foobar(): void; +} +``` + +Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) + +```js +class Foo { + delete(item: T): T { + return item; + } +} +``` + +Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) + +```js +function *foo() { + const x = (yield 5: any); +} +``` + +### :nail_care: Polish + +Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) + +```js +// Unexpected token, expected ; (1:6) +{ set 1 } +``` + +### :house: Internal + +Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) + +Also run flow, linting, babel tests on seperate instances (add back node 0.10) + +## v6.11.6 (2016-10-12) + +### :bug: Bug Fix/Regression + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing with `Cannot read property 'type' of null` because of null identifiers +export const { foo: [ ,, qux7 ] } = bar; +``` + +## v6.11.5 (2016-10-12) + +### :eyeglasses: Spec Compliancy + +Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:20) +export function foo() {}; +export const { a: [{foo}] } = bar; +``` + +Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:22) +export const foo = 1; +export const [bar, ...foo] = baz; +``` + +### :bug: Bug Fix + +Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) + +```js +// this is ok now +const test = ({async = true}) => {}; +``` + +### :nail_care: Polish + +Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) + +```bash +# So in the case of a missing ending curly (`}`) +Module build failed: SyntaxError: Unexpected token, expected } (30:0) + 28 | } + 29 | +> 30 | + | ^ +``` + +## v6.11.4 (2016-10-03) + +Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) + +## v6.11.3 (2016-10-01) + +### :eyeglasses: Spec Compliancy + +Add static errors for object rest (#149) ([@danez](https://github.com/danez)) + +> https://github.com/sebmarkbage/ecmascript-rest-spread + +Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. + +```js +let { x, y, ...z } = { x: 1, y: 2, z: 3 }; +// x = 1 +// y = 2 +// z = { z: 3 } +``` + +#### New Syntax Errors: + +**SyntaxError**: The rest element has to be the last element when destructuring (1:10) +```bash +> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = { x: 1, y: 2, z: 3 } +# y = 2 +# z = 3 +``` + +Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. + +**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) + +```bash +> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = 1 +# y = { y: 2, z: 3 } +# z = { y: 2, z: 3 } +``` + +Before y and z would just be the same value anyway so there is no reason to need to have both. + +**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) + +```js +let { x, y, ...z, } = obj; +``` + +The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. + +--- + +get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) + +```js +// valid +function something({ set = null, get = null }) {} +``` + +## v6.11.2 (2016-09-23) + +### Bug Fix + +- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo + +```js +// regression with duplicate export check +SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) + 20 | + 21 | export const { rhythm } = typography; +> 22 | export const { TypographyStyle } = typography +``` + +Bail out for now, and make a change to account for destructuring in the next release. + +## 6.11.1 (2016-09-22) + +### Bug Fix +- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez + +```javascript +export toString from './toString'; +``` + +```bash +`toString` has already been exported. Exported identifiers must be unique. (1:7) +> 1 | export toString from './toString'; + | ^ + 2 | +``` + +## 6.11.0 (2016-09-22) + +### Spec Compliancy (will break CI) + +- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo + +```js +// Only one default export allowed per module. (2:9) +export default function() {}; +export { foo as default }; + +// Only one default export allowed per module. (2:0) +export default {}; +export default function() {}; + +// `Foo` has already been exported. Exported identifiers must be unique. (2:0) +export { Foo }; +export class Foo {}; +``` + +### New Feature (Syntax) + +- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 + +```js +// AST +interface ClassProperty <: Node { + type: "ClassProperty"; + key: Identifier; + value: Expression; + computed: boolean; // added +} +``` + +```js +// with "plugins": ["classProperties"] +class Foo { + [x] + ['y'] +} + +class Bar { + [p] + [m] () {} +} + ``` + +### Bug Fix + +- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper + +```js +declare class X { + a: number; + static b: number; // static + c: number; // this was being marked as static in the AST as well +} +``` + +### Polish + +- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 + +```js +// Used to error with: +// SyntaxError: Assigning to rvalue (1:0) + +// Now: +// Invalid left-hand side in assignment expression (1:0) +3 = 4 + +// Invalid left-hand side in for-in statement (1:5) +for (+i in {}); +``` + +### Internal + +- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez +- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo + +## 6.10.0 (2016-09-19) + +> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. + +### Spec Compliancy + +* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) + +> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors + +More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) + +For example: + +```js +// this errors because it uses destructuring and default parameters +// in a function with a "use strict" directive +function a([ option1, option2 ] = []) { + "use strict"; +} + ``` + +The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. + +### New Feature + +* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) + +Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 + +Looks like: + +```js +var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; +``` + +### Bug Fixes + +* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) +* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) +* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) + +### Misc + +* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) +* Fix Contributing guidelines [skip ci] (Daniel Tschinder) + +## 6.9.2 (2016-09-09) + +The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. + +## 6.9.1 (2016-08-23) + +This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. + +### Bug Fixes + +- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez +- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez +- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper +- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez +- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez + +## 6.9.0 (2016-08-16) + +### New syntax support + +- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer + +(Be aware that React is not going to support this syntax) + +```js +
+ {...todos.map(todo => )} +
+``` + +- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez + +```js +declare module "foo" { + declare module.exports: {} +} +``` + +### New Features + +- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain +- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens + +### Bug Fixes + +- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez +- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez +- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi +- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez +- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi +- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez +- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez + +### Internal + +- Add codecoverage to tests @danez +- Fix tests to not save expected output if we expect the test to fail @danez +- Make a shallow clone of babel for testing @danez +- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot +- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot +- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot +- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot + +## 6.8.4 (2016-07-06) + +### Bug Fixes + +- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez + +## 6.8.3 (2016-07-02) + +### Bug Fixes + +- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez + +## 6.8.2 (2016-06-24) + +### Bug Fixes + +- Fix parse error with yielding jsx elements in generators `function* it() { yield ; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal +- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez +- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez +- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez +- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez +- Support negative numeric type literals @kittens +- Remove line terminator restriction after await keyword @kittens +- Remove grouped type arrow restriction as it seems flow no longer has it @kittens +- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin +- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi + +### Documentation + +- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene +- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo + +### Internal + +- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez +- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez +- Upgrade test runner ava @kittens +- Add missing generate-identifier-regex script @kittens +- Rename parser context types @kittens +- Add node v6 to travis testing @hzoo +- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens + +## 6.8.1 (2016-06-06) + +### New Feature + +- Parse type parameter declarations with defaults like `type Foo = T` + +### Bug Fixes +- Type parameter declarations need 1 or more type parameters. +- The existential type `*` is not a valid type parameter. +- The existential type `*` is a primary type + +### Spec Compliancy +- The param list for type parameter declarations now consists of `TypeParameter` nodes +- New `TypeParameter` AST Node (replaces using the `Identifier` node before) + +``` +interface TypeParameter <: Node { + bound: TypeAnnotation; + default: TypeAnnotation; + name: string; + variance: "plus" | "minus"; +} +``` + +## 6.8.0 (2016-05-02) + +#### New Feature + +##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) + +> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). + +Examples: + +```js +class Foo { + constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} +} + +export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} + +var obj = { + method(@foo() x, @bar({ a: 123 }) @baz() y) {} +}; +``` + +##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) + +There is also a new node type, `ForAwaitStatement`. + +> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). + +Example: + +```js +async function f() { + for await (let x of y); +} +``` diff --git a/socket/node_modules/babylon/LICENSE b/socket/node_modules/babylon/LICENSE new file mode 100644 index 0000000..d4c7fc5 --- /dev/null +++ b/socket/node_modules/babylon/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +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. diff --git a/socket/node_modules/babylon/README.md b/socket/node_modules/babylon/README.md new file mode 100644 index 0000000..ad2a8fd --- /dev/null +++ b/socket/node_modules/babylon/README.md @@ -0,0 +1,134 @@ +

+ babylon +

+ +

+ Babylon is a JavaScript parser used in Babel. +

+ +

+ Travis Status + Codecov Status +

+ + - The latest ECMAScript version enabled by default (ES2017). + - Comment attachment. + - Support for JSX and Flow. + - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)). + +## Credits + +Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx), +thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh). + +Significant diversions are expected to occur in the future such as streaming, EBNF definitions, sweet.js integration, interspatial parsing and more. + +## API + +### `babylon.parse(code, [options])` + +### `babylon.parseExpression(code, [options])` + +`parse()` parses the provided `code` as an entire ECMAScript program, while +`parseExpression()` tries to parse a single Expression with performance in +mind. When in doubt, use `.parse()`. + +### Options + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed. + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowSuperOutsideMethod**: TODO + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. + +- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files. + +- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools. + +- **plugins**: Array containing the plugins that you want to enable. + +- **strictMode**: TODO + +### Output + +Babylon generates AST according to [Babel AST format][]. +It is based on [ESTree spec][] with the following deviations: + +> There is now an `estree` plugin which reverts these deviations + +- [Literal][] token is replaced with [StringLiteral][], [NumericLiteral][], [BooleanLiteral][], [NullLiteral][], [RegExpLiteral][] +- [Property][] token is replaced with [ObjectProperty][] and [ObjectMethod][] +- [MethodDefinition][] is replaced with [ClassMethod][] +- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][] +- [ClassMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node. + +AST for JSX code is based on [Facebook JSX AST][] with the addition of one node type: + +- `JSXText` + +[Babel AST format]: https://github.com/babel/babylon/blob/master/ast/spec.md +[ESTree spec]: https://github.com/estree/estree + +[Literal]: https://github.com/estree/estree/blob/master/es5.md#literal +[Property]: https://github.com/estree/estree/blob/master/es5.md#property +[MethodDefinition]: https://github.com/estree/estree/blob/master/es2015.md#methoddefinition + +[StringLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#stringliteral +[NumericLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#numericliteral +[BooleanLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#booleanliteral +[NullLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#nullliteral +[RegExpLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#regexpliteral +[ObjectProperty]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectproperty +[ObjectMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectmethod +[ClassMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#classmethod +[Program]: https://github.com/babel/babylon/blob/master/ast/spec.md#programs +[BlockStatement]: https://github.com/babel/babylon/blob/master/ast/spec.md#blockstatement +[Directive]: https://github.com/babel/babylon/blob/master/ast/spec.md#directive +[DirectiveLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#directiveliteral +[FunctionExpression]: https://github.com/babel/babylon/blob/master/ast/spec.md#functionexpression + +[Facebook JSX AST]: https://github.com/facebook/jsx/blob/master/AST.md + +### Semver + +Babylon follows semver in most situations. The only thing to note is that some spec-compliancy bug fixes may be released under patch versions. + +For example: We push a fix to early error on something like [#107](https://github.com/babel/babylon/pull/107) - multiple default exports per file. That would be considered a bug fix even though it would cause a build to fail. + +### Example + +```javascript +require("babylon").parse("code", { + // parse in strict mode and allow module declarations + sourceType: "module", + + plugins: [ + // enable jsx and flow syntax + "jsx", + "flow" + ] +}); +``` + +### Plugins + + - `estree` + - `jsx` + - `flow` + - `doExpressions` + - `objectRestSpread` + - `decorators` (Based on an outdated version of the Decorators proposal. Will be removed in a future version of `Babylon`) + - `classProperties` + - `exportExtensions` + - `asyncGenerators` + - `functionBind` + - `functionSent` + - `dynamicImport` + - `templateInvalidEscapes` diff --git a/socket/node_modules/babylon/bin/babylon.js b/socket/node_modules/babylon/bin/babylon.js new file mode 100755 index 0000000..449ddfe --- /dev/null +++ b/socket/node_modules/babylon/bin/babylon.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node +/* eslint no-var: 0 */ + +var babylon = require(".."); +var fs = require("fs"); + +var filename = process.argv[2]; +if (!filename) { + console.error("no filename specified"); + process.exit(0); +} + +var file = fs.readFileSync(filename, "utf8"); +var ast = babylon.parse(file); + +console.log(JSON.stringify(ast, null, " ")); diff --git a/socket/node_modules/babylon/bin/generate-identifier-regex.js b/socket/node_modules/babylon/bin/generate-identifier-regex.js new file mode 100644 index 0000000..9b0ae7d --- /dev/null +++ b/socket/node_modules/babylon/bin/generate-identifier-regex.js @@ -0,0 +1,62 @@ +"use strict"; + +// Which Unicode version should be used? +const version = "9.0.0"; + +const start = require("unicode-" + version + "/Binary_Property/ID_Start/code-points.js") + .filter(function(ch) { return ch > 0x7f; }); +let last = -1; +const cont = [0x200c, 0x200d].concat( + require("unicode-" + version + "/Binary_Property/ID_Continue/code-points.js") + .filter(function(ch) { + return ch > 0x7f && search(start, ch, last + 1) == -1; + }) + ); + +function search(arr, ch, starting) { + for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) + if (arr[i] === ch) + return i; + return -1; +} + +function pad(str, width) { + while (str.length < width) str = "0" + str; + return str; +} + +function esc(code) { + const hex = code.toString(16); + if (hex.length <= 2) return "\\x" + pad(hex, 2); + else return "\\u" + pad(hex, 4); +} + +function generate(chars) { + const astral = []; + let re = ""; + for (let i = 0, at = 0x10000; i < chars.length; i++) { + const from = chars[i]; + let to = from; + while (i < chars.length - 1 && chars[i + 1] == to + 1) { + i++; + to++; + } + if (to <= 0xffff) { + if (from == to) re += esc(from); + else if (from + 1 == to) re += esc(from) + esc(to); + else re += esc(from) + "-" + esc(to); + } else { + astral.push(from - at, to - from); + at = to; + } + } + return { nonASCII: re, astral: astral }; +} + +const startData = generate(start); +const contData = generate(cont); + +console.log("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); +console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); +console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); +console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/socket/node_modules/babylon/lib/index.js b/socket/node_modules/babylon/lib/index.js new file mode 100644 index 0000000..a914ac5 --- /dev/null +++ b/socket/node_modules/babylon/lib/index.js @@ -0,0 +1,7318 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/* eslint max-len: 0 */ + +// This is a trick taken from Esprima. It turns out that, on +// non-Chrome browsers, to check whether a string is in a set, a +// predicate containing a big ugly `switch` statement is faster than +// a regular expression, and on Chrome the two are about on par. +// This function uses `eval` (non-lexical) to produce such a +// predicate from a space-separated string of words. +// +// It starts by sorting the words by length. + +function makePredicate(words) { + words = words.split(" "); + return function (str) { + return words.indexOf(str) >= 0; + }; +} + +// Reserved word lists for various dialects of the language + +var reservedWords = { + 6: makePredicate("enum await"), + strict: makePredicate("implements interface let package private protected public static yield"), + strictBind: makePredicate("eval arguments") +}; + +// And the keywords + +var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"); + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +// Generated by `bin/generate-identifier-regex.js`. + +var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\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\u0AF9\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-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\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-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\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-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\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"; +var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; + +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + +// These are a run-length and offset encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +// generated by `bin/generate-identifier-regex.js`. +// eslint-disable-next-line comma-spacing +var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 449, 56, 264, 8, 2, 36, 18, 0, 50, 29, 881, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 0, 32, 6124, 20, 754, 9486, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 10591, 541]; +// eslint-disable-next-line comma-spacing +var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 838, 7, 2, 7, 17, 9, 57, 21, 2, 13, 19882, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239]; + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) return false; + + pos += set[i + 1]; + if (pos >= code) return true; + } +} + +// Test whether a given character code starts an identifier. + +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + return isInAstralSet(code, astralIdentifierStartCodes); +} + +// Test whether a given character is part of an identifier. + +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} + +// A second optional argument can be given to further configure +var defaultOptions = { + // Source type ("script" or "module") for different semantics + sourceType: "script", + // Source filename. + sourceFilename: undefined, + // Line from which to start counting source. Useful for + // integration with other tools. + startLine: 1, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // TODO + allowSuperOutsideMethod: false, + // An array of plugins to enable + plugins: [], + // TODO + strictMode: null +}; + +// Interpret and default an options object + +function getOptions(opts) { + var options = {}; + for (var key in defaultOptions) { + options[key] = opts && key in opts ? opts[key] : defaultOptions[key]; + } + return options; +} + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; +}; + + + + + + + + + + + +var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + + + + + + + + + + + +var inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +}; + + + + + + + + + + + +var possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === "object" || typeof call === "function") ? call : self; +}; + +// ## Token types + +// The assignment of fine-grained, information-carrying type objects +// allows the tokenizer to store the information it has about a +// token in a way that is very cheap for the parser to look up. + +// All token type variables start with an underscore, to make them +// easy to recognize. + +// The `beforeExpr` property is used to disambiguate between regular +// expressions and divisions. It is set on all token types that can +// be followed by an expression (thus, a slash after them would be a +// regular expression). +// +// `isLoop` marks a keyword as starting a loop, which is important +// to know when parsing a label, in order to allow or disallow +// continue jumps to that label. + +var beforeExpr = true; +var startsExpr = true; +var isLoop = true; +var isAssign = true; +var prefix = true; +var postfix = true; + +var TokenType = function TokenType(label) { + var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + classCallCheck(this, TokenType); + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.rightAssociative = !!conf.rightAssociative; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; +}; + +var KeywordTokenType = function (_TokenType) { + inherits(KeywordTokenType, _TokenType); + + function KeywordTokenType(name) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + classCallCheck(this, KeywordTokenType); + + options.keyword = name; + + return possibleConstructorReturn(this, _TokenType.call(this, name, options)); + } + + return KeywordTokenType; +}(TokenType); + +var BinopTokenType = function (_TokenType2) { + inherits(BinopTokenType, _TokenType2); + + function BinopTokenType(name, prec) { + classCallCheck(this, BinopTokenType); + return possibleConstructorReturn(this, _TokenType2.call(this, name, { beforeExpr: beforeExpr, binop: prec })); + } + + return BinopTokenType; +}(TokenType); + +var types = { + num: new TokenType("num", { startsExpr: startsExpr }), + regexp: new TokenType("regexp", { startsExpr: startsExpr }), + string: new TokenType("string", { startsExpr: startsExpr }), + name: new TokenType("name", { startsExpr: startsExpr }), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", { beforeExpr: beforeExpr, startsExpr: startsExpr }), + bracketR: new TokenType("]"), + braceL: new TokenType("{", { beforeExpr: beforeExpr, startsExpr: startsExpr }), + braceBarL: new TokenType("{|", { beforeExpr: beforeExpr, startsExpr: startsExpr }), + braceR: new TokenType("}"), + braceBarR: new TokenType("|}"), + parenL: new TokenType("(", { beforeExpr: beforeExpr, startsExpr: startsExpr }), + parenR: new TokenType(")"), + comma: new TokenType(",", { beforeExpr: beforeExpr }), + semi: new TokenType(";", { beforeExpr: beforeExpr }), + colon: new TokenType(":", { beforeExpr: beforeExpr }), + doubleColon: new TokenType("::", { beforeExpr: beforeExpr }), + dot: new TokenType("."), + question: new TokenType("?", { beforeExpr: beforeExpr }), + arrow: new TokenType("=>", { beforeExpr: beforeExpr }), + template: new TokenType("template"), + ellipsis: new TokenType("...", { beforeExpr: beforeExpr }), + backQuote: new TokenType("`", { startsExpr: startsExpr }), + dollarBraceL: new TokenType("${", { beforeExpr: beforeExpr, startsExpr: startsExpr }), + at: new TokenType("@"), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", { beforeExpr: beforeExpr, isAssign: isAssign }), + assign: new TokenType("_=", { beforeExpr: beforeExpr, isAssign: isAssign }), + incDec: new TokenType("++/--", { prefix: prefix, postfix: postfix, startsExpr: startsExpr }), + prefix: new TokenType("prefix", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), + logicalOR: new BinopTokenType("||", 1), + logicalAND: new BinopTokenType("&&", 2), + bitwiseOR: new BinopTokenType("|", 3), + bitwiseXOR: new BinopTokenType("^", 4), + bitwiseAND: new BinopTokenType("&", 5), + equality: new BinopTokenType("==/!=", 6), + relational: new BinopTokenType("", 7), + bitShift: new BinopTokenType("<>", 8), + plusMin: new TokenType("+/-", { beforeExpr: beforeExpr, binop: 9, prefix: prefix, startsExpr: startsExpr }), + modulo: new BinopTokenType("%", 10), + star: new BinopTokenType("*", 10), + slash: new BinopTokenType("/", 10), + exponent: new TokenType("**", { beforeExpr: beforeExpr, binop: 11, rightAssociative: true }) +}; + +var keywords = { + "break": new KeywordTokenType("break"), + "case": new KeywordTokenType("case", { beforeExpr: beforeExpr }), + "catch": new KeywordTokenType("catch"), + "continue": new KeywordTokenType("continue"), + "debugger": new KeywordTokenType("debugger"), + "default": new KeywordTokenType("default", { beforeExpr: beforeExpr }), + "do": new KeywordTokenType("do", { isLoop: isLoop, beforeExpr: beforeExpr }), + "else": new KeywordTokenType("else", { beforeExpr: beforeExpr }), + "finally": new KeywordTokenType("finally"), + "for": new KeywordTokenType("for", { isLoop: isLoop }), + "function": new KeywordTokenType("function", { startsExpr: startsExpr }), + "if": new KeywordTokenType("if"), + "return": new KeywordTokenType("return", { beforeExpr: beforeExpr }), + "switch": new KeywordTokenType("switch"), + "throw": new KeywordTokenType("throw", { beforeExpr: beforeExpr }), + "try": new KeywordTokenType("try"), + "var": new KeywordTokenType("var"), + "let": new KeywordTokenType("let"), + "const": new KeywordTokenType("const"), + "while": new KeywordTokenType("while", { isLoop: isLoop }), + "with": new KeywordTokenType("with"), + "new": new KeywordTokenType("new", { beforeExpr: beforeExpr, startsExpr: startsExpr }), + "this": new KeywordTokenType("this", { startsExpr: startsExpr }), + "super": new KeywordTokenType("super", { startsExpr: startsExpr }), + "class": new KeywordTokenType("class"), + "extends": new KeywordTokenType("extends", { beforeExpr: beforeExpr }), + "export": new KeywordTokenType("export"), + "import": new KeywordTokenType("import", { startsExpr: startsExpr }), + "yield": new KeywordTokenType("yield", { beforeExpr: beforeExpr, startsExpr: startsExpr }), + "null": new KeywordTokenType("null", { startsExpr: startsExpr }), + "true": new KeywordTokenType("true", { startsExpr: startsExpr }), + "false": new KeywordTokenType("false", { startsExpr: startsExpr }), + "in": new KeywordTokenType("in", { beforeExpr: beforeExpr, binop: 7 }), + "instanceof": new KeywordTokenType("instanceof", { beforeExpr: beforeExpr, binop: 7 }), + "typeof": new KeywordTokenType("typeof", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), + "void": new KeywordTokenType("void", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), + "delete": new KeywordTokenType("delete", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }) +}; + +// Map keyword names to token types. +Object.keys(keywords).forEach(function (name) { + types["_" + name] = keywords[name]; +}); + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +var lineBreak = /\r\n?|\n|\u2028|\u2029/; +var lineBreakG = new RegExp(lineBreak.source, "g"); + +function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; +} + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; + +// The algorithm used to determine whether a regexp can appear at a +// given point in the program is loosely based on sweet.js' approach. +// See https://github.com/mozilla/sweet.js/wiki/design + +var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + classCallCheck(this, TokContext); + + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; +}; + +var types$1 = { + braceStatement: new TokContext("{", false), + braceExpression: new TokContext("{", true), + templateQuasi: new TokContext("${", true), + parenStatement: new TokContext("(", false), + parenExpression: new TokContext("(", true), + template: new TokContext("`", true, true, function (p) { + return p.readTmplToken(); + }), + functionExpression: new TokContext("function", true) +}; + +// Token-specific context update code + +types.parenR.updateContext = types.braceR.updateContext = function () { + if (this.state.context.length === 1) { + this.state.exprAllowed = true; + return; + } + + var out = this.state.context.pop(); + if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) { + this.state.context.pop(); + this.state.exprAllowed = false; + } else if (out === types$1.templateQuasi) { + this.state.exprAllowed = true; + } else { + this.state.exprAllowed = !out.isExpr; + } +}; + +types.name.updateContext = function (prevType) { + this.state.exprAllowed = false; + + if (prevType === types._let || prevType === types._const || prevType === types._var) { + if (lineBreak.test(this.input.slice(this.state.end))) { + this.state.exprAllowed = true; + } + } +}; + +types.braceL.updateContext = function (prevType) { + this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); + this.state.exprAllowed = true; +}; + +types.dollarBraceL.updateContext = function () { + this.state.context.push(types$1.templateQuasi); + this.state.exprAllowed = true; +}; + +types.parenL.updateContext = function (prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); + this.state.exprAllowed = true; +}; + +types.incDec.updateContext = function () { + // tokExprAllowed stays unchanged +}; + +types._function.updateContext = function () { + if (this.curContext() !== types$1.braceStatement) { + this.state.context.push(types$1.functionExpression); + } + + this.state.exprAllowed = false; +}; + +types.backQuote.updateContext = function () { + if (this.curContext() === types$1.template) { + this.state.context.pop(); + } else { + this.state.context.push(types$1.template); + } + this.state.exprAllowed = false; +}; + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = function Position(line, col) { + classCallCheck(this, Position); + + this.line = line; + this.column = col; +}; + +var SourceLocation = function SourceLocation(start, end) { + classCallCheck(this, SourceLocation); + + this.start = start; + this.end = end; +}; + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur); + } + } +} + +var State = function () { + function State() { + classCallCheck(this, State); + } + + State.prototype.init = function init(options, input) { + this.strict = options.strictMode === false ? false : options.sourceType === "module"; + + this.input = input; + + this.potentialArrowAt = -1; + + this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = false; + + this.labels = []; + + this.decorators = []; + + this.tokens = []; + + this.comments = []; + + this.trailingComments = []; + this.leadingComments = []; + this.commentStack = []; + + this.pos = this.lineStart = 0; + this.curLine = options.startLine; + + this.type = types.eof; + this.value = null; + this.start = this.end = this.pos; + this.startLoc = this.endLoc = this.curPosition(); + + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + this.context = [types$1.braceStatement]; + this.exprAllowed = true; + + this.containsEsc = this.containsOctal = false; + this.octalPosition = null; + + this.invalidTemplateEscapePosition = null; + + this.exportedIdentifiers = []; + + return this; + }; + + // TODO + + + // TODO + + + // Used to signify the start of a potential arrow function + + + // Flags to track whether we are in a function, a generator. + + + // Labels in scope. + + + // Leading decorators. + + + // Token store. + + + // Comment store. + + + // Comment attachment store + + + // The current position of the tokenizer in the input. + + + // Properties of the current token: + // Its type + + + // For tokens that include more information than their type, the value + + + // Its start and end offset + + + // And, if locations are used, the {line, column} object + // corresponding to those offsets + + + // Position information for the previous token + + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + + + // TODO + + + // Names of exports store. `default` is stored as a name for both + // `export default foo;` and `export { foo as default };`. + + + State.prototype.curPosition = function curPosition() { + return new Position(this.curLine, this.pos - this.lineStart); + }; + + State.prototype.clone = function clone(skipArrays) { + var state = new State(); + for (var key in this) { + var val = this[key]; + + if ((!skipArrays || key === "context") && Array.isArray(val)) { + val = val.slice(); + } + + state[key] = val; + } + return state; + }; + + return State; +}(); + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = function Token(state) { + classCallCheck(this, Token); + + this.type = state.type; + this.value = state.value; + this.start = state.start; + this.end = state.end; + this.loc = new SourceLocation(state.startLoc, state.endLoc); +}; + +// ## Tokenizer + +function codePointToString(code) { + // UTF-16 Decoding + if (code <= 0xFFFF) { + return String.fromCharCode(code); + } else { + return String.fromCharCode((code - 0x10000 >> 10) + 0xD800, (code - 0x10000 & 1023) + 0xDC00); + } +} + +var Tokenizer = function () { + function Tokenizer(options, input) { + classCallCheck(this, Tokenizer); + + this.state = new State(); + this.state.init(options, input); + } + + // Move to the next token + + Tokenizer.prototype.next = function next() { + if (!this.isLookahead) { + this.state.tokens.push(new Token(this.state)); + } + + this.state.lastTokEnd = this.state.end; + this.state.lastTokStart = this.state.start; + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + }; + + // TODO + + Tokenizer.prototype.eat = function eat(type) { + if (this.match(type)) { + this.next(); + return true; + } else { + return false; + } + }; + + // TODO + + Tokenizer.prototype.match = function match(type) { + return this.state.type === type; + }; + + // TODO + + Tokenizer.prototype.isKeyword = function isKeyword$$1(word) { + return isKeyword(word); + }; + + // TODO + + Tokenizer.prototype.lookahead = function lookahead() { + var old = this.state; + this.state = old.clone(true); + + this.isLookahead = true; + this.next(); + this.isLookahead = false; + + var curr = this.state.clone(true); + this.state = old; + return curr; + }; + + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). + + Tokenizer.prototype.setStrict = function setStrict(strict) { + this.state.strict = strict; + if (!this.match(types.num) && !this.match(types.string)) return; + this.state.pos = this.state.start; + while (this.state.pos < this.state.lineStart) { + this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; + --this.state.curLine; + } + this.nextToken(); + }; + + Tokenizer.prototype.curContext = function curContext() { + return this.state.context[this.state.context.length - 1]; + }; + + // Read a single token, updating the parser object's token-related + // properties. + + Tokenizer.prototype.nextToken = function nextToken() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) this.skipSpace(); + + this.state.containsOctal = false; + this.state.octalPosition = null; + this.state.start = this.state.pos; + this.state.startLoc = this.state.curPosition(); + if (this.state.pos >= this.input.length) return this.finishToken(types.eof); + + if (curContext.override) { + return curContext.override(this); + } else { + return this.readToken(this.fullCharCodeAtPos()); + } + }; + + Tokenizer.prototype.readToken = function readToken(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code) || code === 92 /* '\' */) { + return this.readWord(); + } else { + return this.getTokenFromCode(code); + } + }; + + Tokenizer.prototype.fullCharCodeAtPos = function fullCharCodeAtPos() { + var code = this.input.charCodeAt(this.state.pos); + if (code <= 0xd7ff || code >= 0xe000) return code; + + var next = this.input.charCodeAt(this.state.pos + 1); + return (code << 10) + next - 0x35fdc00; + }; + + Tokenizer.prototype.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "CommentBlock" : "CommentLine", + value: text, + start: start, + end: end, + loc: new SourceLocation(startLoc, endLoc) + }; + + if (!this.isLookahead) { + this.state.tokens.push(comment); + this.state.comments.push(comment); + this.addComment(comment); + } + }; + + Tokenizer.prototype.skipBlockComment = function skipBlockComment() { + var startLoc = this.state.curPosition(); + var start = this.state.pos; + var end = this.input.indexOf("*/", this.state.pos += 2); + if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); + + this.state.pos = end + 2; + lineBreakG.lastIndex = start; + var match = void 0; + while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { + ++this.state.curLine; + this.state.lineStart = match.index + match[0].length; + } + + this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); + }; + + Tokenizer.prototype.skipLineComment = function skipLineComment(startSkip) { + var start = this.state.pos; + var startLoc = this.state.curPosition(); + var ch = this.input.charCodeAt(this.state.pos += startSkip); + while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this.state.pos; + ch = this.input.charCodeAt(this.state.pos); + } + + this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + Tokenizer.prototype.skipSpace = function skipSpace() { + loop: while (this.state.pos < this.input.length) { + var ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 32:case 160: + // ' ' + ++this.state.pos; + break; + + case 13: + if (this.input.charCodeAt(this.state.pos + 1) === 10) { + ++this.state.pos; + } + + case 10:case 8232:case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; + + case 47: + // '/' + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + // '*' + this.skipBlockComment(); + break; + + case 47: + this.skipLineComment(2); + break; + + default: + break loop; + } + break; + + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.state.pos; + } else { + break loop; + } + } + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + Tokenizer.prototype.finishToken = function finishToken(type, val) { + this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); + var prevType = this.state.type; + this.state.type = type; + this.state.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + + + Tokenizer.prototype.readToken_dot = function readToken_dot() { + var next = this.input.charCodeAt(this.state.pos + 1); + if (next >= 48 && next <= 57) { + return this.readNumber(true); + } + + var next2 = this.input.charCodeAt(this.state.pos + 2); + if (next === 46 && next2 === 46) { + // 46 = dot '.' + this.state.pos += 3; + return this.finishToken(types.ellipsis); + } else { + ++this.state.pos; + return this.finishToken(types.dot); + } + }; + + Tokenizer.prototype.readToken_slash = function readToken_slash() { + // '/' + if (this.state.exprAllowed) { + ++this.state.pos; + return this.readRegexp(); + } + + var next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + return this.finishOp(types.assign, 2); + } else { + return this.finishOp(types.slash, 1); + } + }; + + Tokenizer.prototype.readToken_mult_modulo = function readToken_mult_modulo(code) { + // '%*' + var type = code === 42 ? types.star : types.modulo; + var width = 1; + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 42) { + // '*' + width++; + next = this.input.charCodeAt(this.state.pos + 2); + type = types.exponent; + } + + if (next === 61) { + width++; + type = types.assign; + } + + return this.finishOp(type, width); + }; + + Tokenizer.prototype.readToken_pipe_amp = function readToken_pipe_amp(code) { + // '|&' + var next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); + if (next === 61) return this.finishOp(types.assign, 2); + if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(types.braceBarR, 2); + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); + }; + + Tokenizer.prototype.readToken_caret = function readToken_caret() { + // '^' + var next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + return this.finishOp(types.assign, 2); + } else { + return this.finishOp(types.bitwiseXOR, 1); + } + }; + + Tokenizer.prototype.readToken_plus_min = function readToken_plus_min(code) { + // '+-' + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === code) { + if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); + } + return this.finishOp(types.incDec, 2); + } + + if (next === 61) { + return this.finishOp(types.assign, 2); + } else { + return this.finishOp(types.plusMin, 1); + } + }; + + Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) { + // '<>' + var next = this.input.charCodeAt(this.state.pos + 1); + var size = 1; + + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(types.assign, size + 1); + return this.finishOp(types.bitShift, size); + } + + if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { + if (this.inModule) this.unexpected(); + // ` 0 + var formatted = ''; + if (codePoint <= 0xFFFF) { + formatted = zeroPaddedHex(codePoint, 4); + } else { + formatted = codePoint.toString(16).toUpperCase(); + } + return 'U+' + formatted; +} + +/** + * Get a list of formatted (string) Unicode code-points from a String + * + * @param {string} str Valid Unicode string + * @return {array} A list of formatted code-point strings + */ +function getCodePointsFormatted(str) { + var codePoints = UnicodeUtils.getCodePoints(str); + return codePoints.map(formatCodePoint); +} + +var specialEscape = { + 0x07: '\\a', + 0x08: '\\b', + 0x0C: '\\f', + 0x0A: '\\n', + 0x0D: '\\r', + 0x09: '\\t', + 0x0B: '\\v', + 0x22: '\\"', + 0x5c: '\\\\' +}; + +/** + * Returns a double-quoted PHP string with all non-printable and + * non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function phpEscape(s) { + var result = '"'; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = UnicodeUtils.getCodePoints(s)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var cp = _step.value; + + var special = specialEscape[cp]; + if (special !== undefined) { + result += special; + } else if (cp >= 0x20 && cp <= 0x7e) { + result += String.fromCodePoint(cp); + } else if (cp <= 0xFFFF) { + result += '\\u{' + zeroPaddedHex(cp, 4) + '}'; + } else { + result += '\\u{' + zeroPaddedHex(cp, 6) + '}'; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator['return']) { + _iterator['return'](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + result += '"'; + return result; +} + +/** + * Returns a double-quoted Java or JavaScript string with all + * non-printable and non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function jsEscape(s) { + var result = '"'; + for (var i = 0; i < s.length; i++) { + var cp = s.charCodeAt(i); + var special = specialEscape[cp]; + if (special !== undefined) { + result += special; + } else if (cp >= 0x20 && cp <= 0x7e) { + result += String.fromCodePoint(cp); + } else { + result += '\\u' + zeroPaddedHex(cp, 4); + } + } + result += '"'; + return result; +} + +function c11Escape(s) { + var result = ''; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = UnicodeUtils.getCodePoints(s)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var cp = _step2.value; + + var special = specialEscape[cp]; + if (special !== undefined) { + result += special; + } else if (cp >= 0x20 && cp <= 0x7e) { + result += String.fromCodePoint(cp); + } else if (cp <= 0xFFFF) { + result += '\\u' + zeroPaddedHex(cp, 4); + } else { + result += '\\U' + zeroPaddedHex(cp, 8); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2['return']) { + _iterator2['return'](); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return result; +} + +/** + * Returns a double-quoted C string with all non-printable and + * non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function cEscape(s) { + return 'u8"' + c11Escape(s) + '"'; +} + +/** + * Returns a double-quoted Objective-C string with all non-printable + * and non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function objcEscape(s) { + return '@"' + c11Escape(s) + '"'; +} + +/** + * Returns a double-quoted Python string with all non-printable + * and non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function pyEscape(s) { + return 'u"' + c11Escape(s) + '"'; +} + +var UnicodeUtilsExtra = { + formatCodePoint: formatCodePoint, + getCodePointsFormatted: getCodePointsFormatted, + zeroPaddedHex: zeroPaddedHex, + phpEscape: phpEscape, + jsEscape: jsEscape, + cEscape: cEscape, + objcEscape: objcEscape, + pyEscape: pyEscape +}; + +module.exports = UnicodeUtilsExtra; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/UnicodeUtilsExtra.js.flow b/socket/node_modules/fbjs/lib/UnicodeUtilsExtra.js.flow new file mode 100644 index 0000000..dc3ecb7 --- /dev/null +++ b/socket/node_modules/fbjs/lib/UnicodeUtilsExtra.js.flow @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule UnicodeUtilsExtra + * @typechecks + */ + +/** + * Unicode-enabled extra utility functions not always needed. + */ + +'use strict'; + +const UnicodeUtils = require('./UnicodeUtils'); + +/** + * @param {number} codePoint Valid Unicode code-point + * @param {number} len Zero-padded minimum width of result + * @return {string} A zero-padded hexadecimal string (00XXXX) + */ +function zeroPaddedHex(codePoint, len) { + let codePointHex = codePoint.toString(16).toUpperCase(); + let numZeros = Math.max(0, len - codePointHex.length); + var result = ''; + for (var i = 0; i < numZeros; i++) { + result += '0'; + } + result += codePointHex; + return result; +} + +/** + * @param {number} codePoint Valid Unicode code-point + * @return {string} A formatted Unicode code-point string + * of the format U+XXXX, U+XXXXX, or U+XXXXXX + */ +function formatCodePoint(codePoint) { + codePoint = codePoint || 0; // NaN --> 0 + var formatted = ''; + if (codePoint <= 0xFFFF) { + formatted = zeroPaddedHex(codePoint, 4); + } else { + formatted = codePoint.toString(16).toUpperCase(); + } + return 'U+' + formatted; +} + +/** + * Get a list of formatted (string) Unicode code-points from a String + * + * @param {string} str Valid Unicode string + * @return {array} A list of formatted code-point strings + */ +function getCodePointsFormatted(str) { + const codePoints = UnicodeUtils.getCodePoints(str); + return codePoints.map(formatCodePoint); +} + +const specialEscape = { + 0x07: '\\a', + 0x08: '\\b', + 0x0C: '\\f', + 0x0A: '\\n', + 0x0D: '\\r', + 0x09: '\\t', + 0x0B: '\\v', + 0x22: '\\"', + 0x5c: '\\\\' +}; + +/** + * Returns a double-quoted PHP string with all non-printable and + * non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function phpEscape(s) { + var result = '"'; + for (let cp of UnicodeUtils.getCodePoints(s)) { + let special = specialEscape[cp]; + if (special !== undefined) { + result += special; + } else if (cp >= 0x20 && cp <= 0x7e) { + result += String.fromCodePoint(cp); + } else if (cp <= 0xFFFF) { + result += '\\u{' + zeroPaddedHex(cp, 4) + '}'; + } else { + result += '\\u{' + zeroPaddedHex(cp, 6) + '}'; + } + } + result += '"'; + return result; +} + +/** + * Returns a double-quoted Java or JavaScript string with all + * non-printable and non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function jsEscape(s) { + var result = '"'; + for (var i = 0; i < s.length; i++) { + let cp = s.charCodeAt(i); + let special = specialEscape[cp]; + if (special !== undefined) { + result += special; + } else if (cp >= 0x20 && cp <= 0x7e) { + result += String.fromCodePoint(cp); + } else { + result += '\\u' + zeroPaddedHex(cp, 4); + } + } + result += '"'; + return result; +} + +function c11Escape(s) { + var result = ''; + for (let cp of UnicodeUtils.getCodePoints(s)) { + let special = specialEscape[cp]; + if (special !== undefined) { + result += special; + } else if (cp >= 0x20 && cp <= 0x7e) { + result += String.fromCodePoint(cp); + } else if (cp <= 0xFFFF) { + result += '\\u' + zeroPaddedHex(cp, 4); + } else { + result += '\\U' + zeroPaddedHex(cp, 8); + } + } + return result; +} + +/** + * Returns a double-quoted C string with all non-printable and + * non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function cEscape(s) { + return 'u8"' + c11Escape(s) + '"'; +} + +/** + * Returns a double-quoted Objective-C string with all non-printable + * and non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function objcEscape(s) { + return '@"' + c11Escape(s) + '"'; +} + +/** + * Returns a double-quoted Python string with all non-printable + * and non-US-ASCII sequences escaped. + * + * @param {string} str Valid Unicode string + * @return {string} Double-quoted string with Unicode sequences escaped + */ +function pyEscape(s) { + return 'u"' + c11Escape(s) + '"'; +} + +const UnicodeUtilsExtra = { + formatCodePoint: formatCodePoint, + getCodePointsFormatted: getCodePointsFormatted, + zeroPaddedHex: zeroPaddedHex, + phpEscape: phpEscape, + jsEscape: jsEscape, + cEscape: cEscape, + objcEscape: objcEscape, + pyEscape: pyEscape +}; + +module.exports = UnicodeUtilsExtra; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/UserAgent.js b/socket/node_modules/fbjs/lib/UserAgent.js new file mode 100644 index 0000000..2403078 --- /dev/null +++ b/socket/node_modules/fbjs/lib/UserAgent.js @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +'use strict'; + +var UserAgentData = require('./UserAgentData'); +var VersionRange = require('./VersionRange'); + +var mapObject = require('./mapObject'); +var memoizeStringOnly = require('./memoizeStringOnly'); + +/** + * Checks to see whether `name` and `version` satisfy `query`. + * + * @param {string} name Name of the browser, device, engine or platform + * @param {?string} version Version of the browser, engine or platform + * @param {string} query Query of form "Name [range expression]" + * @param {?function} normalizer Optional pre-processor for range expression + * @return {boolean} + */ +function compare(name, version, query, normalizer) { + // check for exact match with no version + if (name === query) { + return true; + } + + // check for non-matching names + if (!query.startsWith(name)) { + return false; + } + + // full comparison with version + var range = query.slice(name.length); + if (version) { + range = normalizer ? normalizer(range) : range; + return VersionRange.contains(range, version); + } + + return false; +} + +/** + * Normalizes `version` by stripping any "NT" prefix, but only on the Windows + * platform. + * + * Mimics the stripping performed by the `UserAgentWindowsPlatform` PHP class. + * + * @param {string} version + * @return {string} + */ +function normalizePlatformVersion(version) { + if (UserAgentData.platformName === 'Windows') { + return version.replace(/^\s*NT/, ''); + } + + return version; +} + +/** + * Provides client-side access to the authoritative PHP-generated User Agent + * information supplied by the server. + */ +var UserAgent = { + /** + * Check if the User Agent browser matches `query`. + * + * `query` should be a string like "Chrome" or "Chrome > 33". + * + * Valid browser names include: + * + * - ACCESS NetFront + * - AOL + * - Amazon Silk + * - Android + * - BlackBerry + * - BlackBerry PlayBook + * - Chrome + * - Chrome for iOS + * - Chrome frame + * - Facebook PHP SDK + * - Facebook for iOS + * - Firefox + * - IE + * - IE Mobile + * - Mobile Safari + * - Motorola Internet Browser + * - Nokia + * - Openwave Mobile Browser + * - Opera + * - Opera Mini + * - Opera Mobile + * - Safari + * - UIWebView + * - Unknown + * - webOS + * - etc... + * + * An authoritative list can be found in the PHP `BrowserDetector` class and + * related classes in the same file (see calls to `new UserAgentBrowser` here: + * https://fburl.com/50728104). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isBrowser: function isBrowser(query) { + return compare(UserAgentData.browserName, UserAgentData.browserFullVersion, query); + }, + + + /** + * Check if the User Agent browser uses a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isBrowserArchitecture: function isBrowserArchitecture(query) { + return compare(UserAgentData.browserArchitecture, null, query); + }, + + + /** + * Check if the User Agent device matches `query`. + * + * `query` should be a string like "iPhone" or "iPad". + * + * Valid device names include: + * + * - Kindle + * - Kindle Fire + * - Unknown + * - iPad + * - iPhone + * - iPod + * - etc... + * + * An authoritative list can be found in the PHP `DeviceDetector` class and + * related classes in the same file (see calls to `new UserAgentDevice` here: + * https://fburl.com/50728332). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name" + * @return {boolean} + */ + isDevice: function isDevice(query) { + return compare(UserAgentData.deviceName, null, query); + }, + + + /** + * Check if the User Agent rendering engine matches `query`. + * + * `query` should be a string like "WebKit" or "WebKit >= 537". + * + * Valid engine names include: + * + * - Gecko + * - Presto + * - Trident + * - WebKit + * - etc... + * + * An authoritative list can be found in the PHP `RenderingEngineDetector` + * class related classes in the same file (see calls to `new + * UserAgentRenderingEngine` here: https://fburl.com/50728617). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isEngine: function isEngine(query) { + return compare(UserAgentData.engineName, UserAgentData.engineVersion, query); + }, + + + /** + * Check if the User Agent platform matches `query`. + * + * `query` should be a string like "Windows" or "iOS 5 - 6". + * + * Valid platform names include: + * + * - Android + * - BlackBerry OS + * - Java ME + * - Linux + * - Mac OS X + * - Mac OS X Calendar + * - Mac OS X Internet Account + * - Symbian + * - SymbianOS + * - Windows + * - Windows Mobile + * - Windows Phone + * - iOS + * - iOS Facebook Integration Account + * - iOS Facebook Social Sharing UI + * - webOS + * - Chrome OS + * - etc... + * + * An authoritative list can be found in the PHP `PlatformDetector` class and + * related classes in the same file (see calls to `new UserAgentPlatform` + * here: https://fburl.com/50729226). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isPlatform: function isPlatform(query) { + return compare(UserAgentData.platformName, UserAgentData.platformFullVersion, query, normalizePlatformVersion); + }, + + + /** + * Check if the User Agent platform is a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isPlatformArchitecture: function isPlatformArchitecture(query) { + return compare(UserAgentData.platformArchitecture, null, query); + } +}; + +module.exports = mapObject(UserAgent, memoizeStringOnly); \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/UserAgent.js.flow b/socket/node_modules/fbjs/lib/UserAgent.js.flow new file mode 100644 index 0000000..61ec128 --- /dev/null +++ b/socket/node_modules/fbjs/lib/UserAgent.js.flow @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule UserAgent + */ + +'use strict'; + +const UserAgentData = require('./UserAgentData'); +const VersionRange = require('./VersionRange'); + +const mapObject = require('./mapObject'); +const memoizeStringOnly = require('./memoizeStringOnly'); + +/** + * Checks to see whether `name` and `version` satisfy `query`. + * + * @param {string} name Name of the browser, device, engine or platform + * @param {?string} version Version of the browser, engine or platform + * @param {string} query Query of form "Name [range expression]" + * @param {?function} normalizer Optional pre-processor for range expression + * @return {boolean} + */ +function compare(name, version, query, normalizer) { + // check for exact match with no version + if (name === query) { + return true; + } + + // check for non-matching names + if (!query.startsWith(name)) { + return false; + } + + // full comparison with version + let range = query.slice(name.length); + if (version) { + range = normalizer ? normalizer(range) : range; + return VersionRange.contains(range, version); + } + + return false; +} + +/** + * Normalizes `version` by stripping any "NT" prefix, but only on the Windows + * platform. + * + * Mimics the stripping performed by the `UserAgentWindowsPlatform` PHP class. + * + * @param {string} version + * @return {string} + */ +function normalizePlatformVersion(version) { + if (UserAgentData.platformName === 'Windows') { + return version.replace(/^\s*NT/, ''); + } + + return version; +} + +/** + * Provides client-side access to the authoritative PHP-generated User Agent + * information supplied by the server. + */ +const UserAgent = { + /** + * Check if the User Agent browser matches `query`. + * + * `query` should be a string like "Chrome" or "Chrome > 33". + * + * Valid browser names include: + * + * - ACCESS NetFront + * - AOL + * - Amazon Silk + * - Android + * - BlackBerry + * - BlackBerry PlayBook + * - Chrome + * - Chrome for iOS + * - Chrome frame + * - Facebook PHP SDK + * - Facebook for iOS + * - Firefox + * - IE + * - IE Mobile + * - Mobile Safari + * - Motorola Internet Browser + * - Nokia + * - Openwave Mobile Browser + * - Opera + * - Opera Mini + * - Opera Mobile + * - Safari + * - UIWebView + * - Unknown + * - webOS + * - etc... + * + * An authoritative list can be found in the PHP `BrowserDetector` class and + * related classes in the same file (see calls to `new UserAgentBrowser` here: + * https://fburl.com/50728104). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isBrowser(query) { + return compare(UserAgentData.browserName, UserAgentData.browserFullVersion, query); + }, + + /** + * Check if the User Agent browser uses a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isBrowserArchitecture(query) { + return compare(UserAgentData.browserArchitecture, null, query); + }, + + /** + * Check if the User Agent device matches `query`. + * + * `query` should be a string like "iPhone" or "iPad". + * + * Valid device names include: + * + * - Kindle + * - Kindle Fire + * - Unknown + * - iPad + * - iPhone + * - iPod + * - etc... + * + * An authoritative list can be found in the PHP `DeviceDetector` class and + * related classes in the same file (see calls to `new UserAgentDevice` here: + * https://fburl.com/50728332). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name" + * @return {boolean} + */ + isDevice(query) { + return compare(UserAgentData.deviceName, null, query); + }, + + /** + * Check if the User Agent rendering engine matches `query`. + * + * `query` should be a string like "WebKit" or "WebKit >= 537". + * + * Valid engine names include: + * + * - Gecko + * - Presto + * - Trident + * - WebKit + * - etc... + * + * An authoritative list can be found in the PHP `RenderingEngineDetector` + * class related classes in the same file (see calls to `new + * UserAgentRenderingEngine` here: https://fburl.com/50728617). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isEngine(query) { + return compare(UserAgentData.engineName, UserAgentData.engineVersion, query); + }, + + /** + * Check if the User Agent platform matches `query`. + * + * `query` should be a string like "Windows" or "iOS 5 - 6". + * + * Valid platform names include: + * + * - Android + * - BlackBerry OS + * - Java ME + * - Linux + * - Mac OS X + * - Mac OS X Calendar + * - Mac OS X Internet Account + * - Symbian + * - SymbianOS + * - Windows + * - Windows Mobile + * - Windows Phone + * - iOS + * - iOS Facebook Integration Account + * - iOS Facebook Social Sharing UI + * - webOS + * - Chrome OS + * - etc... + * + * An authoritative list can be found in the PHP `PlatformDetector` class and + * related classes in the same file (see calls to `new UserAgentPlatform` + * here: https://fburl.com/50729226). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isPlatform(query) { + return compare(UserAgentData.platformName, UserAgentData.platformFullVersion, query, normalizePlatformVersion); + }, + + /** + * Check if the User Agent platform is a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isPlatformArchitecture(query) { + return compare(UserAgentData.platformArchitecture, null, query); + } + +}; + +module.exports = mapObject(UserAgent, memoizeStringOnly); \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/UserAgentData.js b/socket/node_modules/fbjs/lib/UserAgentData.js new file mode 100644 index 0000000..928fbe3 --- /dev/null +++ b/socket/node_modules/fbjs/lib/UserAgentData.js @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +/** + * Usage note: + * This module makes a best effort to export the same data we would internally. + * At Facebook we use a server-generated module that does the parsing and + * exports the data for the client to use. We can't rely on a server-side + * implementation in open source so instead we make use of an open source + * library to do the heavy lifting and then make some adjustments as necessary. + * It's likely there will be some differences. Some we can smooth over. + * Others are going to be harder. + */ + +'use strict'; + +var UAParser = require('ua-parser-js'); + +var UNKNOWN = 'Unknown'; + +var PLATFORM_MAP = { + 'Mac OS': 'Mac OS X' +}; + +/** + * Convert from UAParser platform name to what we expect. + */ +function convertPlatformName(name) { + return PLATFORM_MAP[name] || name; +} + +/** + * Get the version number in parts. This is very naive. We actually get major + * version as a part of UAParser already, which is generally good enough, but + * let's get the minor just in case. + */ +function getBrowserVersion(version) { + if (!version) { + return { + major: '', + minor: '' + }; + } + var parts = version.split('.'); + return { + major: parts[0], + minor: parts[1] + }; +} + +/** + * Get the UA data fom UAParser and then convert it to the format we're + * expecting for our APIS. + */ +var parser = new UAParser(); +var results = parser.getResult(); + +// Do some conversion first. +var browserVersionData = getBrowserVersion(results.browser.version); +var uaData = { + browserArchitecture: results.cpu.architecture || UNKNOWN, + browserFullVersion: results.browser.version || UNKNOWN, + browserMinorVersion: browserVersionData.minor || UNKNOWN, + browserName: results.browser.name || UNKNOWN, + browserVersion: results.browser.major || UNKNOWN, + deviceName: results.device.model || UNKNOWN, + engineName: results.engine.name || UNKNOWN, + engineVersion: results.engine.version || UNKNOWN, + platformArchitecture: results.cpu.architecture || UNKNOWN, + platformName: convertPlatformName(results.os.name) || UNKNOWN, + platformVersion: results.os.version || UNKNOWN, + platformFullVersion: results.os.version || UNKNOWN +}; + +module.exports = uaData; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/UserAgentData.js.flow b/socket/node_modules/fbjs/lib/UserAgentData.js.flow new file mode 100644 index 0000000..bc2e027 --- /dev/null +++ b/socket/node_modules/fbjs/lib/UserAgentData.js.flow @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule UserAgentData + */ + +/** + * Usage note: + * This module makes a best effort to export the same data we would internally. + * At Facebook we use a server-generated module that does the parsing and + * exports the data for the client to use. We can't rely on a server-side + * implementation in open source so instead we make use of an open source + * library to do the heavy lifting and then make some adjustments as necessary. + * It's likely there will be some differences. Some we can smooth over. + * Others are going to be harder. + */ + +'use strict'; + +var UAParser = require('ua-parser-js'); + +var UNKNOWN = 'Unknown'; + +var PLATFORM_MAP = { + 'Mac OS': 'Mac OS X' +}; + +/** + * Convert from UAParser platform name to what we expect. + */ +function convertPlatformName(name) { + return PLATFORM_MAP[name] || name; +} + +/** + * Get the version number in parts. This is very naive. We actually get major + * version as a part of UAParser already, which is generally good enough, but + * let's get the minor just in case. + */ +function getBrowserVersion(version) { + if (!version) { + return { + major: '', + minor: '' + }; + } + var parts = version.split('.'); + return { + major: parts[0], + minor: parts[1] + }; +} + +/** + * Get the UA data fom UAParser and then convert it to the format we're + * expecting for our APIS. + */ +var parser = new UAParser(); +var results = parser.getResult(); + +// Do some conversion first. +var browserVersionData = getBrowserVersion(results.browser.version); +var uaData = { + browserArchitecture: results.cpu.architecture || UNKNOWN, + browserFullVersion: results.browser.version || UNKNOWN, + browserMinorVersion: browserVersionData.minor || UNKNOWN, + browserName: results.browser.name || UNKNOWN, + browserVersion: results.browser.major || UNKNOWN, + deviceName: results.device.model || UNKNOWN, + engineName: results.engine.name || UNKNOWN, + engineVersion: results.engine.version || UNKNOWN, + platformArchitecture: results.cpu.architecture || UNKNOWN, + platformName: convertPlatformName(results.os.name) || UNKNOWN, + platformVersion: results.os.version || UNKNOWN, + platformFullVersion: results.os.version || UNKNOWN +}; + +module.exports = uaData; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/VersionRange.js b/socket/node_modules/fbjs/lib/VersionRange.js new file mode 100644 index 0000000..93e3e53 --- /dev/null +++ b/socket/node_modules/fbjs/lib/VersionRange.js @@ -0,0 +1,380 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +'use strict'; + +var invariant = require('./invariant'); + +var componentRegex = /\./; +var orRegex = /\|\|/; +var rangeRegex = /\s+\-\s+/; +var modifierRegex = /^(<=|<|=|>=|~>|~|>|)?\s*(.+)/; +var numericRegex = /^(\d*)(.*)/; + +/** + * Splits input `range` on "||" and returns true if any subrange matches + * `version`. + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkOrExpression(range, version) { + var expressions = range.split(orRegex); + + if (expressions.length > 1) { + return expressions.some(function (range) { + return VersionRange.contains(range, version); + }); + } else { + range = expressions[0].trim(); + return checkRangeExpression(range, version); + } +} + +/** + * Splits input `range` on " - " (the surrounding whitespace is required) and + * returns true if version falls between the two operands. + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkRangeExpression(range, version) { + var expressions = range.split(rangeRegex); + + !(expressions.length > 0 && expressions.length <= 2) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'the "-" operator expects exactly 2 operands') : invariant(false) : void 0; + + if (expressions.length === 1) { + return checkSimpleExpression(expressions[0], version); + } else { + var startVersion = expressions[0], + endVersion = expressions[1]; + + !(isSimpleVersion(startVersion) && isSimpleVersion(endVersion)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'operands to the "-" operator must be simple (no modifiers)') : invariant(false) : void 0; + + return checkSimpleExpression('>=' + startVersion, version) && checkSimpleExpression('<=' + endVersion, version); + } +} + +/** + * Checks if `range` matches `version`. `range` should be a "simple" range (ie. + * not a compound range using the " - " or "||" operators). + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkSimpleExpression(range, version) { + range = range.trim(); + if (range === '') { + return true; + } + + var versionComponents = version.split(componentRegex); + + var _getModifierAndCompon = getModifierAndComponents(range), + modifier = _getModifierAndCompon.modifier, + rangeComponents = _getModifierAndCompon.rangeComponents; + + switch (modifier) { + case '<': + return checkLessThan(versionComponents, rangeComponents); + case '<=': + return checkLessThanOrEqual(versionComponents, rangeComponents); + case '>=': + return checkGreaterThanOrEqual(versionComponents, rangeComponents); + case '>': + return checkGreaterThan(versionComponents, rangeComponents); + case '~': + case '~>': + return checkApproximateVersion(versionComponents, rangeComponents); + default: + return checkEqual(versionComponents, rangeComponents); + } +} + +/** + * Checks whether `a` is less than `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkLessThan(a, b) { + return compareComponents(a, b) === -1; +} + +/** + * Checks whether `a` is less than or equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkLessThanOrEqual(a, b) { + var result = compareComponents(a, b); + return result === -1 || result === 0; +} + +/** + * Checks whether `a` is equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkEqual(a, b) { + return compareComponents(a, b) === 0; +} + +/** + * Checks whether `a` is greater than or equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkGreaterThanOrEqual(a, b) { + var result = compareComponents(a, b); + return result === 1 || result === 0; +} + +/** + * Checks whether `a` is greater than `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkGreaterThan(a, b) { + return compareComponents(a, b) === 1; +} + +/** + * Checks whether `a` is "reasonably close" to `b` (as described in + * https://www.npmjs.org/doc/misc/semver.html). For example, if `b` is "1.3.1" + * then "reasonably close" is defined as ">= 1.3.1 and < 1.4". + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkApproximateVersion(a, b) { + var lowerBound = b.slice(); + var upperBound = b.slice(); + + if (upperBound.length > 1) { + upperBound.pop(); + } + var lastIndex = upperBound.length - 1; + var numeric = parseInt(upperBound[lastIndex], 10); + if (isNumber(numeric)) { + upperBound[lastIndex] = numeric + 1 + ''; + } + + return checkGreaterThanOrEqual(a, lowerBound) && checkLessThan(a, upperBound); +} + +/** + * Extracts the optional modifier (<, <=, =, >=, >, ~, ~>) and version + * components from `range`. + * + * For example, given `range` ">= 1.2.3" returns an object with a `modifier` of + * `">="` and `components` of `[1, 2, 3]`. + * + * @param {string} range + * @returns {object} + */ +function getModifierAndComponents(range) { + var rangeComponents = range.split(componentRegex); + var matches = rangeComponents[0].match(modifierRegex); + !matches ? process.env.NODE_ENV !== 'production' ? invariant(false, 'expected regex to match but it did not') : invariant(false) : void 0; + + return { + modifier: matches[1], + rangeComponents: [matches[2]].concat(rangeComponents.slice(1)) + }; +} + +/** + * Determines if `number` is a number. + * + * @param {mixed} number + * @returns {boolean} + */ +function isNumber(number) { + return !isNaN(number) && isFinite(number); +} + +/** + * Tests whether `range` is a "simple" version number without any modifiers + * (">", "~" etc). + * + * @param {string} range + * @returns {boolean} + */ +function isSimpleVersion(range) { + return !getModifierAndComponents(range).modifier; +} + +/** + * Zero-pads array `array` until it is at least `length` long. + * + * @param {array} array + * @param {number} length + */ +function zeroPad(array, length) { + for (var i = array.length; i < length; i++) { + array[i] = '0'; + } +} + +/** + * Normalizes `a` and `b` in preparation for comparison by doing the following: + * + * - zero-pads `a` and `b` + * - marks any "x", "X" or "*" component in `b` as equivalent by zero-ing it out + * in both `a` and `b` + * - marks any final "*" component in `b` as a greedy wildcard by zero-ing it + * and all of its successors in `a` + * + * @param {array} a + * @param {array} b + * @returns {array>} + */ +function normalizeVersions(a, b) { + a = a.slice(); + b = b.slice(); + + zeroPad(a, b.length); + + // mark "x" and "*" components as equal + for (var i = 0; i < b.length; i++) { + var matches = b[i].match(/^[x*]$/i); + if (matches) { + b[i] = a[i] = '0'; + + // final "*" greedily zeros all remaining components + if (matches[0] === '*' && i === b.length - 1) { + for (var j = i; j < a.length; j++) { + a[j] = '0'; + } + } + } + } + + zeroPad(b, a.length); + + return [a, b]; +} + +/** + * Returns the numerical -- not the lexicographical -- ordering of `a` and `b`. + * + * For example, `10-alpha` is greater than `2-beta`. + * + * @param {string} a + * @param {string} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compareNumeric(a, b) { + var aPrefix = a.match(numericRegex)[1]; + var bPrefix = b.match(numericRegex)[1]; + var aNumeric = parseInt(aPrefix, 10); + var bNumeric = parseInt(bPrefix, 10); + + if (isNumber(aNumeric) && isNumber(bNumeric) && aNumeric !== bNumeric) { + return compare(aNumeric, bNumeric); + } else { + return compare(a, b); + } +} + +/** + * Returns the ordering of `a` and `b`. + * + * @param {string|number} a + * @param {string|number} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compare(a, b) { + !(typeof a === typeof b) ? process.env.NODE_ENV !== 'production' ? invariant(false, '"a" and "b" must be of the same type') : invariant(false) : void 0; + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } else { + return 0; + } +} + +/** + * Compares arrays of version components. + * + * @param {array} a + * @param {array} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compareComponents(a, b) { + var _normalizeVersions = normalizeVersions(a, b), + aNormalized = _normalizeVersions[0], + bNormalized = _normalizeVersions[1]; + + for (var i = 0; i < bNormalized.length; i++) { + var result = compareNumeric(aNormalized[i], bNormalized[i]); + if (result) { + return result; + } + } + + return 0; +} + +var VersionRange = { + /** + * Checks whether `version` satisfies the `range` specification. + * + * We support a subset of the expressions defined in + * https://www.npmjs.org/doc/misc/semver.html: + * + * version Must match version exactly + * =version Same as just version + * >version Must be greater than version + * >=version Must be greater than or equal to version + * = 1.2.3 and < 1.3" + * ~>version Equivalent to ~version + * 1.2.x Must match "1.2.x", where "x" is a wildcard that matches + * anything + * 1.2.* Similar to "1.2.x", but "*" in the trailing position is a + * "greedy" wildcard, so will match any number of additional + * components: + * "1.2.*" will match "1.2.1", "1.2.1.1", "1.2.1.1.1" etc + * * Any version + * "" (Empty string) Same as * + * v1 - v2 Equivalent to ">= v1 and <= v2" + * r1 || r2 Passes if either r1 or r2 are satisfied + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ + contains: function contains(range, version) { + return checkOrExpression(range.trim(), version.trim()); + } +}; + +module.exports = VersionRange; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/VersionRange.js.flow b/socket/node_modules/fbjs/lib/VersionRange.js.flow new file mode 100644 index 0000000..ad64790 --- /dev/null +++ b/socket/node_modules/fbjs/lib/VersionRange.js.flow @@ -0,0 +1,371 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule VersionRange + */ + +'use strict'; + +const invariant = require('./invariant'); + +const componentRegex = /\./; +const orRegex = /\|\|/; +const rangeRegex = /\s+\-\s+/; +const modifierRegex = /^(<=|<|=|>=|~>|~|>|)?\s*(.+)/; +const numericRegex = /^(\d*)(.*)/; + +/** + * Splits input `range` on "||" and returns true if any subrange matches + * `version`. + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkOrExpression(range, version) { + const expressions = range.split(orRegex); + + if (expressions.length > 1) { + return expressions.some(range => VersionRange.contains(range, version)); + } else { + range = expressions[0].trim(); + return checkRangeExpression(range, version); + } +} + +/** + * Splits input `range` on " - " (the surrounding whitespace is required) and + * returns true if version falls between the two operands. + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkRangeExpression(range, version) { + const expressions = range.split(rangeRegex); + + invariant(expressions.length > 0 && expressions.length <= 2, 'the "-" operator expects exactly 2 operands'); + + if (expressions.length === 1) { + return checkSimpleExpression(expressions[0], version); + } else { + const [startVersion, endVersion] = expressions; + invariant(isSimpleVersion(startVersion) && isSimpleVersion(endVersion), 'operands to the "-" operator must be simple (no modifiers)'); + + return checkSimpleExpression('>=' + startVersion, version) && checkSimpleExpression('<=' + endVersion, version); + } +} + +/** + * Checks if `range` matches `version`. `range` should be a "simple" range (ie. + * not a compound range using the " - " or "||" operators). + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkSimpleExpression(range, version) { + range = range.trim(); + if (range === '') { + return true; + } + + const versionComponents = version.split(componentRegex); + const { modifier, rangeComponents } = getModifierAndComponents(range); + switch (modifier) { + case '<': + return checkLessThan(versionComponents, rangeComponents); + case '<=': + return checkLessThanOrEqual(versionComponents, rangeComponents); + case '>=': + return checkGreaterThanOrEqual(versionComponents, rangeComponents); + case '>': + return checkGreaterThan(versionComponents, rangeComponents); + case '~': + case '~>': + return checkApproximateVersion(versionComponents, rangeComponents); + default: + return checkEqual(versionComponents, rangeComponents); + } +} + +/** + * Checks whether `a` is less than `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkLessThan(a, b) { + return compareComponents(a, b) === -1; +} + +/** + * Checks whether `a` is less than or equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkLessThanOrEqual(a, b) { + const result = compareComponents(a, b); + return result === -1 || result === 0; +} + +/** + * Checks whether `a` is equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkEqual(a, b) { + return compareComponents(a, b) === 0; +} + +/** + * Checks whether `a` is greater than or equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkGreaterThanOrEqual(a, b) { + const result = compareComponents(a, b); + return result === 1 || result === 0; +} + +/** + * Checks whether `a` is greater than `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkGreaterThan(a, b) { + return compareComponents(a, b) === 1; +} + +/** + * Checks whether `a` is "reasonably close" to `b` (as described in + * https://www.npmjs.org/doc/misc/semver.html). For example, if `b` is "1.3.1" + * then "reasonably close" is defined as ">= 1.3.1 and < 1.4". + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkApproximateVersion(a, b) { + const lowerBound = b.slice(); + const upperBound = b.slice(); + + if (upperBound.length > 1) { + upperBound.pop(); + } + const lastIndex = upperBound.length - 1; + const numeric = parseInt(upperBound[lastIndex], 10); + if (isNumber(numeric)) { + upperBound[lastIndex] = numeric + 1 + ''; + } + + return checkGreaterThanOrEqual(a, lowerBound) && checkLessThan(a, upperBound); +} + +/** + * Extracts the optional modifier (<, <=, =, >=, >, ~, ~>) and version + * components from `range`. + * + * For example, given `range` ">= 1.2.3" returns an object with a `modifier` of + * `">="` and `components` of `[1, 2, 3]`. + * + * @param {string} range + * @returns {object} + */ +function getModifierAndComponents(range) { + const rangeComponents = range.split(componentRegex); + const matches = rangeComponents[0].match(modifierRegex); + invariant(matches, 'expected regex to match but it did not'); + + return { + modifier: matches[1], + rangeComponents: [matches[2]].concat(rangeComponents.slice(1)) + }; +} + +/** + * Determines if `number` is a number. + * + * @param {mixed} number + * @returns {boolean} + */ +function isNumber(number) { + return !isNaN(number) && isFinite(number); +} + +/** + * Tests whether `range` is a "simple" version number without any modifiers + * (">", "~" etc). + * + * @param {string} range + * @returns {boolean} + */ +function isSimpleVersion(range) { + return !getModifierAndComponents(range).modifier; +} + +/** + * Zero-pads array `array` until it is at least `length` long. + * + * @param {array} array + * @param {number} length + */ +function zeroPad(array, length) { + for (let i = array.length; i < length; i++) { + array[i] = '0'; + } +} + +/** + * Normalizes `a` and `b` in preparation for comparison by doing the following: + * + * - zero-pads `a` and `b` + * - marks any "x", "X" or "*" component in `b` as equivalent by zero-ing it out + * in both `a` and `b` + * - marks any final "*" component in `b` as a greedy wildcard by zero-ing it + * and all of its successors in `a` + * + * @param {array} a + * @param {array} b + * @returns {array>} + */ +function normalizeVersions(a, b) { + a = a.slice(); + b = b.slice(); + + zeroPad(a, b.length); + + // mark "x" and "*" components as equal + for (let i = 0; i < b.length; i++) { + const matches = b[i].match(/^[x*]$/i); + if (matches) { + b[i] = a[i] = '0'; + + // final "*" greedily zeros all remaining components + if (matches[0] === '*' && i === b.length - 1) { + for (let j = i; j < a.length; j++) { + a[j] = '0'; + } + } + } + } + + zeroPad(b, a.length); + + return [a, b]; +} + +/** + * Returns the numerical -- not the lexicographical -- ordering of `a` and `b`. + * + * For example, `10-alpha` is greater than `2-beta`. + * + * @param {string} a + * @param {string} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compareNumeric(a, b) { + const aPrefix = a.match(numericRegex)[1]; + const bPrefix = b.match(numericRegex)[1]; + const aNumeric = parseInt(aPrefix, 10); + const bNumeric = parseInt(bPrefix, 10); + + if (isNumber(aNumeric) && isNumber(bNumeric) && aNumeric !== bNumeric) { + return compare(aNumeric, bNumeric); + } else { + return compare(a, b); + } +} + +/** + * Returns the ordering of `a` and `b`. + * + * @param {string|number} a + * @param {string|number} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compare(a, b) { + invariant(typeof a === typeof b, '"a" and "b" must be of the same type'); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } else { + return 0; + } +} + +/** + * Compares arrays of version components. + * + * @param {array} a + * @param {array} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compareComponents(a, b) { + const [aNormalized, bNormalized] = normalizeVersions(a, b); + + for (let i = 0; i < bNormalized.length; i++) { + const result = compareNumeric(aNormalized[i], bNormalized[i]); + if (result) { + return result; + } + } + + return 0; +} + +var VersionRange = { + /** + * Checks whether `version` satisfies the `range` specification. + * + * We support a subset of the expressions defined in + * https://www.npmjs.org/doc/misc/semver.html: + * + * version Must match version exactly + * =version Same as just version + * >version Must be greater than version + * >=version Must be greater than or equal to version + * = 1.2.3 and < 1.3" + * ~>version Equivalent to ~version + * 1.2.x Must match "1.2.x", where "x" is a wildcard that matches + * anything + * 1.2.* Similar to "1.2.x", but "*" in the trailing position is a + * "greedy" wildcard, so will match any number of additional + * components: + * "1.2.*" will match "1.2.1", "1.2.1.1", "1.2.1.1.1" etc + * * Any version + * "" (Empty string) Same as * + * v1 - v2 Equivalent to ">= v1 and <= v2" + * r1 || r2 Passes if either r1 or r2 are satisfied + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ + contains(range, version) { + return checkOrExpression(range.trim(), version.trim()); + } +}; + +module.exports = VersionRange; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/__mocks__/ErrorUtils.js b/socket/node_modules/fbjs/lib/__mocks__/ErrorUtils.js new file mode 100644 index 0000000..5140ac4 --- /dev/null +++ b/socket/node_modules/fbjs/lib/__mocks__/ErrorUtils.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +var ErrorUtils = jest.genMockFromModule('../ErrorUtils'); + +ErrorUtils.applyWithGuard.mockImplementation(function (callback, context, args) { + return callback.apply(context, args); +}); + +ErrorUtils.guard.mockImplementation(function (callback) { + return callback; +}); + +module.exports = ErrorUtils; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/__mocks__/base62.js b/socket/node_modules/fbjs/lib/__mocks__/base62.js new file mode 100644 index 0000000..24cc91c --- /dev/null +++ b/socket/node_modules/fbjs/lib/__mocks__/base62.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +module.exports = require.requireActual('../base62'); \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/__mocks__/crc32.js b/socket/node_modules/fbjs/lib/__mocks__/crc32.js new file mode 100644 index 0000000..259e4c7 --- /dev/null +++ b/socket/node_modules/fbjs/lib/__mocks__/crc32.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +module.exports = require.requireActual('../crc32'); \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/__mocks__/fetch.js b/socket/node_modules/fbjs/lib/__mocks__/fetch.js new file mode 100644 index 0000000..2ae49d6 --- /dev/null +++ b/socket/node_modules/fbjs/lib/__mocks__/fetch.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @noflow + */ + +'use strict'; + +var Deferred = require.requireActual('../Deferred'); + +function fetch(uri, options) { + var deferred = new Deferred(); + fetch.mock.calls.push([uri, options]); + fetch.mock.deferreds.push(deferred); + return deferred.getPromise(); +} + +fetch.mock = { + calls: [], + deferreds: [] +}; + +module.exports = fetch; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/__mocks__/fetchWithRetries.js b/socket/node_modules/fbjs/lib/__mocks__/fetchWithRetries.js new file mode 100644 index 0000000..f87746b --- /dev/null +++ b/socket/node_modules/fbjs/lib/__mocks__/fetchWithRetries.js @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @noflow + */ + +'use strict'; + +var Deferred = require.requireActual('../Deferred'); + +function fetchWithRetries() { + var deferred = new Deferred(); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + fetchWithRetries.mock.calls.push(args); + fetchWithRetries.mock.deferreds.push(deferred); + return deferred.getPromise(); +} + +fetchWithRetries.mock = { + calls: [], + deferreds: [] +}; + +module.exports = fetchWithRetries; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/__mocks__/nullthrows.js b/socket/node_modules/fbjs/lib/__mocks__/nullthrows.js new file mode 100644 index 0000000..4342283 --- /dev/null +++ b/socket/node_modules/fbjs/lib/__mocks__/nullthrows.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +jest.dontMock('../nullthrows'); + +module.exports = require('../nullthrows'); \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/_shouldPolyfillES6Collection.js b/socket/node_modules/fbjs/lib/_shouldPolyfillES6Collection.js new file mode 100644 index 0000000..86b177f --- /dev/null +++ b/socket/node_modules/fbjs/lib/_shouldPolyfillES6Collection.js @@ -0,0 +1,39 @@ +'use strict'; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @preventMunge + * + */ + +/** + * Checks whether a collection name (e.g. "Map" or "Set") has a native polyfill + * that is safe to be used. + */ +function shouldPolyfillES6Collection(collectionName) { + var Collection = global[collectionName]; + if (Collection == null) { + return true; + } + + // The iterator protocol depends on `Symbol.iterator`. If a collection is + // implemented, but `Symbol` is not, it's going to break iteration because + // we'll be using custom "@@iterator" instead, which is not implemented on + // native collections. + if (typeof global.Symbol !== 'function') { + return true; + } + + var proto = Collection.prototype; + + // These checks are adapted from es6-shim: https://fburl.com/34437854 + // NOTE: `isCallableWithoutNew` and `!supportsSubclassing` are not checked + // because they make debugging with "break on exceptions" difficult. + return Collection == null || typeof Collection !== 'function' || typeof proto.clear !== 'function' || new Collection().size !== 0 || typeof proto.keys !== 'function' || typeof proto.forEach !== 'function'; +} + +module.exports = shouldPolyfillES6Collection; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/_shouldPolyfillES6Collection.js.flow b/socket/node_modules/fbjs/lib/_shouldPolyfillES6Collection.js.flow new file mode 100644 index 0000000..672b5f1 --- /dev/null +++ b/socket/node_modules/fbjs/lib/_shouldPolyfillES6Collection.js.flow @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule _shouldPolyfillES6Collection + * @preventMunge + * @flow + */ + +/** + * Checks whether a collection name (e.g. "Map" or "Set") has a native polyfill + * that is safe to be used. + */ +function shouldPolyfillES6Collection(collectionName: string): boolean { + const Collection = global[collectionName]; + if (Collection == null) { + return true; + } + + // The iterator protocol depends on `Symbol.iterator`. If a collection is + // implemented, but `Symbol` is not, it's going to break iteration because + // we'll be using custom "@@iterator" instead, which is not implemented on + // native collections. + if (typeof global.Symbol !== 'function') { + return true; + } + + const proto = Collection.prototype; + + // These checks are adapted from es6-shim: https://fburl.com/34437854 + // NOTE: `isCallableWithoutNew` and `!supportsSubclassing` are not checked + // because they make debugging with "break on exceptions" difficult. + return Collection == null || typeof Collection !== 'function' || typeof proto.clear !== 'function' || new Collection().size !== 0 || typeof proto.keys !== 'function' || typeof proto.forEach !== 'function'; +} + +module.exports = shouldPolyfillES6Collection; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/areEqual.js b/socket/node_modules/fbjs/lib/areEqual.js new file mode 100644 index 0000000..e6a7da3 --- /dev/null +++ b/socket/node_modules/fbjs/lib/areEqual.js @@ -0,0 +1,106 @@ +'use strict'; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + +var aStackPool = []; +var bStackPool = []; + +/** + * Checks if two values are equal. Values may be primitives, arrays, or objects. + * Returns true if both arguments have the same keys and values. + * + * @see http://underscorejs.org + * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. + * @license MIT + */ +function areEqual(a, b) { + var aStack = aStackPool.length ? aStackPool.pop() : []; + var bStack = bStackPool.length ? bStackPool.pop() : []; + var result = eq(a, b, aStack, bStack); + aStack.length = 0; + bStack.length = 0; + aStackPool.push(aStack); + bStackPool.push(bStack); + return result; +} + +function eq(a, b, aStack, bStack) { + if (a === b) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + return a !== 0 || 1 / a == 1 / b; + } + if (a == null || b == null) { + // a or b can be `null` or `undefined` + return false; + } + if (typeof a != 'object' || typeof b != 'object') { + return false; + } + var objToStr = Object.prototype.toString; + var className = objToStr.call(a); + if (className != objToStr.call(b)) { + return false; + } + switch (className) { + case '[object String]': + return a == String(b); + case '[object Number]': + return isNaN(a) || isNaN(b) ? false : a == Number(b); + case '[object Date]': + case '[object Boolean]': + return +a == +b; + case '[object RegExp]': + return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; + } + // Assume equality for cyclic structures. + var length = aStack.length; + while (length--) { + if (aStack[length] == a) { + return bStack[length] == b; + } + } + aStack.push(a); + bStack.push(b); + var size = 0; + // Recursively compare objects and arrays. + if (className === '[object Array]') { + size = a.length; + if (size !== b.length) { + return false; + } + // Deep compare the contents, ignoring non-numeric properties. + while (size--) { + if (!eq(a[size], b[size], aStack, bStack)) { + return false; + } + } + } else { + if (a.constructor !== b.constructor) { + return false; + } + if (a.hasOwnProperty('valueOf') && b.hasOwnProperty('valueOf')) { + return a.valueOf() == b.valueOf(); + } + var keys = Object.keys(a); + if (keys.length != Object.keys(b).length) { + return false; + } + for (var i = 0; i < keys.length; i++) { + if (!eq(a[keys[i]], b[keys[i]], aStack, bStack)) { + return false; + } + } + } + aStack.pop(); + bStack.pop(); + return true; +} + +module.exports = areEqual; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/areEqual.js.flow b/socket/node_modules/fbjs/lib/areEqual.js.flow new file mode 100644 index 0000000..06e53ec --- /dev/null +++ b/socket/node_modules/fbjs/lib/areEqual.js.flow @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule areEqual + * @flow + */ + +const aStackPool = []; +const bStackPool = []; + +/** + * Checks if two values are equal. Values may be primitives, arrays, or objects. + * Returns true if both arguments have the same keys and values. + * + * @see http://underscorejs.org + * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. + * @license MIT + */ +function areEqual(a: any, b: any): boolean { + const aStack = aStackPool.length ? aStackPool.pop() : []; + const bStack = bStackPool.length ? bStackPool.pop() : []; + const result = eq(a, b, aStack, bStack); + aStack.length = 0; + bStack.length = 0; + aStackPool.push(aStack); + bStackPool.push(bStack); + return result; +} + +function eq(a: any, b: any, aStack: Array, bStack: Array): boolean { + if (a === b) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + return a !== 0 || 1 / a == 1 / b; + } + if (a == null || b == null) { + // a or b can be `null` or `undefined` + return false; + } + if (typeof a != 'object' || typeof b != 'object') { + return false; + } + const objToStr = Object.prototype.toString; + const className = objToStr.call(a); + if (className != objToStr.call(b)) { + return false; + } + switch (className) { + case '[object String]': + return a == String(b); + case '[object Number]': + return isNaN(a) || isNaN(b) ? false : a == Number(b); + case '[object Date]': + case '[object Boolean]': + return +a == +b; + case '[object RegExp]': + return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; + } + // Assume equality for cyclic structures. + let length = aStack.length; + while (length--) { + if (aStack[length] == a) { + return bStack[length] == b; + } + } + aStack.push(a); + bStack.push(b); + let size = 0; + // Recursively compare objects and arrays. + if (className === '[object Array]') { + size = a.length; + if (size !== b.length) { + return false; + } + // Deep compare the contents, ignoring non-numeric properties. + while (size--) { + if (!eq(a[size], b[size], aStack, bStack)) { + return false; + } + } + } else { + if (a.constructor !== b.constructor) { + return false; + } + if (a.hasOwnProperty('valueOf') && b.hasOwnProperty('valueOf')) { + return a.valueOf() == b.valueOf(); + } + const keys = Object.keys(a); + if (keys.length != Object.keys(b).length) { + return false; + } + for (let i = 0; i < keys.length; i++) { + if (!eq(a[keys[i]], b[keys[i]], aStack, bStack)) { + return false; + } + } + } + aStack.pop(); + bStack.pop(); + return true; +} + +module.exports = areEqual; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/base62.js b/socket/node_modules/fbjs/lib/base62.js new file mode 100644 index 0000000..e2e4d82 --- /dev/null +++ b/socket/node_modules/fbjs/lib/base62.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + +'use strict'; + +var BASE62 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + +function base62(number) { + if (!number) { + return '0'; + } + var string = ''; + while (number > 0) { + string = BASE62[number % 62] + string; + number = Math.floor(number / 62); + } + return string; +} + +module.exports = base62; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/base62.js.flow b/socket/node_modules/fbjs/lib/base62.js.flow new file mode 100644 index 0000000..f815120 --- /dev/null +++ b/socket/node_modules/fbjs/lib/base62.js.flow @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule base62 + * @flow + */ + +'use strict'; + +const BASE62 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + +function base62(number: number): string { + if (!number) { + return '0'; + } + let string = ''; + while (number > 0) { + string = BASE62[number % 62] + string; + number = Math.floor(number / 62); + } + return string; +} + +module.exports = base62; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/camelize.js b/socket/node_modules/fbjs/lib/camelize.js new file mode 100644 index 0000000..ca010a2 --- /dev/null +++ b/socket/node_modules/fbjs/lib/camelize.js @@ -0,0 +1,29 @@ +"use strict"; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @typechecks + */ + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/camelize.js.flow b/socket/node_modules/fbjs/lib/camelize.js.flow new file mode 100644 index 0000000..9b0b423 --- /dev/null +++ b/socket/node_modules/fbjs/lib/camelize.js.flow @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule camelize + * @typechecks + */ + +const _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/camelizeStyleName.js b/socket/node_modules/fbjs/lib/camelizeStyleName.js new file mode 100644 index 0000000..6b076a3 --- /dev/null +++ b/socket/node_modules/fbjs/lib/camelizeStyleName.js @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @typechecks + */ + +'use strict'; + +var camelize = require('./camelize'); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/camelizeStyleName.js.flow b/socket/node_modules/fbjs/lib/camelizeStyleName.js.flow new file mode 100644 index 0000000..8883fea --- /dev/null +++ b/socket/node_modules/fbjs/lib/camelizeStyleName.js.flow @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule camelizeStyleName + * @typechecks + */ + +'use strict'; + +const camelize = require('./camelize'); + +const msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/compactArray.js b/socket/node_modules/fbjs/lib/compactArray.js new file mode 100644 index 0000000..5db7754 --- /dev/null +++ b/socket/node_modules/fbjs/lib/compactArray.js @@ -0,0 +1,27 @@ +/** + * Copyright 2015-present Facebook. All Rights Reserved. + * + * @typechecks + * + */ + +'use strict'; + +/** + * Returns a new Array containing all the element of the source array except + * `null` and `undefined` ones. This brings the benefit of strong typing over + * `Array.prototype.filter`. + */ + +function compactArray(array) { + var result = []; + for (var i = 0; i < array.length; ++i) { + var elem = array[i]; + if (elem != null) { + result.push(elem); + } + } + return result; +} + +module.exports = compactArray; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/compactArray.js.flow b/socket/node_modules/fbjs/lib/compactArray.js.flow new file mode 100644 index 0000000..5b8ccbe --- /dev/null +++ b/socket/node_modules/fbjs/lib/compactArray.js.flow @@ -0,0 +1,28 @@ +/** + * Copyright 2015-present Facebook. All Rights Reserved. + * + * @providesModule compactArray + * @typechecks + * @flow + */ + +'use strict'; + +/** + * Returns a new Array containing all the element of the source array except + * `null` and `undefined` ones. This brings the benefit of strong typing over + * `Array.prototype.filter`. + */ + +function compactArray(array: Array): Array { + var result = []; + for (var i = 0; i < array.length; ++i) { + var elem = array[i]; + if (elem != null) { + result.push(elem); + } + } + return result; +} + +module.exports = compactArray; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/concatAllArray.js b/socket/node_modules/fbjs/lib/concatAllArray.js new file mode 100644 index 0000000..a964982 --- /dev/null +++ b/socket/node_modules/fbjs/lib/concatAllArray.js @@ -0,0 +1,33 @@ +'use strict'; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @typechecks + */ + +var push = Array.prototype.push; + +/** + * Concats an array of arrays into a single flat array. + * + * @param {array} array + * @return {array} + */ +function concatAllArray(array) { + var ret = []; + for (var ii = 0; ii < array.length; ii++) { + var value = array[ii]; + if (Array.isArray(value)) { + push.apply(ret, value); + } else if (value != null) { + throw new TypeError('concatAllArray: All items in the array must be an array or null, ' + 'got "' + value + '" at index "' + ii + '" instead'); + } + } + return ret; +} + +module.exports = concatAllArray; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/concatAllArray.js.flow b/socket/node_modules/fbjs/lib/concatAllArray.js.flow new file mode 100644 index 0000000..41103ff --- /dev/null +++ b/socket/node_modules/fbjs/lib/concatAllArray.js.flow @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule concatAllArray + * @typechecks + */ + +var push = Array.prototype.push; + +/** + * Concats an array of arrays into a single flat array. + * + * @param {array} array + * @return {array} + */ +function concatAllArray(array) { + var ret = []; + for (var ii = 0; ii < array.length; ii++) { + var value = array[ii]; + if (Array.isArray(value)) { + push.apply(ret, value); + } else if (value != null) { + throw new TypeError('concatAllArray: All items in the array must be an array or null, ' + 'got "' + value + '" at index "' + ii + '" instead'); + } + } + return ret; +} + +module.exports = concatAllArray; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/containsNode.js b/socket/node_modules/fbjs/lib/containsNode.js new file mode 100644 index 0000000..bee5085 --- /dev/null +++ b/socket/node_modules/fbjs/lib/containsNode.js @@ -0,0 +1,37 @@ +'use strict'; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + +var isTextNode = require('./isTextNode'); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/containsNode.js.flow b/socket/node_modules/fbjs/lib/containsNode.js.flow new file mode 100644 index 0000000..b2117f3 --- /dev/null +++ b/socket/node_modules/fbjs/lib/containsNode.js.flow @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule containsNode + * @flow + */ + +const isTextNode = require('./isTextNode'); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + */ +function containsNode(outerNode: ?Node, innerNode: ?Node): boolean { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/countDistinct.js b/socket/node_modules/fbjs/lib/countDistinct.js new file mode 100644 index 0000000..c8aa925 --- /dev/null +++ b/socket/node_modules/fbjs/lib/countDistinct.js @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + +'use strict'; + +var Set = require('./Set'); + +var emptyFunction = require('./emptyFunction'); + +/** + * Returns the count of distinct elements selected from an array. + */ +function countDistinct(iter, selector) { + selector = selector || emptyFunction.thatReturnsArgument; + + var set = new Set(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = iter[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var val = _step.value; + + set.add(selector(val)); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator['return']) { + _iterator['return'](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return set.size; +} + +module.exports = countDistinct; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/countDistinct.js.flow b/socket/node_modules/fbjs/lib/countDistinct.js.flow new file mode 100644 index 0000000..25676aa --- /dev/null +++ b/socket/node_modules/fbjs/lib/countDistinct.js.flow @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule countDistinct + * @flow + */ + +'use strict'; + +var Set = require('./Set'); + +var emptyFunction = require('./emptyFunction'); + +/** + * Returns the count of distinct elements selected from an array. + */ +function countDistinct(iter: Iterable, selector: (item: T1) => T2): number { + selector = selector || emptyFunction.thatReturnsArgument; + + var set = new Set(); + for (var val of iter) { + set.add(selector(val)); + } + + return set.size; +} + +module.exports = countDistinct; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/crc32.js b/socket/node_modules/fbjs/lib/crc32.js new file mode 100644 index 0000000..806694c --- /dev/null +++ b/socket/node_modules/fbjs/lib/crc32.js @@ -0,0 +1,27 @@ +"use strict"; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + +function crc32(str) { + /* jslint bitwise: true */ + var crc = -1; + for (var i = 0, len = str.length; i < len; i++) { + crc = crc >>> 8 ^ table[(crc ^ str.charCodeAt(i)) & 0xFF]; + } + return ~crc; +} + +var table = [0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D]; + +if (global.Int32Array !== undefined) { + table = new Int32Array(table); +} + +module.exports = crc32; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/crc32.js.flow b/socket/node_modules/fbjs/lib/crc32.js.flow new file mode 100644 index 0000000..00cab44 --- /dev/null +++ b/socket/node_modules/fbjs/lib/crc32.js.flow @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule crc32 + * @flow + */ + +function crc32(str: string): number { + /* jslint bitwise: true */ + var crc = -1; + for (var i = 0, len = str.length; i < len; i++) { + crc = crc >>> 8 ^ table[(crc ^ str.charCodeAt(i)) & 0xFF]; + } + return ~crc; +} + +var table = [0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D]; + +if (global.Int32Array !== undefined) { + table = new Int32Array(table); +} + +module.exports = crc32; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/createArrayFromMixed.js b/socket/node_modules/fbjs/lib/createArrayFromMixed.js new file mode 100644 index 0000000..879141a --- /dev/null +++ b/socket/node_modules/fbjs/lib/createArrayFromMixed.js @@ -0,0 +1,124 @@ +'use strict'; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @typechecks + */ + +var invariant = require('./invariant'); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; + + !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; + + !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; + + !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/createArrayFromMixed.js.flow b/socket/node_modules/fbjs/lib/createArrayFromMixed.js.flow new file mode 100644 index 0000000..1448db1 --- /dev/null +++ b/socket/node_modules/fbjs/lib/createArrayFromMixed.js.flow @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule createArrayFromMixed + * @typechecks + */ + +const invariant = require('./invariant'); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + const length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + invariant(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function'), 'toArray: Array-like object expected'); + + invariant(typeof length === 'number', 'toArray: Object needs a length property'); + + invariant(length === 0 || length - 1 in obj, 'toArray: Object should have keys for indices'); + + invariant(typeof obj.callee !== 'function', 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.'); + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + const ret = Array(length); + for (let ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; \ No newline at end of file diff --git a/socket/node_modules/fbjs/lib/createNodesFromMarkup.js b/socket/node_modules/fbjs/lib/createNodesFromMarkup.js new file mode 100644 index 0000000..a0c2161 --- /dev/null +++ b/socket/node_modules/fbjs/lib/createNodesFromMarkup.js @@ -0,0 +1,81 @@ +'use strict'; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @typechecks + */ + +/*eslint-disable fb-www/unsafe-html*/ + +var ExecutionEnvironment = require('./ExecutionEnvironment'); + +var createArrayFromMixed = require('./createArrayFromMixed'); +var getMarkupWrap = require('./getMarkupWrap'); +var invariant = require('./invariant'); + +/** + * Dummy container used to render all markup. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/2_STRING_RENDER.html b/socket/node_modules/pillarjs/_book/2_STRING_RENDER.html new file mode 100644 index 0000000..de9e3d1 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/2_STRING_RENDER.html @@ -0,0 +1,336 @@ + + + + + + + 2. Rendering from string · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+ +
+ +
+ + + + + + + + +
+
+ +
+
+ +
+ +

Rendering from string

+

If for any reason you don't want to use JSX, you can render component from string or template tag.

+

Rendering from string is extremely simple. The syntax is very similar to +stateless components, but instead of returning JSX your function should +return a string:

+
const SuperHeader = ({ text }) => `
+    <div>
+        <h1>${text}</h1>
+        <h3>It's Superpowered!</h3>
+    </div>
+`;
+
+

Your component function will have the props argument that you can use for interpolation (i.e. via +ES6 template string).

+

Note that string render doesn't support state and lifecycle methods.

+

Next: Render from template tag →

+ + +
+ +
+
+
+ +

results matching ""

+
    + +
    +
    + +

    No results matching ""

    + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/3_TEMPLATE_RENDER.html b/socket/node_modules/pillarjs/_book/3_TEMPLATE_RENDER.html new file mode 100644 index 0000000..3dda153 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/3_TEMPLATE_RENDER.html @@ -0,0 +1,348 @@ + + + + + + + 3. Rendering template tags · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    + +
    + +
    + + + + + + + + +
    +
    + +
    +
    + +
    + +

    Rendering from template tag

    +

    Pillar allows rendering components from HTML <template> tag. All you need to do is pass template's +ID to the register function like so:

    +
    Pillar.register('#my-template', 'super-header');
    +
    +

    Note: Explicitly specifying tag name is required when registering a template.

    +

    How do I access props?

    +

    Because you're not defining a function when registering template, there's no explicit place to +access props. Instead props are passed to the template directly using {{Mustache}} syntax.

    +

    So in your HTML you can do:

    +
    <template id="my-template">
    +    <h1>{{text}}</h1>
    +    <h3>It's Superpowered!</h3>
    +</template>
    +
    +...
    +
    +<super-header text="This is not a simple header!"></super-header>
    +
    +

    I like to live dangerously and want to use <script> tags

    +

    By default <script> tags are removed from template before rendering. You can override this +behavior by passing allowScripts option when registering:

    +
    Pillar.register('#my-template', 'super-header', {
    +    allowScripts: true,
    +});
    +
    +

    This will run any JS code inside the template.

    +

    Next: Flags →

    + + +
    + +
    +
    +
    + +

    results matching ""

    +
      + +
      +
      + +

      No results matching ""

      + +
      +
      +
      + +
      +
      + +
      + + + + + + + + + + + + + + +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/4_HANDLING_INPUT.html b/socket/node_modules/pillarjs/_book/4_HANDLING_INPUT.html new file mode 100644 index 0000000..41ce4ca --- /dev/null +++ b/socket/node_modules/pillarjs/_book/4_HANDLING_INPUT.html @@ -0,0 +1,348 @@ + + + + + + + 4. Handling user input · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + + + +
      + +
      + +
      + + + + + + + + +
      +
      + +
      +
      + +
      + +

      Handling User Input

      +

      Since Pillar components' architecture is virtually the same as React's, you can handle interactions +in the similar way:

      +
      class SuperInput extends Pillar {
      +    handleChange(e) {
      +        this.setState({
      +            email: e.target.value,
      +        });
      +    }
      +
      +    render() {
      +        return <input name="email" onInput={this.handleChange.bind(this)} />;
      +    }
      +}
      +
      +

      However, because Pillar is using Preact under the hood, you +get a convenient linkState method on a component which you can use like so:

      +

      Note: the example above uses .bind(this) for demonstration purposes, but it's not a +recommended way. Use autobind-decorator or +decko in real code.

      +
      class SuperInput extends Pillar {
      +    render() {
      +        return <input name="email" onInput={this.linkState('email')} />;
      +    }
      +}
      +
      +

      Optionally, you can provide a second 'path' argument to explicitly provide a dot-notated path to the +new state value for more custom bindings.

      + + +
      + +
      +
      +
      + +

      results matching ""

      +
        + +
        +
        + +

        No results matching ""

        + +
        +
        +
        + +
        +
        + +
        + + + + + + + + + + + + + + +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/5_FLAGS.html b/socket/node_modules/pillarjs/_book/5_FLAGS.html new file mode 100644 index 0000000..ca9a5fd --- /dev/null +++ b/socket/node_modules/pillarjs/_book/5_FLAGS.html @@ -0,0 +1,333 @@ + + + + + + + 5. Flags · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        + + + + + + + + +
        + +
        + +
        + + + + + + + + +
        +
        + +
        +
        + +
        + +

        Flags

        +

        If you prefix any of your element's attributes with a p: it becomes a flag.

        +

        Flags are passed to this.flags and are recommended for namespacing your "service" attributes.

        +

        Available flags

        +

        Pillar also pre-defines some flags that change the behavior of Pillar components:

        +

        p:ignore-children

        +

        If this flag is set, content of a custom element tag won't be passed to this.props.children when +component is rendered.

        +

        p:protected

        +

        This flag locks external attribute manipulation. If an external force like jQuery is trying to +change an element with this flag, changes won't be passed down to this.props and it will throw an +error.

        +

        Next: Shadow DOM→

        + + +
        + +
        +
        +
        + +

        results matching ""

        +
          + +
          +
          + +

          No results matching ""

          + +
          +
          +
          + +
          +
          + +
          + + + + + + + + + + + + + + +
          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/6_SHADOW_DOM.html b/socket/node_modules/pillarjs/_book/6_SHADOW_DOM.html new file mode 100644 index 0000000..62ea995 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/6_SHADOW_DOM.html @@ -0,0 +1,336 @@ + + + + + + + 6. Shadow DOM · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +
          + + + + + + + + +
          + +
          + +
          + + + + + + + + +
          +
          + +
          +
          + +
          + +

          Shadow DOM

          +

          By default Pillar components don't use Shadow DOM because polyfill for it in some browsers may be a +bit expensive. If you know what you doing and want to use Shadow DOM, all you need to do is pass an +options object with useShadow when registering:

          +
          Pillar.register(MyComponent, 'my-component', {
          +    useShadow: 'open',
          +});
          +
          +

          Modes

          +
            +
          • useShadow: 'open' will enable Shadow DOM that is accessible from outside JavaScript.
          • +
          • useShadow: 'closed' will enable Shadow DOM that is unaccessible and unchangeable from + JavaScript. As such, these elements can't be controlled using + Pillar DevTools.
          • +
          +

          Next: Pillar DevTools →

          + + +
          + +
          +
          +
          + +

          results matching ""

          +
            + +
            +
            + +

            No results matching ""

            + +
            +
            +
            + +
            +
            + +
            + + + + + + + + + + + + + + +
            + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/7_DEVTOOLS.html b/socket/node_modules/pillarjs/_book/7_DEVTOOLS.html new file mode 100644 index 0000000..832ee00 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/7_DEVTOOLS.html @@ -0,0 +1,335 @@ + + + + + + + 7. Pillar DevTools · GitBook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +
            + + + + + + + + +
            + +
            + +
            + + + + + + + + +
            +
            + +
            +
            + +
            + +

            Pillar DevTools

            +

            Pillar provides a Chrome DevTools extension that allows you to efficiently inspect Pillar +components.

            +

            +

            What it does

            +

            Extension has 2 modes - panel and elements sidebar.

            +

            Panel is where most of the sweet stuff is:

            +
              +
            • List of all Pillar elements on the page with previews
            • +
            • Highlight element on hover
            • +
            • Highlight all Pillar elements on page
            • +
            • Editable JSON representation of the element
            • +
            • Pretty side view (element name, props, flags, ShadowDOM status and HTML representation)
            • +
            +

            Sidebar available on "Elements" tab of DevTools only contains editable JSON representation (useful +for quick inspection in the DOM tree).

            +

            How it does it

            +

            Pillar communicates with Dev Tools through a service object window.__PILLAR_DEVTOOLS_HOOK__ in a +similar manner to React. Dev Tools extension creates this object before Pillar is loaded, and if +during initialization of a component this object is present, Pillar will set metadata for Dev Tools +to parse.

            + + +
            + +
            +
            +
            + +

            results matching ""

            +
              + +
              +
              + +

              No results matching ""

              + +
              +
              +
              + +
              +
              + +
              + + + + + + + + + + +
              + + +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/FontAwesome.otf b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/FontAwesome.otf new file mode 100644 index 0000000..d4de13e Binary files /dev/null and b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/FontAwesome.otf differ diff --git a/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot new file mode 100644 index 0000000..c7b00d2 Binary files /dev/null and b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot differ diff --git a/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.svg b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.svg new file mode 100644 index 0000000..8b66187 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.svg @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf new file mode 100644 index 0000000..f221e50 Binary files /dev/null and b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf differ diff --git a/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff new file mode 100644 index 0000000..6e7483c Binary files /dev/null and b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff differ diff --git a/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 new file mode 100644 index 0000000..7eb74fd Binary files /dev/null and b/socket/node_modules/pillarjs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 differ diff --git a/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-fontsettings/fontsettings.js b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-fontsettings/fontsettings.js new file mode 100644 index 0000000..ff7be71 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-fontsettings/fontsettings.js @@ -0,0 +1,240 @@ +require(['gitbook', 'jquery'], function(gitbook, $) { + // Configuration + var MAX_SIZE = 4, + MIN_SIZE = 0, + BUTTON_ID; + + // Current fontsettings state + var fontState; + + // Default themes + var THEMES = [ + { + config: 'white', + text: 'White', + id: 0 + }, + { + config: 'sepia', + text: 'Sepia', + id: 1 + }, + { + config: 'night', + text: 'Night', + id: 2 + } + ]; + + // Default font families + var FAMILIES = [ + { + config: 'serif', + text: 'Serif', + id: 0 + }, + { + config: 'sans', + text: 'Sans', + id: 1 + } + ]; + + // Return configured themes + function getThemes() { + return THEMES; + } + + // Modify configured themes + function setThemes(themes) { + THEMES = themes; + updateButtons(); + } + + // Return configured font families + function getFamilies() { + return FAMILIES; + } + + // Modify configured font families + function setFamilies(families) { + FAMILIES = families; + updateButtons(); + } + + // Save current font settings + function saveFontSettings() { + gitbook.storage.set('fontState', fontState); + update(); + } + + // Increase font size + function enlargeFontSize(e) { + e.preventDefault(); + if (fontState.size >= MAX_SIZE) return; + + fontState.size++; + saveFontSettings(); + } + + // Decrease font size + function reduceFontSize(e) { + e.preventDefault(); + if (fontState.size <= MIN_SIZE) return; + + fontState.size--; + saveFontSettings(); + } + + // Change font family + function changeFontFamily(configName, e) { + if (e && e instanceof Event) { + e.preventDefault(); + } + + var familyId = getFontFamilyId(configName); + fontState.family = familyId; + saveFontSettings(); + } + + // Change type of color theme + function changeColorTheme(configName, e) { + if (e && e instanceof Event) { + e.preventDefault(); + } + + var $book = gitbook.state.$book; + + // Remove currently applied color theme + if (fontState.theme !== 0) + $book.removeClass('color-theme-'+fontState.theme); + + // Set new color theme + var themeId = getThemeId(configName); + fontState.theme = themeId; + if (fontState.theme !== 0) + $book.addClass('color-theme-'+fontState.theme); + + saveFontSettings(); + } + + // Return the correct id for a font-family config key + // Default to first font-family + function getFontFamilyId(configName) { + // Search for plugin configured font family + var configFamily = $.grep(FAMILIES, function(family) { + return family.config == configName; + })[0]; + // Fallback to default font family + return (!!configFamily)? configFamily.id : 0; + } + + // Return the correct id for a theme config key + // Default to first theme + function getThemeId(configName) { + // Search for plugin configured theme + var configTheme = $.grep(THEMES, function(theme) { + return theme.config == configName; + })[0]; + // Fallback to default theme + return (!!configTheme)? configTheme.id : 0; + } + + function update() { + var $book = gitbook.state.$book; + + $('.font-settings .font-family-list li').removeClass('active'); + $('.font-settings .font-family-list li:nth-child('+(fontState.family+1)+')').addClass('active'); + + $book[0].className = $book[0].className.replace(/\bfont-\S+/g, ''); + $book.addClass('font-size-'+fontState.size); + $book.addClass('font-family-'+fontState.family); + + if(fontState.theme !== 0) { + $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, ''); + $book.addClass('color-theme-'+fontState.theme); + } + } + + function init(config) { + // Search for plugin configured font family + var configFamily = getFontFamilyId(config.family), + configTheme = getThemeId(config.theme); + + // Instantiate font state object + fontState = gitbook.storage.get('fontState', { + size: config.size || 2, + family: configFamily, + theme: configTheme + }); + + update(); + } + + function updateButtons() { + // Remove existing fontsettings buttons + if (!!BUTTON_ID) { + gitbook.toolbar.removeButton(BUTTON_ID); + } + + // Create buttons in toolbar + BUTTON_ID = gitbook.toolbar.createButton({ + icon: 'fa fa-font', + label: 'Font Settings', + className: 'font-settings', + dropdown: [ + [ + { + text: 'A', + className: 'font-reduce', + onClick: reduceFontSize + }, + { + text: 'A', + className: 'font-enlarge', + onClick: enlargeFontSize + } + ], + $.map(FAMILIES, function(family) { + family.onClick = function(e) { + return changeFontFamily(family.config, e); + }; + + return family; + }), + $.map(THEMES, function(theme) { + theme.onClick = function(e) { + return changeColorTheme(theme.config, e); + }; + + return theme; + }) + ] + }); + } + + // Init configuration at start + gitbook.events.bind('start', function(e, config) { + var opts = config.fontsettings; + + // Generate buttons at start + updateButtons(); + + // Init current settings + init(opts); + }); + + // Expose API + gitbook.fontsettings = { + enlargeFontSize: enlargeFontSize, + reduceFontSize: reduceFontSize, + setTheme: changeColorTheme, + setFamily: changeFontFamily, + getThemes: getThemes, + setThemes: setThemes, + getFamilies: getFamilies, + setFamilies: setFamilies + }; +}); + + diff --git a/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-fontsettings/website.css b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-fontsettings/website.css new file mode 100644 index 0000000..26591fe --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-fontsettings/website.css @@ -0,0 +1,291 @@ +/* + * Theme 1 + */ +.color-theme-1 .dropdown-menu { + background-color: #111111; + border-color: #7e888b; +} +.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner { + border-bottom: 9px solid #111111; +} +.color-theme-1 .dropdown-menu .buttons { + border-color: #7e888b; +} +.color-theme-1 .dropdown-menu .button { + color: #afa790; +} +.color-theme-1 .dropdown-menu .button:hover { + color: #73553c; +} +/* + * Theme 2 + */ +.color-theme-2 .dropdown-menu { + background-color: #2d3143; + border-color: #272a3a; +} +.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner { + border-bottom: 9px solid #2d3143; +} +.color-theme-2 .dropdown-menu .buttons { + border-color: #272a3a; +} +.color-theme-2 .dropdown-menu .button { + color: #62677f; +} +.color-theme-2 .dropdown-menu .button:hover { + color: #f4f4f5; +} +.book .book-header .font-settings .font-enlarge { + line-height: 30px; + font-size: 1.4em; +} +.book .book-header .font-settings .font-reduce { + line-height: 30px; + font-size: 1em; +} +.book.color-theme-1 .book-body { + color: #704214; + background: #f3eacb; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section { + background: #f3eacb; +} +.book.color-theme-2 .book-body { + color: #bdcadb; + background: #1c1f2b; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section { + background: #1c1f2b; +} +.book.font-size-0 .book-body .page-inner section { + font-size: 1.2rem; +} +.book.font-size-1 .book-body .page-inner section { + font-size: 1.4rem; +} +.book.font-size-2 .book-body .page-inner section { + font-size: 1.6rem; +} +.book.font-size-3 .book-body .page-inner section { + font-size: 2.2rem; +} +.book.font-size-4 .book-body .page-inner section { + font-size: 4rem; +} +.book.font-family-0 { + font-family: Georgia, serif; +} +.book.font-family-1 { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal { + color: #704214; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a { + color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { + color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 { + border-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { + color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr { + background-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote { + border-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code { + background: #fdf6e3; + color: #657b83; + border-color: #f8df9c; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight { + background-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td { + border-color: #f5d06c; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr { + color: inherit; + background-color: #fdf6e3; + border-color: #444444; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { + background-color: #fbeecb; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal { + color: #bdcadb; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a { + color: #3eb1d0; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { + color: #fffffa; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 { + border-color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { + color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr { + background-color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote { + border-color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code { + color: #9dbed8; + background: #2d3143; + border-color: #2d3143; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight { + background-color: #282a39; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td { + border-color: #3b3f54; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr { + color: #b6c2d2; + background-color: #2d3143; + border-color: #3b3f54; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { + background-color: #35394b; +} +.book.color-theme-1 .book-header { + color: #afa790; + background: transparent; +} +.book.color-theme-1 .book-header .btn { + color: #afa790; +} +.book.color-theme-1 .book-header .btn:hover { + color: #73553c; + background: none; +} +.book.color-theme-1 .book-header h1 { + color: #704214; +} +.book.color-theme-2 .book-header { + color: #7e888b; + background: transparent; +} +.book.color-theme-2 .book-header .btn { + color: #3b3f54; +} +.book.color-theme-2 .book-header .btn:hover { + color: #fffff5; + background: none; +} +.book.color-theme-2 .book-header h1 { + color: #bdcadb; +} +.book.color-theme-1 .book-body .navigation { + color: #afa790; +} +.book.color-theme-1 .book-body .navigation:hover { + color: #73553c; +} +.book.color-theme-2 .book-body .navigation { + color: #383f52; +} +.book.color-theme-2 .book-body .navigation:hover { + color: #fffff5; +} +/* + * Theme 1 + */ +.book.color-theme-1 .book-summary { + color: #afa790; + background: #111111; + border-right: 1px solid rgba(0, 0, 0, 0.07); +} +.book.color-theme-1 .book-summary .book-search { + background: transparent; +} +.book.color-theme-1 .book-summary .book-search input, +.book.color-theme-1 .book-summary .book-search input:focus { + border: 1px solid transparent; +} +.book.color-theme-1 .book-summary ul.summary li.divider { + background: #7e888b; + box-shadow: none; +} +.book.color-theme-1 .book-summary ul.summary li i.fa-check { + color: #33cc33; +} +.book.color-theme-1 .book-summary ul.summary li.done > a { + color: #877f6a; +} +.book.color-theme-1 .book-summary ul.summary li a, +.book.color-theme-1 .book-summary ul.summary li span { + color: #877f6a; + background: transparent; + font-weight: normal; +} +.book.color-theme-1 .book-summary ul.summary li.active > a, +.book.color-theme-1 .book-summary ul.summary li a:hover { + color: #704214; + background: transparent; + font-weight: normal; +} +/* + * Theme 2 + */ +.book.color-theme-2 .book-summary { + color: #bcc1d2; + background: #2d3143; + border-right: none; +} +.book.color-theme-2 .book-summary .book-search { + background: transparent; +} +.book.color-theme-2 .book-summary .book-search input, +.book.color-theme-2 .book-summary .book-search input:focus { + border: 1px solid transparent; +} +.book.color-theme-2 .book-summary ul.summary li.divider { + background: #272a3a; + box-shadow: none; +} +.book.color-theme-2 .book-summary ul.summary li i.fa-check { + color: #33cc33; +} +.book.color-theme-2 .book-summary ul.summary li.done > a { + color: #62687f; +} +.book.color-theme-2 .book-summary ul.summary li a, +.book.color-theme-2 .book-summary ul.summary li span { + color: #c1c6d7; + background: transparent; + font-weight: 600; +} +.book.color-theme-2 .book-summary ul.summary li.active > a, +.book.color-theme-2 .book-summary ul.summary li a:hover { + color: #f4f4f5; + background: #252737; + font-weight: 600; +} diff --git a/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-highlight/ebook.css b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-highlight/ebook.css new file mode 100644 index 0000000..cecaaab --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-highlight/ebook.css @@ -0,0 +1,135 @@ +pre, +code { + /* http://jmblog.github.io/color-themes-for-highlightjs */ + /* Tomorrow Comment */ + /* Tomorrow Red */ + /* Tomorrow Orange */ + /* Tomorrow Yellow */ + /* Tomorrow Green */ + /* Tomorrow Aqua */ + /* Tomorrow Blue */ + /* Tomorrow Purple */ +} +pre .hljs-comment, +code .hljs-comment, +pre .hljs-title, +code .hljs-title { + color: #8e908c; +} +pre .hljs-variable, +code .hljs-variable, +pre .hljs-attribute, +code .hljs-attribute, +pre .hljs-tag, +code .hljs-tag, +pre .hljs-regexp, +code .hljs-regexp, +pre .hljs-deletion, +code .hljs-deletion, +pre .ruby .hljs-constant, +code .ruby .hljs-constant, +pre .xml .hljs-tag .hljs-title, +code .xml .hljs-tag .hljs-title, +pre .xml .hljs-pi, +code .xml .hljs-pi, +pre .xml .hljs-doctype, +code .xml .hljs-doctype, +pre .html .hljs-doctype, +code .html .hljs-doctype, +pre .css .hljs-id, +code .css .hljs-id, +pre .css .hljs-class, +code .css .hljs-class, +pre .css .hljs-pseudo, +code .css .hljs-pseudo { + color: #c82829; +} +pre .hljs-number, +code .hljs-number, +pre .hljs-preprocessor, +code .hljs-preprocessor, +pre .hljs-pragma, +code .hljs-pragma, +pre .hljs-built_in, +code .hljs-built_in, +pre .hljs-literal, +code .hljs-literal, +pre .hljs-params, +code .hljs-params, +pre .hljs-constant, +code .hljs-constant { + color: #f5871f; +} +pre .ruby .hljs-class .hljs-title, +code .ruby .hljs-class .hljs-title, +pre .css .hljs-rules .hljs-attribute, +code .css .hljs-rules .hljs-attribute { + color: #eab700; +} +pre .hljs-string, +code .hljs-string, +pre .hljs-value, +code .hljs-value, +pre .hljs-inheritance, +code .hljs-inheritance, +pre .hljs-header, +code .hljs-header, +pre .hljs-addition, +code .hljs-addition, +pre .ruby .hljs-symbol, +code .ruby .hljs-symbol, +pre .xml .hljs-cdata, +code .xml .hljs-cdata { + color: #718c00; +} +pre .css .hljs-hexcolor, +code .css .hljs-hexcolor { + color: #3e999f; +} +pre .hljs-function, +code .hljs-function, +pre .python .hljs-decorator, +code .python .hljs-decorator, +pre .python .hljs-title, +code .python .hljs-title, +pre .ruby .hljs-function .hljs-title, +code .ruby .hljs-function .hljs-title, +pre .ruby .hljs-title .hljs-keyword, +code .ruby .hljs-title .hljs-keyword, +pre .perl .hljs-sub, +code .perl .hljs-sub, +pre .javascript .hljs-title, +code .javascript .hljs-title, +pre .coffeescript .hljs-title, +code .coffeescript .hljs-title { + color: #4271ae; +} +pre .hljs-keyword, +code .hljs-keyword, +pre .javascript .hljs-function, +code .javascript .hljs-function { + color: #8959a8; +} +pre .hljs, +code .hljs { + display: block; + background: white; + color: #4d4d4c; + padding: 0.5em; +} +pre .coffeescript .javascript, +code .coffeescript .javascript, +pre .javascript .xml, +code .javascript .xml, +pre .tex .hljs-formula, +code .tex .hljs-formula, +pre .xml .javascript, +code .xml .javascript, +pre .xml .vbscript, +code .xml .vbscript, +pre .xml .css, +code .xml .css, +pre .xml .hljs-cdata, +code .xml .hljs-cdata { + opacity: 0.5; +} diff --git a/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-highlight/website.css b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-highlight/website.css new file mode 100644 index 0000000..6674448 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-highlight/website.css @@ -0,0 +1,434 @@ +.book .book-body .page-wrapper .page-inner section.normal pre, +.book .book-body .page-wrapper .page-inner section.normal code { + /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + /* Tomorrow Comment */ + /* Tomorrow Red */ + /* Tomorrow Orange */ + /* Tomorrow Yellow */ + /* Tomorrow Green */ + /* Tomorrow Aqua */ + /* Tomorrow Blue */ + /* Tomorrow Purple */ +} +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-comment, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-comment, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-title { + color: #8e908c; +} +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-variable, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-variable, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-attribute, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-tag, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-tag, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-regexp, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-deletion, +.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant, +.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi, +.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype, +.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype, +.book .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype, +.book .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype, +.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id, +.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-id, +.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class, +.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-class, +.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo, +.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo { + color: #c82829; +} +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-number, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-number, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-pragma, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-built_in, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-literal, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-literal, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-params, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-params, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-constant, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-constant { + color: #f5871f; +} +.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute, +.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute { + color: #eab700; +} +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-string, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-string, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-value, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-value, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-header, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-header, +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-addition, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-addition, +.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol, +.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata, +.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata { + color: #718c00; +} +.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor, +.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor { + color: #3e999f; +} +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-function, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-function, +.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator, +.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator, +.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword, +.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword, +.book .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub, +.book .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub, +.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title, +.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title { + color: #4271ae; +} +.book .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword, +.book .book-body .page-wrapper .page-inner section.normal code .hljs-keyword, +.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function, +.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function { + color: #8959a8; +} +.book .book-body .page-wrapper .page-inner section.normal pre .hljs, +.book .book-body .page-wrapper .page-inner section.normal code .hljs { + display: block; + background: white; + color: #4d4d4c; + padding: 0.5em; +} +.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript, +.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript, +.book .book-body .page-wrapper .page-inner section.normal pre .javascript .xml, +.book .book-body .page-wrapper .page-inner section.normal code .javascript .xml, +.book .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula, +.book .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .javascript, +.book .book-body .page-wrapper .page-inner section.normal code .xml .javascript, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript, +.book .book-body .page-wrapper .page-inner section.normal code .xml .vbscript, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .css, +.book .book-body .page-wrapper .page-inner section.normal code .xml .css, +.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata, +.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata { + opacity: 0.5; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code { + /* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + /* Solarized Green */ + /* Solarized Cyan */ + /* Solarized Blue */ + /* Solarized Yellow */ + /* Solarized Orange */ + /* Solarized Red */ + /* Solarized Violet */ +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs { + display: block; + padding: 0.5em; + background: #fdf6e3; + color: #657b83; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-comment, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-template_comment, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-template_comment, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-header, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-header, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-doctype, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-doctype, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pi, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pi, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-string, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-string, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-javadoc, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-javadoc { + color: #93a1a1; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-winutils, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-winutils, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .method, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .method, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-addition, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-tag, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-tag, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-request, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-request, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-status, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-status, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .nginx .hljs-title, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .nginx .hljs-title { + color: #859900; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-number, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-number, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-command, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-command, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-string, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-string, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag .hljs-value, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-tag .hljs-value, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-rules .hljs-value, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-rules .hljs-value, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-phpdoc, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-phpdoc, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-hexcolor, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-hexcolor, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_url, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_url { + color: #2aa198; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-title, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-title, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-localvars, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-localvars, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-chunk, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-chunk, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-decorator, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-decorator, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-identifier, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-identifier, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .vhdl .hljs-literal, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .vhdl .hljs-literal, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-id, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-id, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-function, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-function { + color: #268bd2; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-variable, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-body, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-body, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .smalltalk .hljs-number, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .smalltalk .hljs-number, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-constant, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-class .hljs-title, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-class .hljs-title, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-parent, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-parent, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .haskell .hljs-type, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .haskell .hljs-type, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_reference, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_reference { + color: #b58900; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor .hljs-keyword, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor .hljs-keyword, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-shebang, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-shebang, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol .hljs-string, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol .hljs-string, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-change, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-change, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-special, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-special, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attr_selector, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attr_selector, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-subst, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-subst, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-cdata, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-cdata, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .clojure .hljs-title, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .clojure .hljs-title, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-header, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-header { + color: #cb4b16; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-important, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-important { + color: #dc322f; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_label, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_label { + color: #6c71c4; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula { + background: #eee8d5; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code { + /* Tomorrow Night Bright Theme */ + /* Original theme - https://github.com/chriskempson/tomorrow-theme */ + /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + /* Tomorrow Comment */ + /* Tomorrow Red */ + /* Tomorrow Orange */ + /* Tomorrow Yellow */ + /* Tomorrow Green */ + /* Tomorrow Aqua */ + /* Tomorrow Blue */ + /* Tomorrow Purple */ +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-comment, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-title { + color: #969896; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-variable, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-tag, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-id, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-class, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo { + color: #d54e53; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-number, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-number, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-literal, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-literal, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-params, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-params, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-constant { + color: #e78c45; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute { + color: #e7c547; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-string, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-string, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-value, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-value, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-header, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-header, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-addition, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata { + color: #b9ca4a; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor { + color: #70c0b1; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-function, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-function, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title { + color: #7aa6da; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function { + color: #c397d8; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs { + display: block; + background: black; + color: #eaeaea; + padding: 0.5em; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .xml, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .xml, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .javascript, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .javascript, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .vbscript, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .css, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .css, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata { + opacity: 0.5; +} diff --git a/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-lunr/lunr.min.js b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-lunr/lunr.min.js new file mode 100644 index 0000000..6aa6bc7 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-lunr/lunr.min.js @@ -0,0 +1,7 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.12 + * Copyright (C) 2015 Oliver Nightingale + * MIT Licensed + * @license + */ +!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.5.12",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(t){return arguments.length&&null!=t&&void 0!=t?Array.isArray(t)?t.map(function(t){return t.toLowerCase()}):t.toString().trim().toLowerCase().split(/[\s\-]+/):[]},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;no;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n element for each result + res.results.forEach(function(res) { + var $li = $('
            • ', { + 'class': 'search-results-item' + }); + + var $title = $('

              '); + + var $link = $('', { + 'href': gitbook.state.basePath + '/' + res.url, + 'text': res.title + }); + + var content = res.body.trim(); + if (content.length > MAX_DESCRIPTION_SIZE) { + content = content.slice(0, MAX_DESCRIPTION_SIZE).trim()+'...'; + } + var $content = $('

              ').html(content); + + $link.appendTo($title); + $title.appendTo($li); + $content.appendTo($li); + $li.appendTo($searchList); + }); + } + + function launchSearch(q) { + // Add class for loading + $body.addClass('with-search'); + $body.addClass('search-loading'); + + // Launch search query + throttle(gitbook.search.query(q, 0, MAX_RESULTS) + .then(function(results) { + displayResults(results); + }) + .always(function() { + $body.removeClass('search-loading'); + }), 1000); + } + + function closeSearch() { + $body.removeClass('with-search'); + $bookSearchResults.removeClass('open'); + } + + function launchSearchFromQueryString() { + var q = getParameterByName('q'); + if (q && q.length > 0) { + // Update search input + $searchInput.val(q); + + // Launch search + launchSearch(q); + } + } + + function bindSearch() { + // Bind DOM + $searchInput = $('#book-search-input input'); + $bookSearchResults = $('#book-search-results'); + $searchList = $bookSearchResults.find('.search-results-list'); + $searchTitle = $bookSearchResults.find('.search-results-title'); + $searchResultsCount = $searchTitle.find('.search-results-count'); + $searchQuery = $searchTitle.find('.search-query'); + + // Launch query based on input content + function handleUpdate() { + var q = $searchInput.val(); + + if (q.length == 0) { + closeSearch(); + } + else { + launchSearch(q); + } + } + + // Detect true content change in search input + // Workaround for IE < 9 + var propertyChangeUnbound = false; + $searchInput.on('propertychange', function(e) { + if (e.originalEvent.propertyName == 'value') { + handleUpdate(); + } + }); + + // HTML5 (IE9 & others) + $searchInput.on('input', function(e) { + // Unbind propertychange event for IE9+ + if (!propertyChangeUnbound) { + $(this).unbind('propertychange'); + propertyChangeUnbound = true; + } + + handleUpdate(); + }); + + // Push to history on blur + $searchInput.on('blur', function(e) { + // Update history state + if (usePushState) { + var uri = updateQueryString('q', $(this).val()); + history.pushState({ path: uri }, null, uri); + } + }); + } + + gitbook.events.on('page.change', function() { + bindSearch(); + closeSearch(); + + // Launch search based on query parameter + if (gitbook.search.isInitialized()) { + launchSearchFromQueryString(); + } + }); + + gitbook.events.on('search.ready', function() { + bindSearch(); + + // Launch search from query param at start + launchSearchFromQueryString(); + }); + + function getParameterByName(name) { + var url = window.location.href; + name = name.replace(/[\[\]]/g, '\\$&'); + var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'), + results = regex.exec(url); + if (!results) return null; + if (!results[2]) return ''; + return decodeURIComponent(results[2].replace(/\+/g, ' ')); + } + + function updateQueryString(key, value) { + value = encodeURIComponent(value); + + var url = window.location.href; + var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'), + hash; + + if (re.test(url)) { + if (typeof value !== 'undefined' && value !== null) + return url.replace(re, '$1' + key + '=' + value + '$2$3'); + else { + hash = url.split('#'); + url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, ''); + if (typeof hash[1] !== 'undefined' && hash[1] !== null) + url += '#' + hash[1]; + return url; + } + } + else { + if (typeof value !== 'undefined' && value !== null) { + var separator = url.indexOf('?') !== -1 ? '&' : '?'; + hash = url.split('#'); + url = hash[0] + separator + key + '=' + value; + if (typeof hash[1] !== 'undefined' && hash[1] !== null) + url += '#' + hash[1]; + return url; + } + else + return url; + } + } +}); diff --git a/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-sharing/buttons.js b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-sharing/buttons.js new file mode 100644 index 0000000..709a4e4 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/gitbook-plugin-sharing/buttons.js @@ -0,0 +1,90 @@ +require(['gitbook', 'jquery'], function(gitbook, $) { + var SITES = { + 'facebook': { + 'label': 'Facebook', + 'icon': 'fa fa-facebook', + 'onClick': function(e) { + e.preventDefault(); + window.open('http://www.facebook.com/sharer/sharer.php?s=100&p[url]='+encodeURIComponent(location.href)); + } + }, + 'twitter': { + 'label': 'Twitter', + 'icon': 'fa fa-twitter', + 'onClick': function(e) { + e.preventDefault(); + window.open('http://twitter.com/home?status='+encodeURIComponent(document.title+' '+location.href)); + } + }, + 'google': { + 'label': 'Google+', + 'icon': 'fa fa-google-plus', + 'onClick': function(e) { + e.preventDefault(); + window.open('https://plus.google.com/share?url='+encodeURIComponent(location.href)); + } + }, + 'weibo': { + 'label': 'Weibo', + 'icon': 'fa fa-weibo', + 'onClick': function(e) { + e.preventDefault(); + window.open('http://service.weibo.com/share/share.php?content=utf-8&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)); + } + }, + 'instapaper': { + 'label': 'Instapaper', + 'icon': 'fa fa-instapaper', + 'onClick': function(e) { + e.preventDefault(); + window.open('http://www.instapaper.com/text?u='+encodeURIComponent(location.href)); + } + }, + 'vk': { + 'label': 'VK', + 'icon': 'fa fa-vk', + 'onClick': function(e) { + e.preventDefault(); + window.open('http://vkontakte.ru/share.php?url='+encodeURIComponent(location.href)); + } + } + }; + + + + gitbook.events.bind('start', function(e, config) { + var opts = config.sharing; + + // Create dropdown menu + var menu = $.map(opts.all, function(id) { + var site = SITES[id]; + + return { + text: site.label, + onClick: site.onClick + }; + }); + + // Create main button with dropdown + if (menu.length > 0) { + gitbook.toolbar.createButton({ + icon: 'fa fa-share-alt', + label: 'Share', + position: 'right', + dropdown: [menu] + }); + } + + // Direct actions to share + $.each(SITES, function(sideId, site) { + if (!opts[sideId]) return; + + gitbook.toolbar.createButton({ + icon: site.icon, + label: site.text, + position: 'right', + onClick: site.onClick + }); + }); + }); +}); diff --git a/socket/node_modules/pillarjs/_book/gitbook/gitbook.js b/socket/node_modules/pillarjs/_book/gitbook/gitbook.js new file mode 100644 index 0000000..13077b4 --- /dev/null +++ b/socket/node_modules/pillarjs/_book/gitbook/gitbook.js @@ -0,0 +1,4 @@ +!function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s0&&t-1 in e)}function o(e,t,n){return de.isFunction(t)?de.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?de.grep(e,function(e){return e===t!==n}):"string"!=typeof t?de.grep(e,function(e){return se.call(t,e)>-1!==n}):je.test(t)?de.filter(t,e,n):(t=de.filter(t,e),de.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return de.each(e.match(qe)||[],function(e,n){t[n]=!0}),t}function a(e){return e}function u(e){throw e}function c(e,t,n){var r;try{e&&de.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&de.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function l(){te.removeEventListener("DOMContentLoaded",l),e.removeEventListener("load",l),de.ready()}function f(){this.expando=de.expando+f.uid++}function p(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ie.test(e)?JSON.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Pe,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=p(n)}catch(e){}Re.set(e,t,n)}else n=void 0;return n}function d(e,t,n,r){var o,i=1,s=20,a=r?function(){return r.cur()}:function(){return de.css(e,t,"")},u=a(),c=n&&n[3]||(de.cssNumber[t]?"":"px"),l=(de.cssNumber[t]||"px"!==c&&+u)&&$e.exec(de.css(e,t));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do i=i||".5",l/=i,de.style(e,t,l+c);while(i!==(i=a()/u)&&1!==i&&--s)}return n&&(l=+l||+u||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=o)),o}function g(e){var t,n=e.ownerDocument,r=e.nodeName,o=Ue[r];return o?o:(t=n.body.appendChild(n.createElement(r)),o=de.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),Ue[r]=o,o)}function m(e,t){for(var n,r,o=[],i=0,s=e.length;i-1)o&&o.push(i);else if(c=de.contains(i.ownerDocument,i),s=v(f.appendChild(i),"script"),c&&y(s),n)for(l=0;i=s[l++];)Ve.test(i.type||"")&&n.push(i);return f}function b(){return!0}function w(){return!1}function T(){try{return te.activeElement}catch(e){}}function C(e,t,n,r,o,i){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)C(e,a,n,r,t[a],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),o===!1)o=w;else if(!o)return e;return 1===i&&(s=o,o=function(e){return de().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=de.guid++)),e.each(function(){de.event.add(this,t,o,r,n)})}function j(e,t){return de.nodeName(e,"table")&&de.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function E(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function S(e,t){var n,r,o,i,s,a,u,c;if(1===t.nodeType){if(Fe.hasData(e)&&(i=Fe.access(e),s=Fe.set(t,i),c=i.events)){delete s.handle,s.events={};for(o in c)for(n=0,r=c[o].length;n1&&"string"==typeof d&&!pe.checkClone&&nt.test(d))return e.each(function(n){var i=e.eq(n);g&&(t[0]=d.call(this,n,i.html())),A(i,t,r,o)});if(p&&(i=x(t,e[0].ownerDocument,!1,e,o),s=i.firstChild,1===i.childNodes.length&&(i=s),s||o)){for(a=de.map(v(i,"script"),k),u=a.length;f=0&&nC.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[$]=!0,e}function o(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=n.length;r--;)C.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&je(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function h(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var o=0,i=n.length;o-1&&(r[c]=!(s[c]=f))}}else x=v(x===s?x.splice(d,x.length):x),i?i(null,s,x,u):K.apply(s,x)})}function x(e){for(var t,n,r,o=e.length,i=C.relative[e[0].type],s=i||C.relative[" "],a=i?1:0,u=d(function(e){return e===t},s,!0),c=d(function(e){return ee(t,e)>-1},s,!0),l=[function(e,n,r){var o=!i&&(r||n!==A)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,o}];a1&&g(l),a>1&&h(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,i=e.length>0,s=function(r,s,a,u,c){var l,f,p,h=0,d="0",g=r&&[],m=[],y=A,x=r||i&&C.find.TAG("*",c),b=B+=null==y?1:Math.random()||.1,w=x.length;for(c&&(A=s===L||s||c);d!==w&&null!=(l=x[d]);d++){if(i&&l){for(f=0,s||l.ownerDocument===L||(O(l),a=!F);p=e[f++];)if(p(l,s||L,a)){u.push(l);break}c&&(B=b)}o&&((l=!p&&l)&&h--,r&&g.push(l))}if(h+=d,o&&d!==h){for(f=0;p=n[f++];)p(g,m,s,a);if(r){if(h>0)for(;d--;)g[d]||m[d]||(m[d]=Q.call(u));m=v(m)}K.apply(u,m),c&&!r&&m.length>0&&h+n.length>1&&t.uniqueSort(u)}return c&&(B=b,A=y),g};return o?r(s):s}var w,T,C,j,k,E,S,N,A,q,D,O,L,H,F,R,I,P,M,$="sizzle"+1*new Date,W=e.document,B=0,_=0,U=n(),z=n(),X=n(),V=function(e,t){return e===t&&(D=!0),0},G={}.hasOwnProperty,Y=[],Q=Y.pop,J=Y.push,K=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(ie),pe=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){O()},je=d(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{K.apply(Y=Z.call(W.childNodes),W.childNodes),Y[W.childNodes.length].nodeType}catch(e){K={apply:Y.length?function(e,t){J.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}T=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=L.documentElement,F=!k(L),W!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),T.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=o(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=me.test(L.getElementsByClassName),T.getById=o(function(e){return H.appendChild(e).id=$,!L.getElementsByName||!L.getElementsByName($).length}),T.getById?(C.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&F){var n=t.getElementById(e);return n?[n]:[]}}):(C.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&F){var n,r,o,i=t.getElementById(e);if(i){if(n=i.getAttributeNode("id"),n&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if(n=i.getAttributeNode("id"),n&&n.value===e)return[i]}return[]}}),C.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},C.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&F)return t.getElementsByClassName(e)},I=[],R=[],(T.qsa=me.test(L.querySelectorAll))&&(o(function(e){H.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+$+"-]").length||R.push("~="),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||R.push(".#.+[+~]")}),o(function(e){e.innerHTML="";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&R.push(":enabled",":disabled"),H.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(T.matchesSelector=me.test(P=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){T.disconnectedMatch=P.call(e,"*"),P.call(e,"[s!='']:x"),I.push("!=",ie)}),R=R.length&&new RegExp(R.join("|")),I=I.length&&new RegExp(I.join("|")),t=me.test(H.compareDocumentPosition),M=t||me.test(H.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===W&&M(W,e)?-1:t===L||t.ownerDocument===W&&M(W,t)?1:q?ee(q,e)-ee(q,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===L?-1:t===L?1:o?-1:i?1:q?ee(q,e)-ee(q,t):0;if(o===i)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===W?-1:u[r]===W?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&O(e),n=n.replace(le,"='$1']"),T.matchesSelector&&F&&!X[n+" "]&&(!I||!I.test(n))&&(!R||!R.test(n)))try{var r=P.call(e,n);if(r||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&O(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&O(e);var n=C.attrHandle[t.toLowerCase()],r=n&&G.call(C.attrHandle,t.toLowerCase())?n(e,t,!F):void 0;return void 0!==r?r:T.attributes||!F?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(D=!T.detectDuplicates,q=!T.sortStable&&e.slice(0),e.sort(V),D){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return q=null,e},j=t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=j(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=j(t);return n},C=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:!n||(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,p,h,d,g=i!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(m){if(i){for(;g;){for(p=t;p=p[g];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&y){for(p=m,f=p[$]||(p[$]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[e]||[],h=c[0]===B&&c[1],x=h&&c[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(x=h=0)||d.pop();)if(1===p.nodeType&&++x&&p===t){l[e]=[B,h,x];break}}else if(y&&(p=t,f=p[$]||(p[$]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[e]||[],h=c[0]===B&&c[1],x=h),x===!1)for(;(p=++h&&p&&p[g]||(x=h=0)||d.pop())&&((a?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++x||(y&&(f=p[$]||(p[$]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),l[e]=[B,x]),p!==t)););return x-=o,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var o,i=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[$]?i(n):i.length>1?(o=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),s=o.length;s--;)r=ee(e,o[s]),e[r]=!(t[r]=o[s])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=S(e.replace(ae,"$1"));return o[$]?r(function(e,t,n,r){for(var i,s=o(e,null,r,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){ +return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textContent||t.innerText||j(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do if(n=F?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=i[0]).type&&9===t.nodeType&&F&&C.relative[i[1].type]){if(t=(C.find.ID(s.matches[0].replace(xe,be),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=he.needsContext.test(e)?0:i.length;o--&&(s=i[o],!C.relative[a=s.type]);)if((u=C.find[a])&&(r=u(s.matches[0].replace(xe,be),ye.test(i[0].type)&&f(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&h(i),!e)return K.apply(n,r),n;break}}return(c||S(e,l))(r,t,!F,n,!t||ye.test(e)&&f(t.parentNode)||t),n},T.sortStable=$.split("").sort(V).join("")===$,T.detectDuplicates=!!D,O(),T.sortDetached=o(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),o(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&o(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);de.find=xe,de.expr=xe.selectors,de.expr[":"]=de.expr.pseudos,de.uniqueSort=de.unique=xe.uniqueSort,de.text=xe.getText,de.isXMLDoc=xe.isXML,de.contains=xe.contains,de.escapeSelector=xe.escape;var be=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&de(e).is(n))break;r.push(e)}return r},we=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Te=de.expr.match.needsContext,Ce=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,je=/^.[^:#\[\.,]*$/;de.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?de.find.matchesSelector(r,e)?[r]:[]:de.find.matches(e,de.grep(t,function(e){return 1===e.nodeType}))},de.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(de(e).filter(function(){for(t=0;t1?de.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Te.test(e)?de(e):e||[],!1).length}});var ke,Ee=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Se=de.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ee.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof de?t[0]:t,de.merge(this,de.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:te,!0)),Ce.test(r[1])&&de.isPlainObject(t))for(r in t)de.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return o=te.getElementById(r[2]),o&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):de.isFunction(e)?void 0!==n.ready?n.ready(e):e(de):de.makeArray(e,this)};Se.prototype=de.fn,ke=de(te);var Ne=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};de.fn.extend({has:function(e){var t=de(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&de.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?de.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?se.call(de(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(de.uniqueSort(de.merge(this.get(),de(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),de.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return be(e,"parentNode")},parentsUntil:function(e,t,n){return be(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return be(e,"nextSibling")},prevAll:function(e){return be(e,"previousSibling")},nextUntil:function(e,t,n){return be(e,"nextSibling",n)},prevUntil:function(e,t,n){return be(e,"previousSibling",n)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return e.contentDocument||de.merge([],e.childNodes)}},function(e,t){de.fn[e]=function(n,r){var o=de.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=de.filter(r,o)),this.length>1&&(Ae[e]||de.uniqueSort(o),Ne.test(e)&&o.reverse()),this.pushStack(o)}});var qe=/[^\x20\t\r\n\f]+/g;de.Callbacks=function(e){e="string"==typeof e?s(e):de.extend({},e);var t,n,r,o,i=[],a=[],u=-1,c=function(){for(o=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u-1;)i.splice(n,1),n<=u&&u--}),this},has:function(e){return e?de.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},de.extend({Deferred:function(t){var n=[["notify","progress",de.Callbacks("memory"),de.Callbacks("memory"),2],["resolve","done",de.Callbacks("once memory"),de.Callbacks("once memory"),0,"resolved"],["reject","fail",de.Callbacks("once memory"),de.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return de.Deferred(function(t){de.each(n,function(n,r){var o=de.isFunction(e[r[4]])&&e[r[4]];i[r[1]](function(){var e=o&&o.apply(this,arguments);e&&de.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(t,r,o){function i(t,n,r,o){return function(){var c=this,l=arguments,f=function(){var e,f;if(!(t=s&&(r!==u&&(c=void 0,l=[e]),n.rejectWith(c,l))}};t?p():(de.Deferred.getStackHook&&(p.stackTrace=de.Deferred.getStackHook()),e.setTimeout(p))}}var s=0;return de.Deferred(function(e){n[0][3].add(i(0,e,de.isFunction(o)?o:a,e.notifyWith)),n[1][3].add(i(0,e,de.isFunction(t)?t:a)),n[2][3].add(i(0,e,de.isFunction(r)?r:u))}).promise()},promise:function(e){return null!=e?de.extend(e,o):o}},i={};return de.each(n,function(e,t){var s=t[2],a=t[5];o[t[1]]=s.add,a&&s.add(function(){r=a},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),i[t[0]]=function(){return i[t[0]+"With"](this===i?void 0:this,arguments),this},i[t[0]+"With"]=s.fireWith}),o.promise(i),t&&t.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=re.call(arguments),i=de.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?re.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(c(e,i.done(s(n)).resolve,i.reject),"pending"===i.state()||de.isFunction(o[n]&&o[n].then)))return i.then();for(;n--;)c(o[n],s(n),i.reject);return i.promise()}});var De=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;de.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&De.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},de.readyException=function(t){e.setTimeout(function(){throw t})};var Oe=de.Deferred();de.fn.ready=function(e){return Oe.then(e).catch(function(e){de.readyException(e)}),this},de.extend({isReady:!1,readyWait:1,holdReady:function(e){e?de.readyWait++:de.ready(!0)},ready:function(e){(e===!0?--de.readyWait:de.isReady)||(de.isReady=!0,e!==!0&&--de.readyWait>0||Oe.resolveWith(te,[de]))}}),de.ready.then=Oe.then,"complete"===te.readyState||"loading"!==te.readyState&&!te.documentElement.doScroll?e.setTimeout(de.ready):(te.addEventListener("DOMContentLoaded",l),e.addEventListener("load",l));var Le=function(e,t,n,r,o,i,s){var a=0,u=e.length,c=null==n;if("object"===de.type(n)){o=!0;for(a in n)Le(e,t,a,n[a],!0,i,s)}else if(void 0!==r&&(o=!0,de.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(de(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){Re.remove(this,e)})}}),de.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Fe.get(e,t),n&&(!r||de.isArray(n)?r=Fe.access(e,t,de.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=de.queue(e,t),r=n.length,o=n.shift(),i=de._queueHooks(e,t),s=function(){de.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,s,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:de.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),de.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ve=/^$|\/(?:java|ecma)script/i,Ge={option:[1,""],thead:[1,"","
              "],col:[2,"","
              "],tr:[2,"","
              "],td:[3,"","
              "],_default:[0,"",""]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td;var Ye=/<|&#?\w+;/;!function(){var e=te.createDocumentFragment(),t=e.appendChild(te.createElement("div")),n=te.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Qe=te.documentElement,Je=/^key/,Ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ze=/^([^.]*)(?:\.(.+)|)/;de.event={global:{},add:function(e,t,n,r,o){var i,s,a,u,c,l,f,p,h,d,g,m=Fe.get(e);if(m)for(n.handler&&(i=n,n=i.handler,o=i.selector),o&&de.find.matchesSelector(Qe,o),n.guid||(n.guid=de.guid++),(u=m.events)||(u=m.events={}),(s=m.handle)||(s=m.handle=function(t){return"undefined"!=typeof de&&de.event.triggered!==t.type?de.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(qe)||[""],c=t.length;c--;)a=Ze.exec(t[c])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h&&(f=de.event.special[h]||{},h=(o?f.delegateType:f.bindType)||h,f=de.event.special[h]||{},l=de.extend({type:h,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&de.expr.match.needsContext.test(o),namespace:d.join(".")},i),(p=u[h])||(p=u[h]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,d,s)!==!1||e.addEventListener&&e.addEventListener(h,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,l):p.push(l),de.event.global[h]=!0)},remove:function(e,t,n,r,o){var i,s,a,u,c,l,f,p,h,d,g,m=Fe.hasData(e)&&Fe.get(e);if(m&&(u=m.events)){for(t=(t||"").match(qe)||[""],c=t.length;c--;)if(a=Ze.exec(t[c])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){for(f=de.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,p=u[h]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=p.length;i--;)l=p[i],!o&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(i,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(e,l));s&&!p.length&&(f.teardown&&f.teardown.call(e,d,m.handle)!==!1||de.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)de.event.remove(e,h+t[c],n,r,!0);de.isEmptyObject(u)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,s,a=de.event.fix(e),u=new Array(arguments.length),c=(Fe.get(this,"events")||{})[a.type]||[],l=de.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(i=[],s={},n=0;n-1:de.find(o,this,null,[c]).length),s[o]&&i.push(r);i.length&&a.push({elem:c,handlers:i})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,tt=/\s*$/g;de.extend({htmlPrefilter:function(e){return e.replace(et,"<$1>")},clone:function(e,t,n){var r,o,i,s,a=e.cloneNode(!0),u=de.contains(e.ownerDocument,e);if(!(pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||de.isXMLDoc(e)))for(s=v(a),i=v(e),r=0,o=i.length;r0&&y(s,!u&&v(e,"script")),a},cleanData:function(e){for(var t,n,r,o=de.event.special,i=0;void 0!==(n=e[i]);i++)if(He(n)){if(t=n[Fe.expando]){if(t.events)for(r in t.events)o[r]?de.event.remove(n,r):de.removeEvent(n,r,t.handle);n[Fe.expando]=void 0}n[Re.expando]&&(n[Re.expando]=void 0)}}}),de.fn.extend({detach:function(e){return q(this,e,!0)},remove:function(e){return q(this,e)},text:function(e){return Le(this,function(e){return void 0===e?de.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=j(this,e);t.appendChild(e)}})},prepend:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=j(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(de.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return de.clone(this,e,t)})},html:function(e){return Le(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Ge[(Xe.exec(e)||["",""])[1].toLowerCase()]){e=de.htmlPrefilter(e);try{for(;n1)}}),de.Tween=I,I.prototype={constructor:I,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||de.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(de.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.options.duration?this.pos=t=de.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=de.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){de.fx.step[e.prop]?de.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[de.cssProps[e.prop]]&&!de.cssHooks[e.prop]?e.elem[e.prop]=e.now:de.style(e.elem,e.prop,e.now+e.unit)}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},de.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},de.fx=I.prototype.init,de.fx.step={};var ht,dt,gt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;de.Animation=de.extend(U,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,$e.exec(t),n),n}]},tweener:function(e,t){de.isFunction(e)?(t=e,e=["*"]):e=e.match(qe);for(var n,r=0,o=e.length;r1)},removeAttr:function(e){return this.each(function(){de.removeAttr(this,e)})}}),de.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof e.getAttribute?de.prop(e,t,n):(1===i&&de.isXMLDoc(e)||(o=de.attrHooks[t.toLowerCase()]||(de.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void de.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:(r=de.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&de.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(qe);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return t===!1?de.removeAttr(e,n):e.setAttribute(n,n),n}},de.each(de.expr.match.bool.source.match(/\w+/g),function(e,t){var n=yt[t]||de.find.attr;yt[t]=function(e,t,r){var o,i,s=t.toLowerCase();return r||(i=yt[s],yt[s]=o,o=null!=n(e,t,r)?s:null,yt[s]=i),o}});var xt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;de.fn.extend({prop:function(e,t){return Le(this,de.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[de.propFix[e]||e]})}}),de.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&de.isXMLDoc(e)||(t=de.propFix[t]||t,o=de.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=de.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),pe.optSelected||(de.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),de.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){de.propFix[this.toLowerCase()]=this}),de.fn.extend({addClass:function(e){var t,n,r,o,i,s,a,u=0;if(de.isFunction(e))return this.each(function(t){de(this).addClass(e.call(this,t,X(this)))});if("string"==typeof e&&e)for(t=e.match(qe)||[];n=this[u++];)if(o=X(n),r=1===n.nodeType&&" "+z(o)+" "){for(s=0;i=t[s++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=z(r),o!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,o,i,s,a,u=0;if(de.isFunction(e))return this.each(function(t){de(this).removeClass(e.call(this,t,X(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(qe)||[];n=this[u++];)if(o=X(n),r=1===n.nodeType&&" "+z(o)+" "){for(s=0;i=t[s++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");a=z(r),o!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):de.isFunction(e)?this.each(function(n){de(this).toggleClass(e.call(this,n,X(this),t),t)}):this.each(function(){var t,r,o,i;if("string"===n)for(r=0,o=de(this),i=e.match(qe)||[];t=i[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=X(this),t&&Fe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Fe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(X(n))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;de.fn.extend({val:function(e){var t,n,r,o=this[0];{if(arguments.length)return r=de.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,de(this).val()):e,null==o?o="":"number"==typeof o?o+="":de.isArray(o)&&(o=de.map(o,function(e){return null==e?"":e+""})),t=de.valHooks[this.type]||de.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=de.valHooks[o.type]||de.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(wt,""):null==n?"":n)}}}),de.extend({valHooks:{option:{get:function(e){var t=de.find.attr(e,"value");return null!=t?t:z(de.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?i+1:o.length;for(r=i<0?u:s?i:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),de.each(["radio","checkbox"],function(){de.valHooks[this]={set:function(e,t){if(de.isArray(t))return e.checked=de.inArray(de(e).val(),t)>-1}},pe.checkOn||(de.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;de.extend(de.event,{trigger:function(t,n,r,o){var i,s,a,u,c,l,f,p=[r||te],h=ce.call(t,"type")?t.type:t,d=ce.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||te,3!==r.nodeType&&8!==r.nodeType&&!Tt.test(h+de.event.triggered)&&(h.indexOf(".")>-1&&(d=h.split("."),h=d.shift(),d.sort()),c=h.indexOf(":")<0&&"on"+h,t=t[de.expando]?t:new de.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:de.makeArray(n,[t]),f=de.event.special[h]||{},o||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!o&&!f.noBubble&&!de.isWindow(r)){for(u=f.delegateType||h,Tt.test(u+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||te)&&p.push(a.defaultView||a.parentWindow||e)}for(i=0;(s=p[i++])&&!t.isPropagationStopped();)t.type=i>1?u:f.bindType||h,l=(Fe.get(s,"events")||{})[t.type]&&Fe.get(s,"handle"),l&&l.apply(s,n),l=c&&s[c],l&&l.apply&&He(s)&&(t.result=l.apply(s,n),t.result===!1&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),n)!==!1||!He(r)||c&&de.isFunction(r[h])&&!de.isWindow(r)&&(a=r[c],a&&(r[c]=null),de.event.triggered=h,r[h](),de.event.triggered=void 0,a&&(r[c]=a)),t.result}},simulate:function(e,t,n){var r=de.extend(new de.Event,n,{type:e,isSimulated:!0});de.event.trigger(r,null,t)}}),de.fn.extend({trigger:function(e,t){return this.each(function(){de.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return de.event.trigger(e,t,n,!0)}}),de.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){de.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),de.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin="onfocusin"in e,pe.focusin||de.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){de.event.simulate(t,e.target,de.event.fix(e))};de.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=Fe.access(r,t);o||r.addEventListener(e,n,!0),Fe.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Fe.access(r,t)-1;o?Fe.access(r,t,o):(r.removeEventListener(e,n,!0),Fe.remove(r,t))}}});var Ct=e.location,jt=de.now(),kt=/\?/;de.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||de.error("Invalid XML: "+t),n};var Et=/\[\]$/,St=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;de.param=function(e,t){var n,r=[],o=function(e,t){var n=de.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(de.isArray(e)||e.jquery&&!de.isPlainObject(e))de.each(e,function(){o(this.name,this.value)});else for(n in e)V(n,e[n],t,o);return r.join("&")},de.fn.extend({serialize:function(){return de.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=de.prop(this,"elements");return e?de.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!de(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!ze.test(e))}).map(function(e,t){var n=de(this).val();return null==n?null:de.isArray(n)?de.map(n,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:n.replace(St,"\r\n")}}).get()}});var qt=/%20/g,Dt=/#.*$/,Ot=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ft=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Pt={},Mt="*/".concat("*"),$t=te.createElement("a");$t.href=Ct.href,de.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Ht.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":de.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Q(Q(e,de.ajaxSettings),t):Q(de.ajaxSettings,e)},ajaxPrefilter:G(It),ajaxTransport:G(Pt),ajax:function(t,n){function r(t,n,r,a){var c,p,h,b,w,T=n;l||(l=!0,u&&e.clearTimeout(u),o=void 0,s=a||"",C.readyState=t>0?4:0,c=t>=200&&t<300||304===t,r&&(b=J(d,C,r)),b=K(d,b,C,c),c?(d.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(de.lastModified[i]=w),w=C.getResponseHeader("etag"),w&&(de.etag[i]=w)),204===t||"HEAD"===d.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,h=b.error,c=!h)):(h=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(n||T)+"",c?v.resolveWith(g,[p,T,C]):v.rejectWith(g,[C,T,h]),C.statusCode(x),x=void 0,f&&m.trigger(c?"ajaxSuccess":"ajaxError",[C,d,c?p:h]),y.fireWith(g,[C,T]),f&&(m.trigger("ajaxComplete",[C,d]),--de.active||de.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,i,s,a,u,c,l,f,p,h,d=de.ajaxSetup({},n),g=d.context||d,m=d.context&&(g.nodeType||g.jquery)?de(g):de.event,v=de.Deferred(),y=de.Callbacks("once memory"),x=d.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Lt.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?s:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)C.always(e[C.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return o&&o.abort(t),r(0,t),this}};if(v.promise(C),d.url=((t||d.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(qe)||[""],null==d.crossDomain){c=te.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=$t.protocol+"//"+$t.host!=c.protocol+"//"+c.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=de.param(d.data,d.traditional)),Y(It,d,n,C),l)return C;f=de.event&&d.global,f&&0===de.active++&&de.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ft.test(d.type),i=d.url.replace(Dt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(qt,"+")):(h=d.url.slice(i.length),d.data&&(i+=(kt.test(i)?"&":"?")+d.data,delete d.data),d.cache===!1&&(i=i.replace(Ot,"$1"),h=(kt.test(i)?"&":"?")+"_="+jt++ +h),d.url=i+h),d.ifModified&&(de.lastModified[i]&&C.setRequestHeader("If-Modified-Since",de.lastModified[i]),de.etag[i]&&C.setRequestHeader("If-None-Match",de.etag[i])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Mt+"; q=0.01":""):d.accepts["*"]);for(p in d.headers)C.setRequestHeader(p,d.headers[p]);if(d.beforeSend&&(d.beforeSend.call(g,C,d)===!1||l))return C.abort();if(T="abort",y.add(d.complete),C.done(d.success),C.fail(d.error),o=Y(Pt,d,n,C)){if(C.readyState=1,f&&m.trigger("ajaxSend",[C,d]),l)return C;d.async&&d.timeout>0&&(u=e.setTimeout(function(){C.abort("timeout")},d.timeout));try{l=!1,o.send(b,r)}catch(e){if(l)throw e;r(-1,e)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return de.get(e,t,n,"json")},getScript:function(e,t){return de.get(e,void 0,t,"script")}}),de.each(["get","post"],function(e,t){de[t]=function(e,n,r,o){return de.isFunction(n)&&(o=o||r,r=n,n=void 0),de.ajax(de.extend({url:e,type:t,dataType:o,data:n,success:r},de.isPlainObject(e)&&e))}}),de._evalUrl=function(e){return de.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},de.fn.extend({wrapAll:function(e){var t;return this[0]&&(de.isFunction(e)&&(e=e.call(this[0])),t=de(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return de.isFunction(e)?this.each(function(t){de(this).wrapInner(e.call(this,t))}):this.each(function(){var t=de(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=de.isFunction(e);return this.each(function(n){de(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){de(this).replaceWith(this.childNodes)}),this}}),de.expr.pseudos.hidden=function(e){return!de.expr.pseudos.visible(e)},de.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},de.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Bt=de.ajaxSettings.xhr();pe.cors=!!Bt&&"withCredentials"in Bt,pe.ajax=Bt=!!Bt,de.ajaxTransport(function(t){var n,r;if(pe.cors||Bt&&!t.crossDomain)return{send:function(o,i){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(s in o)a.setRequestHeader(s,o[s]);n=function(e){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(Wt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),de.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),de.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return de.globalEval(e),e}}}),de.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),de.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=de(" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/socket/node_modules/pillarjs/_book/search_index.json b/socket/node_modules/pillarjs/_book/search_index.json new file mode 100644 index 0000000..9da33ab --- /dev/null +++ b/socket/node_modules/pillarjs/_book/search_index.json @@ -0,0 +1 @@ +{"index":{"version":"0.5.12","fields":[{"name":"title","boost":10},{"name":"keywords","boost":15},{"name":"body","boost":1}],"ref":"url","documentStore":{"store":{"./":["\"batteri","\"bi","\"h\"","\"plugins\":","\"pragma\":","\"presets\":","\"transform","'closed',","'open'","'pillarjs';","'super","(","(easiest)","({",");","*/",".babelrc",".babelrc:","/**","//","1.","15","2.","3","3.","4.","54","=","=>",">10.1","@jsx","[","[\"pillar\"]","[...],","]","abil","abov","accord","adding:","allow","allowscript","allowscripts:","alreadi","angular","api","app","app,","approach","apps.","aren't","argument","attribut","attributes,","awesom","babel","babel.","be:","befor","behavior.","benefit","bit.","browser","browsers.","build","bundling!","call","calls.","can!","care","case","chang","class","close","closed.","code","collect","compon","componen","component:","components.","components?","componentwillreceiveprop","consid","const","contain","content","conveni","convert","core,","creat","current","custom","custom,","dash","decid","default","default,","definition\"","depend","destructuring.","develop","differ","disabl","doesn't","dom","dom,","dom.","don't","down","downsid","drop","dynam","element","element'","elements?","enabl","encapsul","etc.","exact","exampl","execut","expect.","explain","extend","familiar","familiar?","faq","featur","file","firefox","flag","follows:","for.","forc","framework,","friend!","gener","get","go","go!","good","header!","header');","heavili","here.","hold","hood","horses.","html","i'm","idea.","imper","implement","import","imports!","impos","includ","included\"","insid","inspir","instanc","interactivity,","introduct","it!","it'","it.","javascript","jqueri","jsx","jsx!","jsx\",","jsx,","jsx.","librari","library.","lifecycl","linkstat","look","lot","manag","manipulations.","mechan","method","mind.","miss","mode","modern","modul","moral","name","name.","need","networking,","new","next:","nope.","note","note:","object:","open","oppos","option","option.","otherwise.","out","outsid","overwrit","page","page.","pass","permit","pillar","pillar.h","pillar.regist","pillar.register(superheader,","pillar:","pillar?","pillarj","pillarjs:","platform","pollyfil","polyfil","polyfill:","polyfills.","port","pragma","preact","preact,","preset","probabl","project","promises.","prop","provid","purpos","q:","re","react","react,","react.createel","regist","reli","remov","render","render()","render(props)","rendering.","requir","required.","respons","result","return","reusabl","safari","same","script","second","see","serv","server","set","set,","shadow","shortcut","side","simpl","simple:","singl","smart","smarter","spa","stabl","start","state","stateless","step","still","string","strings.","stuff","style","suggest","superhead","superpowered!","support","supported?","suppos","sweet","system","tag","tag'","tag.","tag:","tags.","target","tell","templat","text","them,","them.","there'","thing","third","this.","this.prop","this.props.children.","this.stat","this:","this?","those","to,","too.","tool","top","trim","true","turn","unavail","under","us","used.","useshadow","useshadow:","via","virtual","vue","wan't","want","way","way.","we'll","web","webcomponents.org,","webpack","weird.","whoa","whoa,","whole","within","work,","work?","write","written","xyz","yes!","yes,","you'll","you'r","you.","zyx?","{","{props.text}","{text}","||","}","})","→","⏱","☘️","❇️","🏁","🛠","🤔"],"1_LIFECYCLE_METHODS.html":["1.","accept","befor","called.","called?","compon","componentdidmount","componentdidupd","componentwillmount","componentwillreceiveprop","componentwillunmount","componentwillupd","dom","don't","exact","fals","get","lifecycl","method","mount","name","new","next:","note:","pillar","prevent","prop","provid","react:","remov","render","render()","render.","return","same","shouldcomponentupd","stateless","string","string/templ","tag","work","→"],"2_STRING_RENDER.html":["${text}","(i.e.","({","2.","=","=>","`","`;","argument","compon","components,","const","doesn't","don't","es6","extrem","function","instead","interpol","it'","jsx","jsx,","lifecycl","methods.","next:","note","prop","reason","render","return","similar","simple.","state","stateless","string","string).","string:","superhead","superpowered!","support","syntax","tag","tag.","templat","text","us","veri","via","want","})","→"],"3_TEMPLATE_RENDER.html":["'super","...","3.","access","allow","allowscript","allowscripts:","befor","behavior","code","compon","danger","default","defin","directli","do:","explicit","explicitli","flag","function","header');","header',","html","id","insid","instead","it'","js","live","name","need","next:","note:","option","overrid","pass","pillar","pillar.register('#mi","place","prop","props.","props?","regist","registering:","remov","render","rendering.","requir","run","so:","specifi","superpowered!","syntax.","tag","tag.","templat","template'","template',","template,","template.","there'","true,","us","want","you'r","{","{{mustache}}","{{text}}","});","→"],"4_HANDLING_INPUT.html":["'path'",".bind(this)","4.",";","abov","architectur","argument","autobind","bindings.","class","code.","compon","components'","conveni","custom","decko","decor","demonstr","dot","e.target.value,","email:","exampl","explicitli","extend","handl","handlechange(e)","hood,","however,","input","interact","it'","linkstat","method","more","new","notat","note:","optionally,","path","pillar","preact","provid","purposes,","react's,","real","recommend","render()","return","same","second","similar","so:","state","superinput","this.setstate({","under","us","user","valu","virtual","way.","way:","{","}","});"],"5_FLAGS.html":["\"service\"","5.","attribut","attributes.","avail","becom","behavior","chang","children","compon","components:","content","custom","defin","dom→","down","element","element'","error.","extern","flag","flag,","flag.","forc","jqueri","lock","manipulation.","namespac","next:","p:","p:ignor","p:protect","pass","pillar","pre","prefix","recommend","rendered.","set,","shadow","tag","this.flag","this.prop","this.props.children","throw","tri","won't"],"6_SHADOW_DOM.html":["'closed'","'mi","'open'","'open',","6.","access","bit","browser","can't","compon","component',","control","default","devtool","devtools.","do","dom","dom,","don't","element","enabl","expensive.","javascript.","know","mode","need","next:","object","option","outsid","pass","pillar","pillar.register(mycomponent,","polyfil","registering:","shadow","such,","unaccess","unchang","us","useshadow","useshadow:","want","{","});","→"],"7_DEVTOOLS.html":["\"elements\"","(element","(use","2","7.","allow","avail","befor","chrome","commun","compon","components.","contain","creat","dev","devtool","dom","dure","edit","effici","element","extens","flags,","highlight","hover","html","initi","inspect","is:","json","list","loaded,","manner","metadata","mode","name,","object","page","panel","parse.","pillar","present,","pretti","preview","props,","provid","quick","react.","represent","representation)","servic","set","shadowdom","side","sidebar","sidebar.","similar","statu","stuff","sweet","tab","through","tool","tree).","view","window.__pillar_devtools_hook__"]},"length":8},"tokenStore":{"root":{"1":{"5":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":3.333333333333333}}}},"2":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":3.333333333333333}}}},"3":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":2.5}}}},"4":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":2.5}}}},"5":{"4":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"docs":{},".":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":5}}}},"6":{"docs":{},".":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":3.333333333333333}}}},"7":{"docs":{},".":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":3.333333333333333}}}},"docs":{},"\"":{"docs":{},"b":{"docs":{},"a":{"docs":{},"t":{"docs":{},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"h":{"docs":{},"\"":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"p":{"docs":{},"l":{"docs":{},"u":{"docs":{},"g":{"docs":{},"i":{"docs":{},"n":{"docs":{},"s":{"docs":{},"\"":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}},"r":{"docs":{},"a":{"docs":{},"g":{"docs":{},"m":{"docs":{},"a":{"docs":{},"\"":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"e":{"docs":{},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{},"s":{"docs":{},"\"":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}}}}}}},"t":{"docs":{},"r":{"docs":{},"a":{"docs":{},"n":{"docs":{},"s":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{},"v":{"docs":{},"i":{"docs":{},"c":{"docs":{},"e":{"docs":{},"\"":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"s":{"docs":{},"\"":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}}}}}},"'":{"docs":{},"c":{"docs":{},"l":{"docs":{},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{},"d":{"docs":{},"'":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{},"'":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},",":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}},"p":{"docs":{},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"r":{"docs":{},"j":{"docs":{},"s":{"docs":{},"'":{"docs":{},";":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},"a":{"docs":{},"t":{"docs":{},"h":{"docs":{},"'":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}},"s":{"docs":{},"u":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436}}}}}}},"m":{"docs":{},"i":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}},"(":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}},"e":{"docs":{},"a":{"docs":{},"s":{"docs":{},"i":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{},")":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"l":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}}},"{":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}},"i":{"docs":{},".":{"docs":{},"e":{"docs":{},".":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}},"u":{"docs":{},"s":{"docs":{},"e":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},")":{"docs":{},";":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}},"*":{"docs":{},"/":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},".":{"docs":{},"b":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{},"r":{"docs":{},"c":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},"(":{"docs":{},"t":{"docs":{},"h":{"docs":{},"i":{"docs":{},"s":{"docs":{},")":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}}}},".":{"docs":{},".":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}},"/":{"docs":{},"*":{"docs":{},"*":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"/":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}},"=":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}},">":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}},">":{"1":{"0":{"docs":{},".":{"1":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}},"docs":{}}},"docs":{}},"docs":{}},"@":{"docs":{},"j":{"docs":{},"s":{"docs":{},"x":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"[":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"\"":{"docs":{},"p":{"docs":{},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"r":{"docs":{},"\"":{"docs":{},"]":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},".":{"docs":{},".":{"docs":{},".":{"docs":{},"]":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"]":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"a":{"docs":{},"b":{"docs":{},"i":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"o":{"docs":{},"v":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"c":{"docs":{},"c":{"docs":{},"o":{"docs":{},"r":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"e":{"docs":{},"p":{"docs":{},"t":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}},"s":{"docs":{},"s":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}},"d":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"l":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},"s":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"n":{"docs":{},"g":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"p":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"p":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"r":{"docs":{},"o":{"docs":{},"a":{"docs":{},"c":{"docs":{},"h":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{},"'":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"g":{"docs":{},"u":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}},"c":{"docs":{},"h":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}}}},"t":{"docs":{},"t":{"docs":{},"r":{"docs":{},"i":{"docs":{},"b":{"docs":{},"u":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.03333333333333333}},"e":{"docs":{},"s":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},".":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}}}}}}},"w":{"docs":{},"e":{"docs":{},"s":{"docs":{},"o":{"docs":{},"m":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"u":{"docs":{},"t":{"docs":{},"o":{"docs":{},"b":{"docs":{},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}},"v":{"docs":{},"a":{"docs":{},"i":{"docs":{},"l":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"b":{"docs":{},"a":{"docs":{},"b":{"docs":{},"e":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"e":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.08333333333333333},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"h":{"docs":{},"a":{"docs":{},"v":{"docs":{},"i":{"docs":{},"o":{"docs":{},"r":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},".":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"f":{"docs":{},"i":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}},"i":{"docs":{},"t":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"n":{"docs":{},"d":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"s":{"docs":{},".":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}},"u":{"docs":{},"i":{"docs":{},"l":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.005747126436781609}}}}},"n":{"docs":{},"d":{"docs":{},"l":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},"c":{"docs":{},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"e":{"docs":{},"d":{"docs":{},".":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}},"?":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}},"n":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"'":{"docs":{},"t":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}},"r":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"s":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.05}}}}},"i":{"docs":{},"l":{"docs":{},"d":{"docs":{},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}}},"r":{"docs":{},"o":{"docs":{},"m":{"docs":{},"e":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"l":{"docs":{},"a":{"docs":{},"s":{"docs":{},"s":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.023255813953488372}}}}},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"d":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},".":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"l":{"docs":{},"l":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"m":{"docs":{},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.06666666666666667},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.031746031746031744},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},"e":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"t":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}},"?":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},",":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}},"'":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}},":":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}},"w":{"docs":{},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"e":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"p":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}},"u":{"docs":{},"n":{"docs":{},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}}},"p":{"docs":{},"d":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}}}},"d":{"docs":{},"i":{"docs":{},"d":{"docs":{},"m":{"docs":{},"o":{"docs":{},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}},"u":{"docs":{},"p":{"docs":{},"d":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}}},"'":{"docs":{},",":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}}}},"m":{"docs":{},"u":{"docs":{},"n":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}},"t":{"docs":{},"a":{"docs":{},"i":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}},"r":{"docs":{},"o":{"docs":{},"l":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}},"r":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"r":{"docs":{},"e":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"u":{"docs":{},"r":{"docs":{},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"s":{"docs":{},"t":{"docs":{},"o":{"docs":{},"m":{"docs":{"./":{"ref":"./","tf":0.008620689655172414},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"d":{"docs":{},"a":{"docs":{},"s":{"docs":{},"h":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"r":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}},"e":{"docs":{},"c":{"docs":{},"i":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"k":{"docs":{},"o":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}},"o":{"docs":{},"r":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"f":{"docs":{},"a":{"docs":{},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"i":{"docs":{},"n":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"\"":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{},"u":{"docs":{},"c":{"docs":{},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}}}}},"v":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.03225806451612903}},"e":{"docs":{},"l":{"docs":{},"o":{"docs":{},"p":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}},"t":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":3.365591397849462}},"s":{"docs":{},".":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}}},"m":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},"t":{"docs":{},"r":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}},"i":{"docs":{},"f":{"docs":{},"f":{"docs":{},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"r":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},"l":{"docs":{},"i":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}}},"o":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},"e":{"docs":{},"s":{"docs":{},"n":{"docs":{},"'":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.005747126436781609},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}},"m":{"docs":{"./":{"ref":"./","tf":0.005747126436781609},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.05},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":3.4},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},",":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}},".":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}},"→":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}},"n":{"docs":{},"'":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}},"w":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},"s":{"docs":{},"i":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},":":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}},"t":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}},"r":{"docs":{},"o":{"docs":{},"p":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"y":{"docs":{},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"u":{"docs":{},"r":{"docs":{},"e":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"e":{"docs":{},"l":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.03333333333333333},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.053763440860215055}},"'":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}},"s":{"docs":{},"?":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}},"n":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.03333333333333333}}}}},"c":{"docs":{},"a":{"docs":{},"p":{"docs":{},"s":{"docs":{},"u":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"t":{"docs":{},"c":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"x":{"docs":{},"a":{"docs":{},"c":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}},"e":{"docs":{},"c":{"docs":{},"u":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"p":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"n":{"docs":{},"s":{"docs":{},"i":{"docs":{},"v":{"docs":{},"e":{"docs":{},".":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"i":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"i":{"docs":{},"c":{"docs":{},"i":{"docs":{},"t":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},"l":{"docs":{},"i":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.023255813953488372}}},"s":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.03225806451612903}}}},"r":{"docs":{},"n":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.03333333333333333}}}}},"r":{"docs":{},"e":{"docs":{},"m":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}},"s":{"6":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}},"docs":{}},".":{"docs":{},"t":{"docs":{},"a":{"docs":{},"r":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{},".":{"docs":{},"v":{"docs":{},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{},"e":{"docs":{},",":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"i":{"docs":{},"l":{"docs":{},":":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}},"r":{"docs":{},"r":{"docs":{},"o":{"docs":{},"r":{"docs":{},".":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}},"d":{"docs":{},"i":{"docs":{},"t":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.021505376344086023}}}}},"f":{"docs":{},"f":{"docs":{},"i":{"docs":{},"c":{"docs":{},"i":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}},"f":{"docs":{},"a":{"docs":{},"m":{"docs":{},"i":{"docs":{},"l":{"docs":{},"i":{"docs":{},"a":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"?":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"q":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}},"l":{"docs":{},"s":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}}}}},"i":{"docs":{},"l":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"r":{"docs":{},"e":{"docs":{},"f":{"docs":{},"o":{"docs":{},"x":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"l":{"docs":{},"a":{"docs":{},"g":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":5.1}},",":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}},".":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}},"s":{"docs":{},",":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"o":{"docs":{},"w":{"docs":{},"s":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"r":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"c":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}},"r":{"docs":{},"a":{"docs":{},"m":{"docs":{},"e":{"docs":{},"w":{"docs":{},"o":{"docs":{},"r":{"docs":{},"k":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}},"i":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"u":{"docs":{},"n":{"docs":{},"c":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.031746031746031744},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436}}}}}}}}}},"g":{"docs":{},"e":{"docs":{},"n":{"docs":{},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"t":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.03333333333333333}}}},"o":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"o":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"h":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"'":{"docs":{},")":{"docs":{},";":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}},",":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}},"v":{"docs":{},"i":{"docs":{},"l":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"r":{"docs":{},"e":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"o":{"docs":{},"l":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}},"o":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},",":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"r":{"docs":{},"s":{"docs":{},"e":{"docs":{},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"w":{"docs":{},"e":{"docs":{},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},",":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"t":{"docs":{},"m":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.007183908045977011},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"a":{"docs":{},"n":{"docs":{},"d":{"docs":{},"l":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":2.5232558139534884}},"e":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{},"e":{"docs":{},"(":{"docs":{},"e":{"docs":{},")":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}}}}}}}},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"l":{"docs":{},"i":{"docs":{},"g":{"docs":{},"h":{"docs":{},"t":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.021505376344086023}}}}}}}}}}},"i":{"docs":{},"'":{"docs":{},"m":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"d":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},"e":{"docs":{},"a":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"m":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"l":{"docs":{},"e":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.005747126436781609}},"s":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"s":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"n":{"docs":{},"c":{"docs":{},"l":{"docs":{},"u":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"e":{"docs":{},"d":{"docs":{},"\"":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"s":{"docs":{},"i":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}},"p":{"docs":{},"i":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.021505376344086023}}}}}},"t":{"docs":{},"a":{"docs":{},"n":{"docs":{},"c":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}},"t":{"docs":{},"e":{"docs":{},"r":{"docs":{},"a":{"docs":{},"c":{"docs":{},"t":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}},"i":{"docs":{},"v":{"docs":{},"i":{"docs":{},"t":{"docs":{},"y":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"l":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}},"r":{"docs":{},"o":{"docs":{},"d":{"docs":{},"u":{"docs":{},"c":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":10}}}}}}}}},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":2.511627906976744}}}}},"i":{"docs":{},"t":{"docs":{},"i":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"t":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"'":{"docs":{"./":{"ref":"./","tf":0.008620689655172414},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"s":{"docs":{},":":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"j":{"docs":{},"a":{"docs":{},"v":{"docs":{},"a":{"docs":{},"s":{"docs":{},"c":{"docs":{},"r":{"docs":{},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}},".":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.03333333333333333}}}}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}},"s":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},"x":{"docs":{"./":{"ref":"./","tf":0.01293103448275862},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"\"":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"o":{"docs":{},"n":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.021505376344086023}}}}}},"l":{"docs":{},"i":{"docs":{},"b":{"docs":{},"r":{"docs":{},"a":{"docs":{},"r":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.005747126436781609}}},"y":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"f":{"docs":{},"e":{"docs":{},"c":{"docs":{},"y":{"docs":{},"c":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":3.383333333333333},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}}},"n":{"docs":{},"k":{"docs":{},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}},"v":{"docs":{},"e":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}},"s":{"docs":{},"t":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"o":{"docs":{},"o":{"docs":{},"k":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"c":{"docs":{},"k":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"d":{"docs":{},",":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}}},"m":{"docs":{},"a":{"docs":{},"n":{"docs":{},"a":{"docs":{},"g":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"i":{"docs":{},"p":{"docs":{},"u":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},".":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}}}}}}},"n":{"docs":{},"e":{"docs":{},"r":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"e":{"docs":{},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"t":{"docs":{},"h":{"docs":{},"o":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":3.4},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}},"s":{"docs":{},".":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}},"a":{"docs":{},"d":{"docs":{},"a":{"docs":{},"t":{"docs":{},"a":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"d":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"s":{"docs":{},"s":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"o":{"docs":{},"d":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},"r":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"u":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}},"r":{"docs":{},"a":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.005747126436781609}}}},"e":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}},"u":{"docs":{},"n":{"docs":{},"t":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.03333333333333333}}}}}}},"n":{"docs":{},"a":{"docs":{},"m":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"s":{"docs":{},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}},",":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"e":{"docs":{},"e":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}},"t":{"docs":{},"w":{"docs":{},"o":{"docs":{},"r":{"docs":{},"k":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},"w":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}},"x":{"docs":{},"t":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}},"o":{"docs":{},"p":{"docs":{},"e":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"t":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}},":":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}},"a":{"docs":{},"t":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}},"o":{"docs":{},"b":{"docs":{},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.03225806451612903}},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"p":{"docs":{},"e":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}},"p":{"docs":{},"o":{"docs":{},"s":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}}},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.008620689655172414},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"a":{"docs":{},"l":{"docs":{},"l":{"docs":{},"y":{"docs":{},",":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}}}},"t":{"docs":{},"h":{"docs":{},"e":{"docs":{},"r":{"docs":{},"w":{"docs":{},"i":{"docs":{},"s":{"docs":{},"e":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},"u":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"s":{"docs":{},"i":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}},"v":{"docs":{},"e":{"docs":{},"r":{"docs":{},"w":{"docs":{},"r":{"docs":{},"i":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"r":{"docs":{},"i":{"docs":{},"d":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"g":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.005747126436781609},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.021505376344086023}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"s":{"docs":{},"s":{"docs":{"./":{"ref":"./","tf":0.008620689655172414},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.034482758620689655},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.05},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}},"t":{"docs":{},"h":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}},"n":{"docs":{},"e":{"docs":{},"l":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.021505376344086023}}}}},"r":{"docs":{},"s":{"docs":{},"e":{"docs":{},".":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"e":{"docs":{},"r":{"docs":{},"m":{"docs":{},"i":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.021551724137931036},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.046511627906976744},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.03333333333333333},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.05},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":3.419354838709677}},".":{"docs":{},"h":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}},"r":{"docs":{},"e":{"docs":{},"g":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"e":{"docs":{},"r":{"docs":{},"(":{"docs":{},"s":{"docs":{},"u":{"docs":{},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"h":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}}}}},"'":{"docs":{},"#":{"docs":{},"m":{"docs":{},"i":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436}}}}}},"m":{"docs":{},"y":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},",":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}}}}}}},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"?":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"j":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}},"s":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{},"f":{"docs":{},"o":{"docs":{},"r":{"docs":{},"m":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}}}}},"c":{"docs":{},"e":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}},"o":{"docs":{},"l":{"docs":{},"l":{"docs":{},"y":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"y":{"docs":{},"f":{"docs":{},"i":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.014367816091954023},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},"l":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}},"r":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"r":{"docs":{},"a":{"docs":{},"g":{"docs":{},"m":{"docs":{},"a":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"e":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},"a":{"docs":{},"c":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"s":{"docs":{},"e":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"n":{"docs":{},"t":{"docs":{},",":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"v":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}},"i":{"docs":{},"e":{"docs":{},"w":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"f":{"docs":{},"i":{"docs":{},"x":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}},"t":{"docs":{},"t":{"docs":{},"i":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"o":{"docs":{},"b":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"j":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"m":{"docs":{},"i":{"docs":{},"s":{"docs":{},"e":{"docs":{},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"p":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},"s":{"docs":{},".":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}},"?":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}},",":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"v":{"docs":{},"i":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.023255813953488372},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"u":{"docs":{},"r":{"docs":{},"p":{"docs":{},"o":{"docs":{},"s":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"e":{"docs":{},"s":{"docs":{},",":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}},":":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},"i":{"docs":{},"g":{"docs":{},"n":{"docs":{},"o":{"docs":{},"r":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"t":{"docs":{},"e":{"docs":{},"c":{"docs":{},"t":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}}}}}},"q":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.011494252873563218}}},"u":{"docs":{},"i":{"docs":{},"c":{"docs":{},"k":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"r":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"a":{"docs":{},"c":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.014367816091954023}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},".":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},"c":{"docs":{},"r":{"docs":{},"e":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"e":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}},":":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}},"'":{"docs":{},"s":{"docs":{},",":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}},"s":{"docs":{},"o":{"docs":{},"n":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}},"l":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}},"g":{"docs":{},"i":{"docs":{},"s":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.034482758620689655}},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},":":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}}}}}},"l":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"m":{"docs":{},"o":{"docs":{},"v":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}},"n":{"docs":{},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.008620689655172414},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.03333333333333333},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":3.4126984126984126},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":2.5229885057471266}},"(":{"docs":{},")":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.05},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.023255813953488372}}},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"p":{"docs":{},"s":{"docs":{},")":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}},".":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}},"e":{"docs":{},"d":{"docs":{},".":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}}}},"q":{"docs":{},"u":{"docs":{},"i":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},"e":{"docs":{},"d":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}},"s":{"docs":{},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"s":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"u":{"docs":{},"l":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"t":{"docs":{},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.031746031746031744},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.023255813953488372}}}}}},"u":{"docs":{},"s":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"m":{"docs":{},"e":{"docs":{},"n":{"docs":{},"d":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}}}},"p":{"docs":{},"r":{"docs":{},"e":{"docs":{},"s":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.021505376344086023}},"a":{"docs":{},"t":{"docs":{},"i":{"docs":{},"o":{"docs":{},"n":{"docs":{},")":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}}}}}}}}}},"u":{"docs":{},"n":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}},"s":{"docs":{},"a":{"docs":{},"f":{"docs":{},"a":{"docs":{},"r":{"docs":{},"i":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"m":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"c":{"docs":{},"r":{"docs":{},"i":{"docs":{},"p":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}}}}},"e":{"docs":{},"c":{"docs":{},"o":{"docs":{},"n":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"r":{"docs":{},"v":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"i":{"docs":{},"c":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}},"h":{"docs":{},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{"./":{"ref":"./","tf":0.005747126436781609},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":3.4166666666666665}},"d":{"docs":{},"o":{"docs":{},"m":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{},"c":{"docs":{},"u":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"u":{"docs":{},"l":{"docs":{},"d":{"docs":{},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"u":{"docs":{},"p":{"docs":{},"d":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"d":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},"b":{"docs":{},"a":{"docs":{},"r":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}},".":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"e":{"docs":{},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},".":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}},"i":{"docs":{},"l":{"docs":{},"a":{"docs":{},"r":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"n":{"docs":{},"g":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}},"m":{"docs":{},"a":{"docs":{},"r":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}},"p":{"docs":{},"a":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"e":{"docs":{},"c":{"docs":{},"i":{"docs":{},"f":{"docs":{},"i":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}},"t":{"docs":{},"a":{"docs":{},"b":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.04310344827586207}}}},"r":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.005747126436781609}}}},"t":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}},"l":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}},"u":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"e":{"docs":{},"p":{"docs":{"./":{"ref":"./","tf":0.005747126436781609}}}},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}}},"r":{"docs":{},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":3.3968253968253963}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"/":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}}}}}}}},")":{"docs":{},".":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}},":":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}},"u":{"docs":{},"f":{"docs":{},"f":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"y":{"docs":{},"l":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"u":{"docs":{},"g":{"docs":{},"g":{"docs":{},"e":{"docs":{},"s":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"p":{"docs":{},"e":{"docs":{},"r":{"docs":{},"h":{"docs":{},"e":{"docs":{},"a":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}},"p":{"docs":{},"o":{"docs":{},"w":{"docs":{},"e":{"docs":{},"r":{"docs":{},"e":{"docs":{},"d":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}}}},"i":{"docs":{},"n":{"docs":{},"p":{"docs":{},"u":{"docs":{},"t":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.023255813953488372}}}}}}}}},"p":{"docs":{},"o":{"docs":{},"r":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.010057471264367816},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}},"e":{"docs":{},"d":{"docs":{},"?":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"s":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"c":{"docs":{},"h":{"docs":{},",":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}},"w":{"docs":{},"e":{"docs":{},"e":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}},"y":{"docs":{},"s":{"docs":{},"t":{"docs":{},"e":{"docs":{},"m":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}},"n":{"docs":{},"t":{"docs":{},"a":{"docs":{},"x":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}},".":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}},"o":{"docs":{},":":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"t":{"docs":{},"a":{"docs":{},"g":{"docs":{"./":{"ref":"./","tf":0.015804597701149427},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":2.545977011494253},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},"'":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"r":{"docs":{},"g":{"docs":{},"e":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"b":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}},"e":{"docs":{},"l":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"m":{"docs":{},"p":{"docs":{},"l":{"docs":{},"a":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.011494252873563218},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.047619047619047616},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":2.5344827586206895}},"e":{"docs":{},"'":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}},",":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436}}}},",":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}},".":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436}}}}}}}}},"x":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}},"h":{"docs":{},"e":{"docs":{},"m":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"r":{"docs":{},"e":{"docs":{},"'":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}},"i":{"docs":{},"n":{"docs":{},"g":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"r":{"docs":{},"d":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"s":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"p":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},"s":{"docs":{},".":{"docs":{},"c":{"docs":{},"h":{"docs":{},"i":{"docs":{},"l":{"docs":{},"d":{"docs":{},"r":{"docs":{},"e":{"docs":{},"n":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}}}}}}}},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"e":{"docs":{},"t":{"docs":{},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"t":{"docs":{},"e":{"docs":{},"(":{"docs":{},"{":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}}}}}}},"f":{"docs":{},"l":{"docs":{},"a":{"docs":{},"g":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}}}}}},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"?":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}}},"o":{"docs":{},"s":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"r":{"docs":{},"o":{"docs":{},"w":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}}},"u":{"docs":{},"g":{"docs":{},"h":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}},"o":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"o":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.03225806451612903}}}},"p":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"r":{"docs":{},"i":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.016666666666666666}},"m":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"u":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},",":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}},"e":{"docs":{},"e":{"docs":{},")":{"docs":{},".":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}},"u":{"docs":{},"r":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"u":{"docs":{},"n":{"docs":{},"a":{"docs":{},"v":{"docs":{},"a":{"docs":{},"i":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"c":{"docs":{},"c":{"docs":{},"e":{"docs":{},"s":{"docs":{},"s":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}},"d":{"docs":{},"e":{"docs":{},"r":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"c":{"docs":{},"h":{"docs":{},"a":{"docs":{},"n":{"docs":{},"g":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}}},"s":{"docs":{"./":{"ref":"./","tf":0.028735632183908046},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.031746031746031744},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.022988505747126436},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.046511627906976744},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.05}},"e":{"docs":{},"d":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"s":{"docs":{},"h":{"docs":{},"a":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},":":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.05}}}}}}}}},"r":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":2.511627906976744}}}}}},"v":{"docs":{},"i":{"docs":{},"a":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}},"r":{"docs":{},"t":{"docs":{},"u":{"docs":{},"a":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}}},"e":{"docs":{},"w":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}},"u":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"e":{"docs":{},"r":{"docs":{},"i":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}},"a":{"docs":{},"l":{"docs":{},"u":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}}},"w":{"docs":{},"a":{"docs":{},"n":{"docs":{},"'":{"docs":{},"t":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"t":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}},"y":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}},":":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186}}}}},"e":{"docs":{},"'":{"docs":{},"l":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"b":{"docs":{"./":{"ref":"./","tf":0.011494252873563218}},"c":{"docs":{},"o":{"docs":{},"m":{"docs":{},"p":{"docs":{},"o":{"docs":{},"n":{"docs":{},"e":{"docs":{},"n":{"docs":{},"t":{"docs":{},"s":{"docs":{},".":{"docs":{},"o":{"docs":{},"r":{"docs":{},"g":{"docs":{},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}}}}}}}},"p":{"docs":{},"a":{"docs":{},"c":{"docs":{},"k":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"i":{"docs":{},"r":{"docs":{},"d":{"docs":{},".":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"h":{"docs":{},"o":{"docs":{},"a":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"l":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"i":{"docs":{},"t":{"docs":{},"h":{"docs":{},"i":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"n":{"docs":{},"d":{"docs":{},"o":{"docs":{},"w":{"docs":{},".":{"docs":{},"_":{"docs":{},"_":{"docs":{},"p":{"docs":{},"i":{"docs":{},"l":{"docs":{},"l":{"docs":{},"a":{"docs":{},"r":{"docs":{},"_":{"docs":{},"d":{"docs":{},"e":{"docs":{},"v":{"docs":{},"t":{"docs":{},"o":{"docs":{},"o":{"docs":{},"l":{"docs":{},"s":{"docs":{},"_":{"docs":{},"h":{"docs":{},"o":{"docs":{},"o":{"docs":{},"k":{"docs":{},"_":{"docs":{},"_":{"docs":{"7_DEVTOOLS.html":{"ref":"7_DEVTOOLS.html","tf":0.010752688172043012}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"r":{"docs":{},"k":{"docs":{"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"?":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"n":{"docs":{},"'":{"docs":{},"t":{"docs":{"5_FLAGS.html":{"ref":"5_FLAGS.html","tf":0.03333333333333333}}}}}},"r":{"docs":{},"i":{"docs":{},"t":{"docs":{},"e":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},"t":{"docs":{},"e":{"docs":{},"n":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}}}}},"x":{"docs":{},"y":{"docs":{},"z":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}},"y":{"docs":{},"e":{"docs":{},"s":{"docs":{},"!":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}},",":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}},"o":{"docs":{},"u":{"docs":{},"'":{"docs":{},"l":{"docs":{},"l":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"r":{"docs":{"./":{"ref":"./","tf":0.004310344827586207},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}},".":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}}}},"z":{"docs":{},"y":{"docs":{},"x":{"docs":{},"?":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}},"{":{"docs":{"./":{"ref":"./","tf":0.008620689655172414},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.05813953488372093},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}},"p":{"docs":{},"r":{"docs":{},"o":{"docs":{},"p":{"docs":{},"s":{"docs":{},".":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"}":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"}":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}}}}},"{":{"docs":{},"m":{"docs":{},"u":{"docs":{},"s":{"docs":{},"t":{"docs":{},"a":{"docs":{},"c":{"docs":{},"h":{"docs":{},"e":{"docs":{},"}":{"docs":{},"}":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}}}}}},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"}":{"docs":{},"}":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218}}}}}}}}}},"|":{"docs":{},"|":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023}}}},"}":{"docs":{"./":{"ref":"./","tf":0.008620689655172414},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.05813953488372093}},")":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}},";":{"docs":{"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.011627906976744186},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}},"→":{"docs":{"./":{"ref":"./","tf":0.0014367816091954023},"1_LIFECYCLE_METHODS.html":{"ref":"1_LIFECYCLE_METHODS.html","tf":0.016666666666666666},"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872},"3_TEMPLATE_RENDER.html":{"ref":"3_TEMPLATE_RENDER.html","tf":0.011494252873563218},"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}},"⏱":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}},"☘":{"docs":{},"️":{"docs":{"./":{"ref":"./","tf":0.01293103448275862}}}},"❇":{"docs":{},"️":{"docs":{"./":{"ref":"./","tf":0.04597701149425287}}}},"�":{"docs":{},"�":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}},"�":{"docs":{},"�":{"docs":{"./":{"ref":"./","tf":0.0028735632183908046}}}},"�":{"docs":{},"�":{"docs":{"./":{"ref":"./","tf":0.004310344827586207}}}},"$":{"docs":{},"{":{"docs":{},"t":{"docs":{},"e":{"docs":{},"x":{"docs":{},"t":{"docs":{},"}":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}}}}}}},"`":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}},";":{"docs":{"2_STRING_RENDER.html":{"ref":"2_STRING_RENDER.html","tf":0.015873015873015872}}}},";":{"docs":{"4_HANDLING_INPUT.html":{"ref":"4_HANDLING_INPUT.html","tf":0.023255813953488372}}},"k":{"docs":{},"n":{"docs":{},"o":{"docs":{},"w":{"docs":{"6_SHADOW_DOM.html":{"ref":"6_SHADOW_DOM.html","tf":0.016666666666666666}}}}}}},"length":750},"corpusTokens":["\"batteri","\"bi","\"elements\"","\"h\"","\"plugins\":","\"pragma\":","\"presets\":","\"service\"","\"transform","${text}","'closed'","'closed',","'mi","'open'","'open',","'path'","'pillarjs';","'super","(","(easiest)","(element","(i.e.","(use","({",");","*/","...",".babelrc",".babelrc:",".bind(this)","/**","//","1.","15","2","2.","3","3.","4.","5.","54","6.","7.",";","=","=>",">10.1","@jsx","[","[\"pillar\"]","[...],","]","`","`;","abil","abov","accept","access","accord","adding:","allow","allowscript","allowscripts:","alreadi","angular","api","app","app,","approach","apps.","architectur","aren't","argument","attribut","attributes,","attributes.","autobind","avail","awesom","babel","babel.","be:","becom","befor","behavior","behavior.","benefit","bindings.","bit","bit.","browser","browsers.","build","bundling!","call","called.","called?","calls.","can!","can't","care","case","chang","children","chrome","class","close","closed.","code","code.","collect","commun","compon","componen","component',","component:","componentdidmount","componentdidupd","components'","components,","components.","components:","components?","componentwillmount","componentwillreceiveprop","componentwillunmount","componentwillupd","consid","const","contain","content","control","conveni","convert","core,","creat","current","custom","custom,","danger","dash","decid","decko","decor","default","default,","defin","definition\"","demonstr","depend","destructuring.","dev","develop","devtool","devtools.","differ","directli","disabl","do","do:","doesn't","dom","dom,","dom.","dom→","don't","dot","down","downsid","drop","dure","dynam","e.target.value,","edit","effici","element","element'","elements?","email:","enabl","encapsul","error.","es6","etc.","exact","exampl","execut","expect.","expensive.","explain","explicit","explicitli","extend","extens","extern","extrem","fals","familiar","familiar?","faq","featur","file","firefox","flag","flag,","flag.","flags,","follows:","for.","forc","framework,","friend!","function","gener","get","go","go!","good","handl","handlechange(e)","header!","header');","header',","heavili","here.","highlight","hold","hood","hood,","horses.","hover","however,","html","i'm","id","idea.","imper","implement","import","imports!","impos","includ","included\"","initi","input","insid","inspect","inspir","instanc","instead","interact","interactivity,","interpol","introduct","is:","it!","it'","it.","javascript","javascript.","jqueri","js","json","jsx","jsx!","jsx\",","jsx,","jsx.","know","librari","library.","lifecycl","linkstat","list","live","loaded,","lock","look","lot","manag","manipulation.","manipulations.","manner","mechan","metadata","method","methods.","mind.","miss","mode","modern","modul","moral","more","mount","name","name,","name.","namespac","need","networking,","new","next:","nope.","notat","note","note:","object","object:","open","oppos","option","option.","optionally,","otherwise.","out","outsid","overrid","overwrit","p:","p:ignor","p:protect","page","page.","panel","parse.","pass","path","permit","pillar","pillar.h","pillar.regist","pillar.register('#mi","pillar.register(mycomponent,","pillar.register(superheader,","pillar:","pillar?","pillarj","pillarjs:","place","platform","pollyfil","polyfil","polyfill:","polyfills.","port","pragma","pre","preact","preact,","prefix","present,","preset","pretti","prevent","preview","probabl","project","promises.","prop","props,","props.","props?","provid","purpos","purposes,","q:","quick","re","react","react's,","react,","react.","react.createel","react:","real","reason","recommend","regist","registering:","reli","remov","render","render()","render(props)","render.","rendered.","rendering.","represent","representation)","requir","required.","respons","result","return","reusabl","run","safari","same","script","second","see","serv","server","servic","set","set,","shadow","shadowdom","shortcut","shouldcomponentupd","side","sidebar","sidebar.","similar","simpl","simple.","simple:","singl","smart","smarter","so:","spa","specifi","stabl","start","state","stateless","statu","step","still","string","string).","string/templ","string:","strings.","stuff","style","such,","suggest","superhead","superinput","superpowered!","support","supported?","suppos","sweet","syntax","syntax.","system","tab","tag","tag'","tag.","tag:","tags.","target","tell","templat","template'","template',","template,","template.","text","them,","them.","there'","thing","third","this.","this.flag","this.prop","this.props.children","this.props.children.","this.setstate({","this.stat","this:","this?","those","through","throw","to,","too.","tool","top","tree).","tri","trim","true","true,","turn","unaccess","unavail","unchang","under","us","used.","user","useshadow","useshadow:","valu","veri","via","view","virtual","vue","wan't","want","way","way.","way:","we'll","web","webcomponents.org,","webpack","weird.","whoa","whoa,","whole","window.__pillar_devtools_hook__","within","won't","work","work,","work?","write","written","xyz","yes!","yes,","you'll","you'r","you.","zyx?","{","{props.text}","{text}","{{mustache}}","{{text}}","||","}","})","});","→","⏱","☘️","❇️","🏁","🛠","🤔"],"pipeline":["stopWordFilter","stemmer"]},"store":{"./":{"url":"./","title":"Introduction","keywords":"","body":"\n \n\n\nPillarJS is a \"batteries included\" JavaScript library for writing smart reusable Web Components in a modern way.\nInspired by React components PillarJS provides familiar state management mechanisms and Virtual DOM, while also providing all of the sweetness of Web Components like Shadow DOM, \"by-definition\" server side rendering and ability to render from template tags and strings.\nShortcuts\n\nGetting started\nUsing stateless components\nOptions\nUsing JSX\nBrowser support\nFAQ\n\n\nGetting Started\nGetting started is simple:\nStep 1. Import PillarJS:\nimport Pillar from 'pillarjs';\n\nStep 2. Create your component:\nclass SuperHeader extends Pillar {\n render(props) {\n return (\n \n {props.text}\n It's Superpowered!\n \n );\n }\n}\n\nLooks familiar? Pillar components are written in the exact same way as React components.\nNote: Because Pillar uses Preact for rendering JSX, props and state are passed as arguments to the render() method for convenient destructuring. You can still use this.props and this.state if you want to, but it's not required.\nStep 3. Register your custom tag:\nPillar.register(SuperHeader, 'super-header');\n\nSecond argument is an optional tag name. If not set, component name converted to dash-case will be used.\nStep 4. Use it!\n\n \n\n\nAnd you're good to go! Custom tag's attributes will be passed to this.props in your component and resulting HTML on the page will be:\n\n This is not a simple header!\n It's Superpowered!\n\n\n\nCan I use stateless components?\nYes, you can! The above class example can be trimmed down to this:\nconst SuperHeader = ({ text }) => (\n \n {text}\n It's Superpowered!\n \n);\n\n\nOptions\nA third argument passed to Pillar.register is an options object:\n{\n useShadow: 'open' || 'closed',\n allowScripts: true // Template render only\n}\n\nuseShadow option enables Shadow DOM. Pass open for open mode and closed for closed. See the difference here.\nallowScripts By default, all tags will be removed from the content of the template tag before rendering. This option re-enables them and permits executing any JavaScript code within template tag. Be careful with this option.\n\nNotes on JSX\nThere are 3 ways to enable JSX with Pillar:\n\nUsing a Babel preset (easiest)\n // .babelrc\n {\n \"presets\": [\"pillar\"]\n }\n\n\nBy adding:\n /** @jsx Pillar.h */\n\n on top of the file containing JSX. This will tell Babel to turn all JSX calls into Pillar.h calls. This is useful if for instance you already have React in your project and don't wan't to overwrite all of JSX behavior.\n\nIn .babelrc:\n {\n \"presets\": [...],\n \"plugins\": [\n \"transform-react-jsx\",\n {\n \"pragma\": \"h\" // default pragma is React.createElement\n }\n ]\n }\n\n\n\n\nWhat browsers are supported?\nPillar is written with the web platform in mind. According to WebComponents.org, the current support for platform features is as follows:\n\n\n\nBrowser Support\n\n\n\n\n\n\n\n\n\nTemplate Tags\n❇️ Stable\n❇️ Stable\n❇️ Stable\n❇️ Stable\n❇️ Stable\n\n\nCustom Elements\n❇️ Stable\n❇️ Stable\n❇️ Stable\n\n🛠 Developing\n\n\n🤔 Considering\n\n\n\nShadow DOM\n❇️ Stable\n❇️ Stable\n❇️ Stable\n\n🛠 Developing\n\n\n🤔 Considering\n\n\n\nModule Scripts\n❇️ Stable\n❇️ Stable\n❇️ >10.1\n🏁 Flag in 54\n🏁 Flag in 15\n\n\nHTML Imports\n❇️ Stable\n❇️ Stable\n⏱ On Hold\n⏱ On Hold\n🤔 Considering\n\n\n\n\n\nAnd this is what the support looks like with \nthe polyfill:\n\n\n\nPolyfill Support\n\n\n\n\n\n\n\n\n\nTemplate Tags\n❇️ Stable\n❇️ Stable\n❇️ Stable\n❇️ Stable\n❇️ Stable\n\n\nCustom Elements\n❇️ Stable\n❇️ Stable\n❇️ Stable\n\n☘️ Polyfill\n\n\n☘️ Polyfill\n\n\n\nShadow DOM\n❇️ Stable\n❇️ Stable\n❇️ Stable\n\n☘️ Polyfill\n\n\n☘️ Polyfill\n\n\n\nModule Scripts\n❇️ Stable\n❇️ Stable\n❇️ >10.1\n☘️ Polyfill\n☘️ Polyfill\n\n\nHTML Imports\n❇️ Stable\n❇️ Stable\n☘️ Polyfill\n☘️ Polyfill\n☘️ Polyfill\n\n\n\n\n\nNote: Pillar does not include any polyfills. You are responsible for pollyfilling for your target browsers.\n\nFAQ\nQ: I am morally opposed to JSX! How can I use this?\nPillar also supports rendering from string and template tags. We'll get to explaining those in a bit.\nHowever using JSX provides a whole lot of awesome features that you'll be missing out on otherwise.\nQ: I'm morally opposed to Webpack and bundling! How can I use this?\nPillar doesn't impose any build systems on you. All you need to get started is drop a script tag on the page.\nThe downside of not using a build system is unavailability of JSX via Babel. But you can still use string render and template tags and get all benefits of Virtual DOM.\nQ: I am morally opposed to HTML Imports!\nWe are too. Safari and Firefox aren't going to implement them, and they are just generally weird. Pillar doesn't rely on them and we suggest not to use them.\nQ: Do I need React to use this?\nNope. Pillar is inspired by React components approach and uses Preact under the hood for features like Virtual DOM and linkState but it's not React nor does it require it.\nQ: Can I have content inside of my custom elements?\nYes! By default all elements inside your custom tag will be passed to this.props.children. There's a flag to disable that behavior.\nQ: I am morally supportive of imperative DOM manipulations. Will this still work?\nPillar is your friend! If outside forces like jQuery decide to change your element's attributes, changes will be passed down to this.props and componentWillReceiveProps will be called as you would expect.\nQ: Can I use React library XYZ to do ZYX?\nNo idea. Pillar doesn't use React, it only uses JSX via Preact, so if library XYZ just does some JSX stuff and doesn't heavily depend on React core, it might work, but no promises.\nQ: How do I port my single page app to Pillar?\nWhoa whoa, hold your horses. Pillar serves different purpose than React or Angular or Vue or what have you. You're not supposed to be building an SPA with this.\nPillar is not a framework, it's a Web Components library.\n\nWeb components are a set of web platform APIs that allow you to create new custom, reusable encapsulated HTML tags to use in web pages and web apps.\n\nWhat Pillar does is allows you to create componens that are smarter than just a collection of tags and styles and allow you to do things like interactivity, networking, etc.\nIf you want to build a dynamic single page app, this library is probably not the tool you're looking for.\nNext: Lifecycle Methods →\n"},"1_LIFECYCLE_METHODS.html":{"url":"1_LIFECYCLE_METHODS.html","title":"1. Lifecycle Methods","keywords":"","body":"Lifecycle Methods\nPillar provides exact same lifecycle methods as\nReact:\n\n\n\nMethod Name\nWhen is it called?\n\n\n\n\ncomponentWillMount\nBefore the component gets mounted to the DOM\n\n\ncomponentDidMount\nAfter the component gets mounted to the DOM\n\n\ncomponentWillUnmount\nBefore component is removed from the DOM\n\n\ncomponentWillReceiveProps\nBefore new props are accepted\n\n\nshouldComponentUpdate\nBefore render() is called. Return false to prevent render\n\n\ncomponentWillUpdate\nBefore render()\n\n\ncomponentDidUpdate\nAfter render()\n\n\n\nNote: Lifecycle methods don't work in stateless components and string/template tag render.\nNext: Render from string →\n"},"2_STRING_RENDER.html":{"url":"2_STRING_RENDER.html","title":"2. Rendering from string","keywords":"","body":"Rendering from string\nIf for any reason you don't want to use JSX, you can render component from string or template tag.\nRendering from string is extremely simple. The syntax is very similar to\nstateless components, but instead of returning JSX your function should\nreturn a string:\nconst SuperHeader = ({ text }) => `\n \n ${text}\n It's Superpowered!\n \n`;\n\nYour component function will have the props argument that you can use for interpolation (i.e. via\nES6 template string).\nNote that string render doesn't support state and lifecycle methods.\nNext: Render from template tag →\n"},"3_TEMPLATE_RENDER.html":{"url":"3_TEMPLATE_RENDER.html","title":"3. Rendering template tags","keywords":"","body":"Rendering from template tag\nPillar allows rendering components from HTML tag. All you need to do is pass template's\nID to the register function like so:\nPillar.register('#my-template', 'super-header');\n\nNote: Explicitly specifying tag name is required when registering a template.\nHow do I access props?\nBecause you're not defining a function when registering template, there's no explicit place to\naccess props. Instead props are passed to the template directly using {{Mustache}} syntax.\nSo in your HTML you can do:\n\n {{text}}\n It's Superpowered!\n\n\n...\n\n\n\nI like to live dangerously and want to use tags\nBy default tags are removed from template before rendering. You can override this\nbehavior by passing allowScripts option when registering:\nPillar.register('#my-template', 'super-header', {\n allowScripts: true,\n});\n\nThis will run any JS code inside the template.\nNext: Flags →\n"},"4_HANDLING_INPUT.html":{"url":"4_HANDLING_INPUT.html","title":"4. Handling user input","keywords":"","body":"Handling User Input\nSince Pillar components' architecture is virtually the same as React's, you can handle interactions\nin the similar way:\nclass SuperInput extends Pillar {\n handleChange(e) {\n this.setState({\n email: e.target.value,\n });\n }\n\n render() {\n return ;\n }\n}\n\nHowever, because Pillar is using Preact under the hood, you\nget a convenient linkState method on a component which you can use like so:\nNote: the example above uses .bind(this) for demonstration purposes, but it's not a\nrecommended way. Use autobind-decorator or\ndecko in real code.\nclass SuperInput extends Pillar {\n render() {\n return ;\n }\n}\n\nOptionally, you can provide a second 'path' argument to explicitly provide a dot-notated path to the\nnew state value for more custom bindings.\n"},"5_FLAGS.html":{"url":"5_FLAGS.html","title":"5. Flags","keywords":"","body":"Flags\nIf you prefix any of your element's attributes with a p: it becomes a flag.\nFlags are passed to this.flags and are recommended for namespacing your \"service\" attributes.\nAvailable flags\nPillar also pre-defines some flags that change the behavior of Pillar components:\np:ignore-children\nIf this flag is set, content of a custom element tag won't be passed to this.props.children when\ncomponent is rendered.\np:protected\nThis flag locks external attribute manipulation. If an external force like jQuery is trying to\nchange an element with this flag, changes won't be passed down to this.props and it will throw an\nerror.\nNext: Shadow DOM→\n"},"6_SHADOW_DOM.html":{"url":"6_SHADOW_DOM.html","title":"6. Shadow DOM","keywords":"","body":"Shadow DOM\nBy default Pillar components don't use Shadow DOM because polyfill for it in some browsers may be a\nbit expensive. If you know what you doing and want to use Shadow DOM, all you need to do is pass an\noptions object with useShadow when registering:\nPillar.register(MyComponent, 'my-component', {\n useShadow: 'open',\n});\n\nModes\n\nuseShadow: 'open' will enable Shadow DOM that is accessible from outside JavaScript.\nuseShadow: 'closed' will enable Shadow DOM that is unaccessible and unchangeable from\n JavaScript. As such, these elements can't be controlled using\n Pillar DevTools.\n\nNext: Pillar DevTools →\n"},"7_DEVTOOLS.html":{"url":"7_DEVTOOLS.html","title":"7. Pillar DevTools","keywords":"","body":"Pillar DevTools\nPillar provides a Chrome DevTools extension that allows you to efficiently inspect Pillar\ncomponents.\n\nWhat it does\nExtension has 2 modes - panel and elements sidebar.\nPanel is where most of the sweet stuff is:\n\nList of all Pillar elements on the page with previews\nHighlight element on hover\nHighlight all Pillar elements on page\nEditable JSON representation of the element\nPretty side view (element name, props, flags, ShadowDOM status and HTML representation)\n\nSidebar available on \"Elements\" tab of DevTools only contains editable JSON representation (useful\nfor quick inspection in the DOM tree).\nHow it does it\nPillar communicates with Dev Tools through a service object window.__PILLAR_DEVTOOLS_HOOK__ in a\nsimilar manner to React. Dev Tools extension creates this object before Pillar is loaded, and if\nduring initialization of a component this object is present, Pillar will set metadata for Dev Tools\nto parse.\n"}}} \ No newline at end of file diff --git a/socket/node_modules/pillarjs/book.json b/socket/node_modules/pillarjs/book.json new file mode 100644 index 0000000..b88745d --- /dev/null +++ b/socket/node_modules/pillarjs/book.json @@ -0,0 +1,3 @@ +{ + "root": "./docs" +} diff --git a/socket/node_modules/pillarjs/dist/index.js b/socket/node_modules/pillarjs/dist/index.js new file mode 100644 index 0000000..d5d942e --- /dev/null +++ b/socket/node_modules/pillarjs/dist/index.js @@ -0,0 +1,1983 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.Pillar = factory()); +}(this, (function () { 'use strict'; + +/** Virtual DOM Node */ +function VNode() {} + +/** Global options + * @public + * @namespace options {Object} + */ +var options = { + + /** If `true`, `prop` changes trigger synchronous component updates. + * @name syncComponentUpdates + * @type Boolean + * @default true + */ + //syncComponentUpdates: true, + + /** Processes all created VNodes. + * @param {VNode} vnode A newly-created VNode to normalize/process + */ + //vnode(vnode) { } + + /** Hook invoked after a component is mounted. */ + // afterMount(component) { } + + /** Hook invoked after the DOM is updated with a component's latest render. */ + // afterUpdate(component) { } + + /** Hook invoked immediately before a component is unmounted. */ + // beforeUnmount(component) { } +}; + +var stack = []; + +var EMPTY_CHILDREN = []; + +/** JSX/hyperscript reviver +* Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0 + * @see http://jasonformat.com/wtf-is-jsx + * @public + */ +function h(nodeName, attributes) { + var children = EMPTY_CHILDREN, + lastSimple, + child, + simple, + i; + for (i = arguments.length; i-- > 2;) { + stack.push(arguments[i]); + } + if (attributes && attributes.children != null) { + if (!stack.length) stack.push(attributes.children); + delete attributes.children; + } + while (stack.length) { + if ((child = stack.pop()) && child.pop !== undefined) { + for (i = child.length; i--;) { + stack.push(child[i]); + } + } else { + if (typeof child === 'boolean') child = null; + + if (simple = typeof nodeName !== 'function') { + if (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false; + } + + if (simple && lastSimple) { + children[children.length - 1] += child; + } else if (children === EMPTY_CHILDREN) { + children = [child]; + } else { + children.push(child); + } + + lastSimple = simple; + } + } + + var p = new VNode(); + p.nodeName = nodeName; + p.children = children; + p.attributes = attributes == null ? undefined : attributes; + p.key = attributes == null ? undefined : attributes.key; + + // if a "vnode hook" is defined, pass every created VNode to it + if (options.vnode !== undefined) options.vnode(p); + + return p; +} + +/** Copy own-properties from `props` onto `obj`. + * @returns obj + * @private + */ +function extend(obj, props) { + for (var i in props) { + obj[i] = props[i]; + }return obj; +} + +/** Call a function asynchronously, as soon as possible. + * @param {Function} callback + */ +var defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout; + +function cloneElement(vnode, props) { + return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children); +} + +// DOM properties that should NOT have "px" added when numeric +var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i; + +/** Managed queue of dirty components to be re-rendered */ + +var items = []; + +function enqueueRender(component) { + if (!component._dirty && (component._dirty = true) && items.push(component) == 1) { + (options.debounceRendering || defer)(rerender); + } +} + +function rerender() { + var p, + list = items; + items = []; + while (p = list.pop()) { + if (p._dirty) renderComponent(p); + } +} + +/** Check if two nodes are equivalent. + * @param {Element} node + * @param {VNode} vnode + * @private + */ +function isSameNodeType(node, vnode, hydrating) { + if (typeof vnode === 'string' || typeof vnode === 'number') { + return node.splitText !== undefined; + } + if (typeof vnode.nodeName === 'string') { + return !node._componentConstructor && isNamedNode(node, vnode.nodeName); + } + return hydrating || node._componentConstructor === vnode.nodeName; +} + +/** Check if an Element has a given normalized name. +* @param {Element} node +* @param {String} nodeName + */ +function isNamedNode(node, nodeName) { + return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase(); +} + +/** + * Reconstruct Component-style `props` from a VNode. + * Ensures default/fallback values from `defaultProps`: + * Own-properties of `defaultProps` not present in `vnode.attributes` are added. + * @param {VNode} vnode + * @returns {Object} props + */ +function getNodeProps(vnode) { + var props = extend({}, vnode.attributes); + props.children = vnode.children; + + var defaultProps = vnode.nodeName.defaultProps; + if (defaultProps !== undefined) { + for (var i in defaultProps) { + if (props[i] === undefined) { + props[i] = defaultProps[i]; + } + } + } + + return props; +} + +/** Create an element with the given nodeName. + * @param {String} nodeName + * @param {Boolean} [isSvg=false] If `true`, creates an element within the SVG namespace. + * @returns {Element} node + */ +function createNode(nodeName, isSvg) { + var node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName); + node.normalizedNodeName = nodeName; + return node; +} + +/** Remove a child node from its parent if attached. + * @param {Element} node The node to remove + */ +function removeNode(node) { + var parentNode = node.parentNode; + if (parentNode) parentNode.removeChild(node); +} + +/** Set a named attribute on the given Node, with special behavior for some names and event handlers. + * If `value` is `null`, the attribute/handler will be removed. + * @param {Element} node An element to mutate + * @param {string} name The name/key to set, such as an event or attribute name + * @param {any} old The last value that was set for this name/node pair + * @param {any} value An attribute value, such as a function to be used as an event handler + * @param {Boolean} isSvg Are we currently diffing inside an svg? + * @private + */ +function setAccessor(node, name, old, value, isSvg) { + if (name === 'className') name = 'class'; + + if (name === 'key') { + // ignore + } else if (name === 'ref') { + if (old) old(null); + if (value) value(node); + } else if (name === 'class' && !isSvg) { + node.className = value || ''; + } else if (name === 'style') { + if (!value || typeof value === 'string' || typeof old === 'string') { + node.style.cssText = value || ''; + } + if (value && typeof value === 'object') { + if (typeof old !== 'string') { + for (var i in old) { + if (!(i in value)) node.style[i] = ''; + } + } + for (var i in value) { + node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i]; + } + } + } else if (name === 'dangerouslySetInnerHTML') { + if (value) node.innerHTML = value.__html || ''; + } else if (name[0] == 'o' && name[1] == 'n') { + var useCapture = name !== (name = name.replace(/Capture$/, '')); + name = name.toLowerCase().substring(2); + if (value) { + if (!old) node.addEventListener(name, eventProxy, useCapture); + } else { + node.removeEventListener(name, eventProxy, useCapture); + } + (node._listeners || (node._listeners = {}))[name] = value; + } else if (name !== 'list' && name !== 'type' && !isSvg && name in node) { + setProperty(node, name, value == null ? '' : value); + if (value == null || value === false) node.removeAttribute(name); + } else { + var ns = isSvg && name !== (name = name.replace(/^xlink\:?/, '')); + if (value == null || value === false) { + if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name); + } else if (typeof value !== 'function') { + if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value); + } + } +} + +/** Attempt to set a DOM property to the given value. + * IE & FF throw for certain property-value combinations. + */ +function setProperty(node, name, value) { + try { + node[name] = value; + } catch (e) {} +} + +/** Proxy an event to hooked event handlers + * @private + */ +function eventProxy(e) { + return this._listeners[e.type](options.event && options.event(e) || e); +} + +/** Queue of components that have been mounted and are awaiting componentDidMount */ +var mounts = []; + +/** Diff recursion count, used to track the end of the diff cycle. */ +var diffLevel = 0; + +/** Global flag indicating if the diff is currently within an SVG */ +var isSvgMode = false; + +/** Global flag indicating if the diff is performing hydration */ +var hydrating = false; + +/** Invoke queued componentDidMount lifecycle methods */ +function flushMounts() { + var c; + while (c = mounts.pop()) { + if (options.afterMount) options.afterMount(c); + if (c.componentDidMount) c.componentDidMount(); + } +} + +/** Apply differences in a given vnode (and it's deep children) to a real DOM Node. + * @param {Element} [dom=null] A DOM node to mutate into the shape of the `vnode` + * @param {VNode} vnode A VNode (with descendants forming a tree) representing the desired DOM structure + * @returns {Element} dom The created/mutated element + * @private + */ +function diff(dom, vnode, context, mountAll, parent, componentRoot) { + // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff) + if (!diffLevel++) { + // when first starting the diff, check if we're diffing an SVG or within an SVG + isSvgMode = parent != null && parent.ownerSVGElement !== undefined; + + // hydration is indicated by the existing element to be diffed not having a prop cache + hydrating = dom != null && !('__preactattr_' in dom); + } + + var ret = idiff(dom, vnode, context, mountAll, componentRoot); + + // append the element if its a new parent + if (parent && ret.parentNode !== parent) parent.appendChild(ret); + + // diffLevel being reduced to 0 means we're exiting the diff + if (! --diffLevel) { + hydrating = false; + // invoke queued componentDidMount lifecycle methods + if (!componentRoot) flushMounts(); + } + + return ret; +} + +/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */ +function idiff(dom, vnode, context, mountAll, componentRoot) { + var out = dom, + prevSvgMode = isSvgMode; + + // empty values (null, undefined, booleans) render as empty Text nodes + if (vnode == null || typeof vnode === 'boolean') vnode = ''; + + // Fast case: Strings & Numbers create/update Text nodes. + if (typeof vnode === 'string' || typeof vnode === 'number') { + + // update if it's already a Text node: + if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) { + /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */ + if (dom.nodeValue != vnode) { + dom.nodeValue = vnode; + } + } else { + // it wasn't a Text node: replace it with one and recycle the old Element + out = document.createTextNode(vnode); + if (dom) { + if (dom.parentNode) dom.parentNode.replaceChild(out, dom); + recollectNodeTree(dom, true); + } + } + + out['__preactattr_'] = true; + + return out; + } + + // If the VNode represents a Component, perform a component diff: + var vnodeName = vnode.nodeName; + if (typeof vnodeName === 'function') { + return buildComponentFromVNode(dom, vnode, context, mountAll); + } + + // Tracks entering and exiting SVG namespace when descending through the tree. + isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode; + + // If there's no existing element or it's the wrong type, create a new one: + vnodeName = String(vnodeName); + if (!dom || !isNamedNode(dom, vnodeName)) { + out = createNode(vnodeName, isSvgMode); + + if (dom) { + // move children into the replacement node + while (dom.firstChild) { + out.appendChild(dom.firstChild); + } // if the previous Element was mounted into the DOM, replace it inline + if (dom.parentNode) dom.parentNode.replaceChild(out, dom); + + // recycle the old element (skips non-Element node types) + recollectNodeTree(dom, true); + } + } + + var fc = out.firstChild, + props = out['__preactattr_'], + vchildren = vnode.children; + + if (props == null) { + props = out['__preactattr_'] = {}; + for (var a = out.attributes, i = a.length; i--;) { + props[a[i].name] = a[i].value; + } + } + + // Optimization: fast-path for elements containing a single TextNode: + if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) { + if (fc.nodeValue != vchildren[0]) { + fc.nodeValue = vchildren[0]; + } + } + // otherwise, if there are existing or new children, diff them: + else if (vchildren && vchildren.length || fc != null) { + innerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null); + } + + // Apply attributes/props from VNode to the DOM Element: + diffAttributes(out, vnode.attributes, props); + + // restore previous SVG mode: (in case we're exiting an SVG namespace) + isSvgMode = prevSvgMode; + + return out; +} + +/** Apply child and attribute changes between a VNode and a DOM Node to the DOM. + * @param {Element} dom Element whose children should be compared & mutated + * @param {Array} vchildren Array of VNodes to compare to `dom.childNodes` + * @param {Object} context Implicitly descendant context object (from most recent `getChildContext()`) + * @param {Boolean} mountAll + * @param {Boolean} isHydrating If `true`, consumes externally created elements similar to hydration + */ +function innerDiffNode(dom, vchildren, context, mountAll, isHydrating) { + var originalChildren = dom.childNodes, + children = [], + keyed = {}, + keyedLen = 0, + min = 0, + len = originalChildren.length, + childrenLen = 0, + vlen = vchildren ? vchildren.length : 0, + j, + c, + f, + vchild, + child; + + // Build up a map of keyed children and an Array of unkeyed children: + if (len !== 0) { + for (var i = 0; i < len; i++) { + var _child = originalChildren[i], + props = _child['__preactattr_'], + key = vlen && props ? _child._component ? _child._component.__key : props.key : null; + if (key != null) { + keyedLen++; + keyed[key] = _child; + } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) { + children[childrenLen++] = _child; + } + } + } + + if (vlen !== 0) { + for (var i = 0; i < vlen; i++) { + vchild = vchildren[i]; + child = null; + + // attempt to find a node based on key matching + var key = vchild.key; + if (key != null) { + if (keyedLen && keyed[key] !== undefined) { + child = keyed[key]; + keyed[key] = undefined; + keyedLen--; + } + } + // attempt to pluck a node of the same type from the existing children + else if (!child && min < childrenLen) { + for (j = min; j < childrenLen; j++) { + if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) { + child = c; + children[j] = undefined; + if (j === childrenLen - 1) childrenLen--; + if (j === min) min++; + break; + } + } + } + + // morph the matched/found/created DOM child to match vchild (deep) + child = idiff(child, vchild, context, mountAll); + + f = originalChildren[i]; + if (child && child !== dom && child !== f) { + if (f == null) { + dom.appendChild(child); + } else if (child === f.nextSibling) { + removeNode(f); + } else { + dom.insertBefore(child, f); + } + } + } + } + + // remove unused keyed children: + if (keyedLen) { + for (var i in keyed) { + if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false); + } + } + + // remove orphaned unkeyed children: + while (min <= childrenLen) { + if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false); + } +} + +/** Recursively recycle (or just unmount) a node and its descendants. + * @param {Node} node DOM node to start unmount/removal from + * @param {Boolean} [unmountOnly=false] If `true`, only triggers unmount lifecycle, skips removal + */ +function recollectNodeTree(node, unmountOnly) { + var component = node._component; + if (component) { + // if node is owned by a Component, unmount that component (ends up recursing back here) + unmountComponent(component); + } else { + // If the node's VNode had a ref function, invoke it with null here. + // (this is part of the React spec, and smart for unsetting references) + if (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null); + + if (unmountOnly === false || node['__preactattr_'] == null) { + removeNode(node); + } + + removeChildren(node); + } +} + +/** Recollect/unmount all children. + * - we use .lastChild here because it causes less reflow than .firstChild + * - it's also cheaper than accessing the .childNodes Live NodeList + */ +function removeChildren(node) { + node = node.lastChild; + while (node) { + var next = node.previousSibling; + recollectNodeTree(node, true); + node = next; + } +} + +/** Apply differences in attributes from a VNode to the given DOM Element. + * @param {Element} dom Element with attributes to diff `attrs` against + * @param {Object} attrs The desired end-state key-value attribute pairs + * @param {Object} old Current/previous attributes (from previous VNode or element's prop cache) + */ +function diffAttributes(dom, attrs, old) { + var name; + + // remove attributes no longer present on the vnode by setting them to undefined + for (name in old) { + if (!(attrs && attrs[name] != null) && old[name] != null) { + setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode); + } + } + + // add new & update changed attributes + for (name in attrs) { + if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) { + setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode); + } + } +} + +/** Retains a pool of Components for re-use, keyed on component name. + * Note: since component names are not unique or even necessarily available, these are primarily a form of sharding. + * @private + */ +var components = {}; + +/** Reclaim a component for later re-use by the recycler. */ +function collectComponent(component) { + var name = component.constructor.name; + (components[name] || (components[name] = [])).push(component); +} + +/** Create a component. Normalizes differences between PFC's and classful Components. */ +function createComponent(Ctor, props, context) { + var list = components[Ctor.name], + inst; + + if (Ctor.prototype && Ctor.prototype.render) { + inst = new Ctor(props, context); + Component.call(inst, props, context); + } else { + inst = new Component(props, context); + inst.constructor = Ctor; + inst.render = doRender; + } + + if (list) { + for (var i = list.length; i--;) { + if (list[i].constructor === Ctor) { + inst.nextBase = list[i].nextBase; + list.splice(i, 1); + break; + } + } + } + return inst; +} + +/** The `.render()` method for a PFC backing instance. */ +function doRender(props, state, context) { + return this.constructor(props, context); +} + +/** Set a component's `props` (generally derived from JSX attributes). + * @param {Object} props + * @param {Object} [opts] + * @param {boolean} [opts.renderSync=false] If `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering. + * @param {boolean} [opts.render=true] If `false`, no render will be triggered. + */ +function setComponentProps(component, props, opts, context, mountAll) { + if (component._disable) return; + component._disable = true; + + if (component.__ref = props.ref) delete props.ref; + if (component.__key = props.key) delete props.key; + + if (!component.base || mountAll) { + if (component.componentWillMount) component.componentWillMount(); + } else if (component.componentWillReceiveProps) { + component.componentWillReceiveProps(props, context); + } + + if (context && context !== component.context) { + if (!component.prevContext) component.prevContext = component.context; + component.context = context; + } + + if (!component.prevProps) component.prevProps = component.props; + component.props = props; + + component._disable = false; + + if (opts !== 0) { + if (opts === 1 || options.syncComponentUpdates !== false || !component.base) { + renderComponent(component, 1, mountAll); + } else { + enqueueRender(component); + } + } + + if (component.__ref) component.__ref(component); +} + +/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account. + * @param {Component} component + * @param {Object} [opts] + * @param {boolean} [opts.build=false] If `true`, component will build and store a DOM node if not already associated with one. + * @private + */ +function renderComponent(component, opts, mountAll, isChild) { + if (component._disable) return; + + var props = component.props, + state = component.state, + context = component.context, + previousProps = component.prevProps || props, + previousState = component.prevState || state, + previousContext = component.prevContext || context, + isUpdate = component.base, + nextBase = component.nextBase, + initialBase = isUpdate || nextBase, + initialChildComponent = component._component, + skip = false, + rendered, + inst, + cbase; + + // if updating + if (isUpdate) { + component.props = previousProps; + component.state = previousState; + component.context = previousContext; + if (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) { + skip = true; + } else if (component.componentWillUpdate) { + component.componentWillUpdate(props, state, context); + } + component.props = props; + component.state = state; + component.context = context; + } + + component.prevProps = component.prevState = component.prevContext = component.nextBase = null; + component._dirty = false; + + if (!skip) { + rendered = component.render(props, state, context); + + // context to pass to the child, can be updated via (grand-)parent component + if (component.getChildContext) { + context = extend(extend({}, context), component.getChildContext()); + } + + var childComponent = rendered && rendered.nodeName, + toUnmount, + base; + + if (typeof childComponent === 'function') { + // set up high order component link + + var childProps = getNodeProps(rendered); + inst = initialChildComponent; + + if (inst && inst.constructor === childComponent && childProps.key == inst.__key) { + setComponentProps(inst, childProps, 1, context, false); + } else { + toUnmount = inst; + + component._component = inst = createComponent(childComponent, childProps, context); + inst.nextBase = inst.nextBase || nextBase; + inst._parentComponent = component; + setComponentProps(inst, childProps, 0, context, false); + renderComponent(inst, 1, mountAll, true); + } + + base = inst.base; + } else { + cbase = initialBase; + + // destroy high order component link + toUnmount = initialChildComponent; + if (toUnmount) { + cbase = component._component = null; + } + + if (initialBase || opts === 1) { + if (cbase) cbase._component = null; + base = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true); + } + } + + if (initialBase && base !== initialBase && inst !== initialChildComponent) { + var baseParent = initialBase.parentNode; + if (baseParent && base !== baseParent) { + baseParent.replaceChild(base, initialBase); + + if (!toUnmount) { + initialBase._component = null; + recollectNodeTree(initialBase, false); + } + } + } + + if (toUnmount) { + unmountComponent(toUnmount); + } + + component.base = base; + if (base && !isChild) { + var componentRef = component, + t = component; + while (t = t._parentComponent) { + (componentRef = t).base = base; + } + base._component = componentRef; + base._componentConstructor = componentRef.constructor; + } + } + + if (!isUpdate || mountAll) { + mounts.unshift(component); + } else if (!skip) { + // Ensure that pending componentDidMount() hooks of child components + // are called before the componentDidUpdate() hook in the parent. + // Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750 + // flushMounts(); + + if (component.componentDidUpdate) { + component.componentDidUpdate(previousProps, previousState, previousContext); + } + if (options.afterUpdate) options.afterUpdate(component); + } + + if (component._renderCallbacks != null) { + while (component._renderCallbacks.length) { + component._renderCallbacks.pop().call(component); + } + } + + if (!diffLevel && !isChild) flushMounts(); +} + +/** Apply the Component referenced by a VNode to the DOM. + * @param {Element} dom The DOM node to mutate + * @param {VNode} vnode A Component-referencing VNode + * @returns {Element} dom The created/mutated element + * @private + */ +function buildComponentFromVNode(dom, vnode, context, mountAll) { + var c = dom && dom._component, + originalComponent = c, + oldDom = dom, + isDirectOwner = c && dom._componentConstructor === vnode.nodeName, + isOwner = isDirectOwner, + props = getNodeProps(vnode); + while (c && !isOwner && (c = c._parentComponent)) { + isOwner = c.constructor === vnode.nodeName; + } + + if (c && isOwner && (!mountAll || c._component)) { + setComponentProps(c, props, 3, context, mountAll); + dom = c.base; + } else { + if (originalComponent && !isDirectOwner) { + unmountComponent(originalComponent); + dom = oldDom = null; + } + + c = createComponent(vnode.nodeName, props, context); + if (dom && !c.nextBase) { + c.nextBase = dom; + // passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229: + oldDom = null; + } + setComponentProps(c, props, 1, context, mountAll); + dom = c.base; + + if (oldDom && dom !== oldDom) { + oldDom._component = null; + recollectNodeTree(oldDom, false); + } + } + + return dom; +} + +/** Remove a component from the DOM and recycle it. + * @param {Component} component The Component instance to unmount + * @private + */ +function unmountComponent(component) { + if (options.beforeUnmount) options.beforeUnmount(component); + + var base = component.base; + + component._disable = true; + + if (component.componentWillUnmount) component.componentWillUnmount(); + + component.base = null; + + // recursively tear down & recollect high-order component children: + var inner = component._component; + if (inner) { + unmountComponent(inner); + } else if (base) { + if (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null); + + component.nextBase = base; + + removeNode(base); + collectComponent(component); + + removeChildren(base); + } + + if (component.__ref) component.__ref(null); +} + +/** Base Component class. + * Provides `setState()` and `forceUpdate()`, which trigger rendering. + * @public + * + * @example + * class MyFoo extends Component { + * render(props, state) { + * return

              ; + * } + * } + */ +function Component(props, context) { + this._dirty = true; + + /** @public + * @type {object} + */ + this.context = context; + + /** @public + * @type {object} + */ + this.props = props; + + /** @public + * @type {object} + */ + this.state = this.state || {}; +} + +extend(Component.prototype, { + + /** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`. + * @param {object} nextProps + * @param {object} nextState + * @param {object} nextContext + * @returns {Boolean} should the component re-render + * @name shouldComponentUpdate + * @function + */ + + /** Update component state by copying properties from `state` to `this.state`. + * @param {object} state A hash of state properties to update with new values + * @param {function} callback A function to be called once component state is updated + */ + setState: function setState(state, callback) { + var s = this.state; + if (!this.prevState) this.prevState = extend({}, s); + extend(s, typeof state === 'function' ? state(s, this.props) : state); + if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback); + enqueueRender(this); + }, + + + /** Immediately perform a synchronous re-render of the component. + * @param {function} callback A function to be called after component is re-rendered. + * @private + */ + forceUpdate: function forceUpdate(callback) { + if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback); + renderComponent(this, 2); + }, + + + /** Accepts `props` and `state`, and returns a new Virtual DOM tree to build. + * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx). + * @param {object} props Props (eg: JSX attributes) received from parent element/component + * @param {object} state The component's current state + * @param {object} context Context object (if a parent component has provided context) + * @returns VNode + */ + render: function render() {} +}); + +/** Render JSX into a `parent` Element. + * @param {VNode} vnode A (JSX) VNode to render + * @param {Element} parent DOM element to render into + * @param {Element} [merge] Attempt to re-use an existing DOM tree rooted at `merge` + * @public + * + * @example + * // render a div into : + * render(
              hello!
              , document.body); + * + * @example + * // render a "Thing" component into #foo: + * const Thing = ({ name }) => { name }; + * render(, document.querySelector('#foo')); + */ +function render(vnode, parent, merge) { + return diff(merge, vnode, {}, false, parent, false); +} + +var preact = { + h: h, + createElement: h, + cloneElement: cloneElement, + Component: Component, + render: render, + rerender: rerender, + options: options +}; + + + + + +var preact_esm = Object.freeze({ + h: h, + createElement: h, + cloneElement: cloneElement, + Component: Component, + render: render, + rerender: rerender, + options: options, + default: preact +}); + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +{ + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +var invariant_1 = invariant; + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + + + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var require$$0 = ( preact_esm && preact ) || preact_esm; + +var preactMarkup = createCommonjsModule(function (module, exports) { +(function (global, factory) { + module.exports = factory(require$$0); +}(commonjsGlobal, function (preact) { var parserDoc = void 0; + + function parseMarkup(markup, type) { + var doc = void 0, + mime = type === 'html' ? 'text/html' : 'application/xml', + parserError = void 0, + wrappedMarkup = void 0, + tag = void 0; + + if (type === 'html') { + tag = 'body'; + wrappedMarkup = '\n' + markup + ''; + } else { + tag = 'xml'; + wrappedMarkup = '\n' + markup + ''; + } + + try { + doc = new DOMParser().parseFromString(wrappedMarkup, mime); + } catch (err) { + parserError = err; + } + + if (!doc && type === 'html') { + doc = parserDoc || (parserDoc = buildParserFrame()); + doc.open(); + doc.write(wrappedMarkup); + doc.close(); + } + + if (!doc) return; + + var out = doc.getElementsByTagName(tag)[0], + fc = out.firstChild; + + if (markup && !fc) { + out.error = 'Document parse failed.'; + } + + if (fc && String(fc.nodeName).toLowerCase() === 'parsererror') { + fc.removeChild(fc.firstChild); + fc.removeChild(fc.lastChild); + out.error = fc.textContent || fc.nodeValue || parserError || 'Unknown error'; + + out.removeChild(fc); + } + + return out; + } + + function buildParserFrame() { + if (document.implementation && document.implementation.createHTMLDocument) { + return document.implementation.createHTMLDocument(''); + } + var frame = document.createElement('iframe'); + frame.style.cssText = 'position:absolute; left:0; top:-999em; width:1px; height:1px; overflow:hidden;'; + frame.setAttribute('sandbox', 'allow-forms'); + document.body.appendChild(frame); + return frame.contentWindow.document; + } + + var EMPTY_OBJ$1 = {}; + + function toVdom(node, visitor, h, options) { + walk.visitor = visitor; + walk.h = h; + walk.options = options || EMPTY_OBJ$1; + return walk(node); + } + + function walk(n, index, arr) { + if (n.nodeType === 3) { + var text = 'textContent' in n ? n.textContent : n.nodeValue || ''; + + if (walk.options.trim !== false) { + var isFirstOrLast = index === 0 || index === arr.length - 1; + + if (text.match(/^[\s\n]+$/g) && walk.options.trim !== 'all') { + text = ' '; + } else { + text = text.replace(/(^[\s\n]+|[\s\n]+$)/g, walk.options.trim === 'all' || isFirstOrLast ? '' : ' '); + } + + if ((!text || text === ' ') && arr.length > 1 && isFirstOrLast) return null; + } + return text; + } + if (n.nodeType !== 1) return null; + var nodeName = String(n.nodeName).toLowerCase(); + + if (nodeName === 'script' && !walk.options.allowScripts) return null; + + var out = walk.h(nodeName, getProps(n.attributes), walkChildren(n.childNodes)); + if (walk.visitor) walk.visitor(out); + return out; + } + + function getProps(attrs) { + var len = attrs && attrs.length; + if (!len) return null; + var props = {}; + for (var i = 0; i < len; i++) { + var _attrs$i = attrs[i]; + var name = _attrs$i.name; + var value = _attrs$i.value; + + if (value === '') value = true; + if (name.substring(0, 2) === 'on' && walk.options.allowEvents) { + value = new Function(value); + } + props[name] = value; + } + return props; + } + + function walkChildren(children) { + var c = children && Array.prototype.map.call(children, walk).filter(exists); + return c && c.length ? c : null; + } + + var exists = function (x) { + return x; + }; + + var EMPTY_OBJ = {}; + + function markupToVdom(markup, type, reviver, map, options) { + var dom = parseMarkup(markup, type); + + if (dom && dom.error) { + throw new Error(dom.error); + } + + var body = dom && dom.body || dom; + visitor.map = map || EMPTY_OBJ; + var vdom = body && toVdom(body, visitor, reviver, options); + visitor.map = null; + + return vdom && vdom.children || null; + } + + function toCamelCase(name) { + return name.replace(/-(.)/g, function (match, letter) { + return letter.toUpperCase(); + }); + } + + function visitor(node) { + var name = node.nodeName.toLowerCase(), + map = visitor.map; + if (map && map.hasOwnProperty(name)) { + node.nodeName = map[name]; + node.attributes = Object.keys(node.attributes || {}).reduce(function (attrs, attrName) { + attrs[toCamelCase(attrName)] = node.attributes[attrName]; + return attrs; + }, {}); + } else { + node.nodeName = name.replace(/[^a-z0-9-]/i, ''); + } + } + + var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + + var inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + }; + + var objectWithoutProperties = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; + }; + + var possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === "object" || typeof call === "function") ? call : self; + }; + + var customReviver = void 0; + + var Markup = function (_Component) { + inherits(Markup, _Component); + + function Markup() { + classCallCheck(this, Markup); + return possibleConstructorReturn(this, _Component.apply(this, arguments)); + } + + Markup.setReviver = function setReviver(h) { + customReviver = h; + }; + + Markup.prototype.shouldComponentUpdate = function shouldComponentUpdate(_ref) { + var wrap = _ref.wrap; + var type = _ref.type; + var markup = _ref.markup; + + var p = this.props; + return wrap !== p.wrap || type !== p.type || markup !== p.markup; + }; + + Markup.prototype.setComponents = function setComponents(components) { + this.map = {}; + if (components) { + for (var i in components) { + if (components.hasOwnProperty(i)) { + var name = i.replace(/([A-Z]+)([A-Z][a-z0-9])|([a-z0-9]+)([A-Z])/g, '$1$3-$2$4').toLowerCase(); + this.map[name] = components[i]; + } + } + } + }; + + Markup.prototype.render = function render(_ref2) { + var _ref2$wrap = _ref2.wrap; + var wrap = _ref2$wrap === undefined ? true : _ref2$wrap; + var type = _ref2.type; + var markup = _ref2.markup; + var components = _ref2.components; + var reviver = _ref2.reviver; + var onError = _ref2.onError; + var allowScripts = _ref2['allow-scripts']; + var allowEvents = _ref2['allow-events']; + var trim = _ref2.trim; + var props = objectWithoutProperties(_ref2, ['wrap', 'type', 'markup', 'components', 'reviver', 'onError', 'allow-scripts', 'allow-events', 'trim']); + + var h = reviver || this.reviver || this.constructor.prototype.reviver || customReviver || preact.h, + vdom = void 0; + + this.setComponents(components); + + var options = { + allowScripts: allowScripts, + allowEvents: allowEvents, + trim: trim + }; + + try { + vdom = markupToVdom(markup, type, h, this.map, options); + } catch (error) { + if (onError) { + onError({ error: error }); + } else if (typeof console !== 'undefined' && console.error) { + console.error('preact-markup: ' + error); + } + } + + if (wrap === false) return vdom && vdom[0] || null; + + var c = props.hasOwnProperty('className') ? 'className' : 'class', + cl = props[c]; + if (!cl) props[c] = 'markup';else if (cl.splice) cl.splice(0, 0, 'markup');else if (typeof cl === 'string') props[c] += ' markup';else if (typeof cl === 'object') cl.markup = true; + + return h('div', props, vdom || null); + }; + + return Markup; + }(preact.Component); + + return Markup; + +})); + +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; +}; + + + + + + + + + + + +var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +var createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + + + + + + + +var _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + + + +var inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +}; + + + + + + + + + + + +var possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === "object" || typeof call === "function") ? call : self; +}; + +/** + * Minimal implementation of Mustache templates + * Taken from https://github.com/aishikaty/tiny-mustache + */ +/* eslint-disable */ +function mustache(template, self, parent, invert) { + var render = mustache; + var output = ''; + var i = void 0; + + function get$$1(ctx, path) { + path = path.pop ? path : path.split('.'); + ctx = ctx[path.shift()] || ''; + return 0 in path ? get$$1(ctx, path) : ctx; + } + + self = Array.isArray(self) ? self : self ? [self] : []; + self = invert ? 0 in self ? [] : [1] : self; + + for (i = 0; i < self.length; i++) { + var childCode = ''; + var depth = 0; + var inverted; + var ctx = _typeof(self[i]) === 'object' ? self[i] : {}; + ctx = Object.assign({}, parent, ctx); + ctx[''] = { '': self[i] }; + + template.replace(/([\s\S]*?)({{((\/)|(\^)|#)(.*?)}}|$)/g, function (match, code, y, z, close, invert, name) { + if (!depth) { + output += code.replace(/{{{(.*?)}}}|{{(!?)(&?)(>?)(.*?)}}/g, function (match, raw, comment, isRaw, partial, name) { + return raw ? get$$1(ctx, raw) : isRaw ? get$$1(ctx, name) : partial ? render(get$$1(ctx, name), ctx) : !comment ? new Option(get$$1(ctx, name)).innerHTML : ''; + }); + inverted = invert; + } else { + childCode += depth && !close || depth > 1 ? match : code; + } + if (close) { + if (! --depth) { + name = get$$1(ctx, name); + if (/^f/.test(typeof name === 'undefined' ? 'undefined' : _typeof(name))) { + output += name.call(ctx, childCode, function (template) { + return render(template, ctx); + }); + } else { + output += render(childCode, name, ctx, inverted); + } + childCode = ''; + } + } else { + ++depth; + } + }); + } + return output; +} + +// This is used for emptying VDOM +var Null = function Null() { + return null; +}; + +/* eslint-disable no-underscore-dangle */ + +var PillarBaseElement = function (_HTMLElement) { + inherits(PillarBaseElement, _HTMLElement); + + function PillarBaseElement() { + var _ref; + + var _temp, _this, _ret; + + classCallCheck(this, PillarBaseElement); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = PillarBaseElement.__proto__ || Object.getPrototypeOf(PillarBaseElement)).call.apply(_ref, [this].concat(args))), _this), _this.props = { + flags: {} + }, _temp), possibleConstructorReturn(_this, _ret); + } + + createClass(PillarBaseElement, [{ + key: 'convertToVdom', + + + /** + * Convert to VDOM + * + * @description Converts given HTML node into a Virtual DOM node + * @param {HTMLElement} element - Element to convert + * @param {VNode} [node] - Virtual dom node + * @returns {PillarConnectedComponent} + * @memberof Pillar + */ + value: function convertToVdom(element, node) { + if (element.nodeType === 3) return element.nodeValue; + if (element.nodeType !== 1) return null; + + var attributes = element.attributes, + childNodes = element.childNodes; + + var children = []; + + this.mapAttributesToProps(attributes); + + // If we're not using children as placeholder, go through child nodes and parse them too + if (!this.props.flags.ignoreChildren) { + for (var i = 0; i < childNodes.length; i += 1) { + children[i] = this.convertToVdom(childNodes[i], null, true); + } + } + + // @REFACTOR? This feels dirty. If not using Shadow DOM, + // existing children are appended to, instead of being overwritten by VDOM render. + // This works fine, but we need to investigate for a better way to do it. + if (!this.useShadow) { + for (var _i = 0; _i < childNodes.length; _i += 1) { + element.removeChild(childNodes[_i]); + } + } + + var ConnectedComponent = void 0; + if (node) { + ConnectedComponent = this.connectAttrsToProps(node); + } else { + ConnectedComponent = element.nodeName.toLowerCase(); + } + + var componentProps = node ? this.props : null; + + return h( + ConnectedComponent, + componentProps, + children + ); + } + + /** + * Map attributes to props + * + * @description Goes through element's attributes and maps them to `this.props` and `this.flags` + * @param {NamedNodeMap} attributes + * @memberof PillarBaseElement + */ + + }, { + key: 'mapAttributesToProps', + value: function mapAttributesToProps(attributes) { + for (var i = 0; i < attributes.length; i += 1) { + invariant_1(attributes[i].name !== 'flags', 'Attribute "flags" is reserved'); + if (attributes[i].name.indexOf('p:') === -1) { + // Map attributes to props + var name = PillarBaseElement.dashToCamel(attributes[i].name); + this.props[name] = attributes[i].value; + } else { + // Map flags separately + var flagName = PillarBaseElement.dashToCamel(attributes[i].name.replace('p:', '')); + this.props.flags[flagName] = attributes[i].value || true; // UIKit-style implicit boolean + } + } + } + + // Fires when custom element creates + + }, { + key: 'connectedCallback', + value: function connectedCallback() { + this.initialize(); + } + + // Fires when custom element is destroyed + + }, { + key: 'disconnectedCallback', + value: function disconnectedCallback() { + render(h(Null, null), this.shadow || this, this.root); + } + + /** + * Initialize + * @description Initialize Pillar web component + * @memberof Pillar + */ + + }, { + key: 'initialize', + value: function initialize() { + var _this2 = this; + + this.observer = new MutationObserver(function (mutations) { + if (_this2.props.flags.protected) { + // Lock external mutations + invariant_1(false, 'Attempting to change attributes of protected component.'); + // @TODO Revert attributes? + } else { + var newProps = []; + mutations.forEach(function (mutation) { + var attributeName = mutation.attributeName; + + newProps.push({ + name: attributeName, + value: _this2.attributes[attributeName] ? _this2.attributes[attributeName].value : null + }); + }); + + _this2.mapAttributesToProps(newProps); + + if (_this2.passPropsToVdom) { + _this2.passPropsToVdom(_this2.props); + if (_this2.__pillar__) { + // Wait till it's for sure rendered, then pass it to dev tools + setTimeout(function () { + return _this2.hookToDevTools(_this2.__pillar__); + }, 200); + } + } + } + }); + + // Activate observer + this.observer.observe(this, { attributes: true, attributeOldValue: true }); + + if (this.useShadow) { + invariant_1(this.useShadow === 'open' || this.useShadow === 'closed', 'Shadow DOM mode is expected to be "open" or "closed", but got %s', this.useShadow); + this.shadow = this.attachShadow({ mode: this.useShadow }); + } + + var snapshot = void 0; + try { + snapshot = this.vdomComponent(this.props); + } catch (e) { + // VDOM component is a class, so moving on + } + + if (this.vdomComponent.prototype.render || (typeof snapshot === 'undefined' ? 'undefined' : _typeof(snapshot)) === 'object') { + this.renderComponent(); + } else if (typeof snapshot === 'string') { + if (snapshot.charAt(0) === '#') { + this.renderTemplate(snapshot.slice(1)); + } else { + this.renderString(); + } + } else { + invariant_1(false, 'Component must return a JSX element, HTML string or template ID.'); + } + } + + /** + * Connect element attributes to props + * + * @description Creates a higher order component that makes element's attributes + * available in wrapped component's 'this.props', allowing reacting + * to their changes via 'componentWillReceiveProps'. + * @param {PillarComponent} WrappedComponent + * @returns {PillarConnectedComponent} + * @memberof PillarBaseElement + */ + + }, { + key: 'connectAttrsToProps', + value: function connectAttrsToProps(WrappedComponent) { + var element = this; + + // Higher order component to link props to the outside world + return function (_Component) { + inherits(PillarConnectedComponent, _Component); + + function PillarConnectedComponent() { + classCallCheck(this, PillarConnectedComponent); + + var _this3 = possibleConstructorReturn(this, (PillarConnectedComponent.__proto__ || Object.getPrototypeOf(PillarConnectedComponent)).call(this)); + + element.passPropsToVdom = _this3.reinsertProps.bind(_this3); + return _this3; + } + + /** + * Reinsert props + * + * @description Updates props from attributes and triggers re-render of wrapped component + * @param {object} attrProps + */ + + + createClass(PillarConnectedComponent, [{ + key: 'reinsertProps', + value: function reinsertProps(attrProps) { + this.setState(_extends({}, this.state, { + attrProps: attrProps + })); + } + }, { + key: 'render', + value: function render$$1() { + return h(WrappedComponent, _extends({}, this.props, this.state.attrProps)); + } + }]); + return PillarConnectedComponent; + }(Component); + } + + /** + * DevTools Hook + * + * @description Hook created element to Pillar DevTools plugin if it exists + * @memberof PillarBaseElement + */ + + }, { + key: 'hookToDevTools', + value: function hookToDevTools(existingId) { + if (window.__PILLAR_DEVTOOLS_HOOK__) { + console.log('HOOK', existingId, this.__pillar__); + var id = existingId || Math.random().toString(36).slice(2); + + window.__PILLAR_DEVTOOLS_HOOK__.elements[id] = { + name: this.localName, + props: this.props, + useShadow: this.useShadow, + innerHTML: this.useShadow ? this.shadow.innerHTML : this.innerHTML, + outerHTML: this.useShadow ? this.shadow.outerHTML : this.outerHTML + }; + + if (!window.__PILLAR_DEVTOOLS_HOOK__.attached) { + window.__PILLAR_DEVTOOLS_HOOK__.attached = true; + } + + if (!existingId) { + this.__pillar__ = id; + } else { + window.postMessage({ type: 'PILLAR_UPDATE' }, '*'); + } + } + } + + /** + * Render component + * + * @description Render JSX component. NOTE: This method is only called once. + * @memberof PillarBaseElement + */ + + }, { + key: 'renderComponent', + value: function renderComponent() { + this.root = render(this.convertToVdom(this, this.vdomComponent), this.shadow || this, this.root); + + this.hookToDevTools(); + } + + /** + * Render string + * + * @description Render contents of an HTML string. NOTE: This method is only called once. + * @memberof PillarBaseElement + */ + + }, { + key: 'renderString', + value: function renderString() { + var _this4 = this; + + this.mapAttributesToProps(this.attributes); + this.innerHTML = null; + this.root = render(h(preactMarkup, { markup: this.vdomComponent(this.props) }), this.shadow || this); + this.passPropsToVdom = function (props) { + render(h(preactMarkup, { markup: _this4.vdomComponent(props) }), _this4.shadow || _this4, _this4.root); + }; + + this.hookToDevTools(); + } + + /** + * Render Template + * + * + * @description Render template tag's content. NOTE: This method is only called once. + * @param {any} id - ID of a template tag + * @memberof PillarBaseElement + */ + + }, { + key: 'renderTemplate', + value: function renderTemplate(id) { + var _this5 = this; + + // Get an HTML string for running through Mustache + var template = document.getElementById(id).innerHTML; + + this.mapAttributesToProps(this.attributes); + this.innerHTML = null; + + this.root = render(h(preactMarkup, { markup: mustache(template, this.props), 'allow-scripts': this.allowScripts }), this.shadow || this); + + this.passPropsToVdom = function (props) { + render(h(preactMarkup, { markup: mustache(template, props), 'allow-scripts': _this5.allowScripts }), _this5.shadow || _this5, _this5.root); + }; + + this.hookToDevTools(); + } + }], [{ + key: 'dashToCamel', + + /** + * Dash to Camel case + * + * @description Convert dash-cased-string to camelCasedString + * @static + * @param {string} dash - string to convert + * @returns {string} + * @memberof Pillar + */ + value: function dashToCamel(dash) { + return dash.indexOf('-') < 0 ? dash : dash.toLowerCase().replace(/-[aA-zZ]/g, function (m) { + return m[1].toUpperCase(); + }); + } + + /** + * Camel to Dash case + * + * @description Convert camelCasedString to dash-cased-string + * @static + * @param {string} camel - string to convert + * @returns {string} + * @memberof Pillar + */ + + }, { + key: 'camelToDash', + value: function camelToDash(camel) { + return camel.replace(/([A-Z])/g, '-$1').toLowerCase(); + } + }]); + return PillarBaseElement; +}(HTMLElement); + +var Pillar = function (_Component) { + inherits(Pillar, _Component); + createClass(Pillar, null, [{ + key: 'register', + + /** + * Register tag + * + * @description Register custom element as an HTML tag with the name specified + * @static + * @param {any} tagName - Name of an HTML tag to register + * @param {Pillar} TargetComponent - Component to register as a tag + * @memberof Pillar + */ + value: function register(TargetComponent, tagName) { + var elementOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + if (typeof TargetComponent === 'string') { + Pillar.invariant(tagName, 'When using a template tag, you need to explicitly define tag name to register'); + } + var elementName = tagName || PillarBaseElement.camelToDash(TargetComponent.name).slice(1); + + Pillar.invariant(!window.customElements.get(elementName), 'Element "' + tagName + '" has already been defined. You can only define element once.'); + Pillar.invariant(TargetComponent, 'You need to pass the component to create element from.'); + + // Define custom element + window.customElements.define(elementName, Pillar.createElement(TargetComponent, elementOptions)); + } + }, { + key: 'createElement', + value: function createElement(TargetComponent, elementOptions) { + return function (_PillarBaseElement) { + inherits(PillarElement, _PillarBaseElement); + + function PillarElement() { + classCallCheck(this, PillarElement); + + var _this2 = possibleConstructorReturn(this, (PillarElement.__proto__ || Object.getPrototypeOf(PillarElement)).call(this)); + + Object.assign(_this2, elementOptions); // Extend "this" with options + Pillar.invariant(typeof TargetComponent === 'string' || typeof TargetComponent === 'function', 'Register method requires a component or template tag ID, but found unexpected %s', typeof TargetComponent === 'undefined' ? 'undefined' : _typeof(TargetComponent)); + if (typeof TargetComponent === 'string') { + _this2.vdomComponent = function () { + return TargetComponent; + }; + } else { + _this2.vdomComponent = TargetComponent; + } + return _this2; + } + + return PillarElement; + }(PillarBaseElement); + } + }]); + + function Pillar(props, state) { + classCallCheck(this, Pillar); + + var _this = possibleConstructorReturn(this, (Pillar.__proto__ || Object.getPrototypeOf(Pillar)).call(this, props, state)); + + _this.validateRender(); + + _this.flags = _this.props ? _this.props.flags : {}; + if (_this.componentWillReceiveProps) { + var originalHandler = _this.componentWillReceiveProps.bind(_this); + _this.componentWillReceiveProps = function (nextProps, nextState) { + _this.flags = nextProps.flags; + originalHandler(nextProps, nextState); + }; + } else { + _this.componentWillReceiveProps = function (nextProps) { + _this.flags = nextProps.flags; + }; + } + return _this; + } + + /** + * Validate render method + * @description Makes sure there's only one render method and it's actually a method + * @memberof Pillar + */ + + + createClass(Pillar, [{ + key: 'validateRender', + value: function validateRender() { + Pillar.invariant(typeof this.render === 'function', 'render() is expected to be a function, but got a type "%s"', _typeof(this.render)); + } + }]); + return Pillar; +}(Component); + +Pillar.invariant = invariant_1; +Pillar.h = h; + + +Pillar.register(function (_ref) { + var text = _ref.text; + return h( + 'h1', + null, + text + ); +}, 'custom-header'); + +return Pillar; + +}))); diff --git a/socket/node_modules/pillarjs/docs/1_LIFECYCLE_METHODS.md b/socket/node_modules/pillarjs/docs/1_LIFECYCLE_METHODS.md new file mode 100644 index 0000000..335f2e1 --- /dev/null +++ b/socket/node_modules/pillarjs/docs/1_LIFECYCLE_METHODS.md @@ -0,0 +1,18 @@ +# Lifecycle Methods + +Pillar provides exact same lifecycle methods as +[React](https://reactjs.org/docs/react-component.html#the-component-lifecycle): + +| Method Name | When is it called? | +| --------------------------- | ----------------------------------------------------------- | +| `componentWillMount` | Before the component gets mounted to the DOM | +| `componentDidMount` | After the component gets mounted to the DOM | +| `componentWillUnmount` | Before component is removed from the DOM | +| `componentWillReceiveProps` | Before new props are accepted | +| `shouldComponentUpdate` | Before render() is called. Return `false` to prevent render | +| `componentWillUpdate` | Before render() | +| `componentDidUpdate` | After render() | + +_**Note:** Lifecycle methods don't work in stateless components and string/template tag render._ + +**_Next: [Render from string →](./2_STRING_RENDER.html)_** diff --git a/socket/node_modules/pillarjs/docs/2_STRING_RENDER.md b/socket/node_modules/pillarjs/docs/2_STRING_RENDER.md new file mode 100644 index 0000000..68874de --- /dev/null +++ b/socket/node_modules/pillarjs/docs/2_STRING_RENDER.md @@ -0,0 +1,23 @@ +# Rendering from string + +If for any reason you don't want to use JSX, you can render component from string or template tag. + +Rendering from string is extremely simple. The syntax is very similar to +[stateless components](/#stateless-components), but instead of returning JSX your function should +return a string: + +```javascript +const SuperHeader = ({ text }) => ` +
              +

              ${text}

              +

              It's Superpowered!

              +
              +`; +``` + +Your component function will have the `props` argument that you can use for interpolation (i.e. via +ES6 template string). + +_Note that string render doesn't support state and lifecycle methods._ + +**_Next: [Render from template tag →](./3_TEMPLATE_RENDER.html)_** diff --git a/socket/node_modules/pillarjs/docs/3_TEMPLATE_RENDER.md b/socket/node_modules/pillarjs/docs/3_TEMPLATE_RENDER.md new file mode 100644 index 0000000..d8ed7d8 --- /dev/null +++ b/socket/node_modules/pillarjs/docs/3_TEMPLATE_RENDER.md @@ -0,0 +1,43 @@ +# Rendering from template tag + +Pillar allows rendering components from HTML `