From af4ab07edbc613865f79d3556123d606eaa1846e Mon Sep 17 00:00:00 2001 From: rozetko Date: Mon, 21 May 2018 17:49:49 +0300 Subject: [PATCH] Add src --- .gitignore | 3 + README.md | 29 + REST.md | 198 ++ server/README.md | 27 + server/build/dev-server.js | 10 + server/build/webpack.base.conf.js | 52 + server/build/webpack.dev.conf.js | 4 + server/build/webpack.prod.conf.js | 3 + server/package-lock.json | 5093 +++++++++++++++++++++++++++ server/package.json | 32 + server/src/config.ts | 9 + server/src/index.ts | 31 + server/src/routes/alerts.ts | 62 + server/src/routes/anomalies.ts | 136 + server/src/routes/segments.ts | 80 + server/src/services/alerts.ts | 58 + server/src/services/analytics.ts | 141 + server/src/services/anomalyType.ts | 117 + server/src/services/json.ts | 55 + server/src/services/metrics.ts | 27 + server/src/services/notification.ts | 140 + server/src/services/segments.ts | 75 + server/tsconfig.json | 10 + src/.gitignore | 11 + src/add_anomaly.py | 5 + src/anomaly_model.py | 157 + src/data_preprocessor.py | 255 ++ src/data_provider.py | 220 ++ src/learn.py | 52 + src/pattern_detection_model.py | 127 + src/peaks_detector.py | 71 + src/predict.py | 83 + src/prophet_algorithm.py | 46 + src/step_detect.py | 231 ++ src/step_detector.py | 188 + src/supervised_algorithm.py | 71 + src/worker.py | 131 + 37 files changed, 8040 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 REST.md create mode 100644 server/README.md create mode 100644 server/build/dev-server.js create mode 100644 server/build/webpack.base.conf.js create mode 100644 server/build/webpack.dev.conf.js create mode 100644 server/build/webpack.prod.conf.js create mode 100644 server/package-lock.json create mode 100644 server/package.json create mode 100644 server/src/config.ts create mode 100644 server/src/index.ts create mode 100644 server/src/routes/alerts.ts create mode 100644 server/src/routes/anomalies.ts create mode 100644 server/src/routes/segments.ts create mode 100644 server/src/services/alerts.ts create mode 100644 server/src/services/analytics.ts create mode 100644 server/src/services/anomalyType.ts create mode 100644 server/src/services/json.ts create mode 100644 server/src/services/metrics.ts create mode 100644 server/src/services/notification.ts create mode 100644 server/src/services/segments.ts create mode 100644 server/tsconfig.json create mode 100644 src/.gitignore create mode 100644 src/add_anomaly.py create mode 100644 src/anomaly_model.py create mode 100644 src/data_preprocessor.py create mode 100644 src/data_provider.py create mode 100644 src/learn.py create mode 100644 src/pattern_detection_model.py create mode 100644 src/peaks_detector.py create mode 100644 src/predict.py create mode 100644 src/prophet_algorithm.py create mode 100644 src/step_detect.py create mode 100644 src/step_detector.py create mode 100644 src/supervised_algorithm.py create mode 100644 src/worker.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8617652 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..0fb5bae --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Hastic server + +Implementation of basic pattern recognition and unsupervised learning for anomamaly detection. + +Implementation of analytic unit for Hastic. +see [REST API](REST.md) + +## Build & run + +### Analytic unit + +Python3 project + +``` +pip3 install pandas +pip3 install influxdb + +``` + +### Server + +Node.js project + +``` +cd server +npm install +npm run build +npm start +``` diff --git a/REST.md b/REST.md new file mode 100644 index 0000000..e7e676c --- /dev/null +++ b/REST.md @@ -0,0 +1,198 @@ +# Hastic server REST API + +## /anomalies + +### Get anomalies +`GET /anomalies?id=[&name=]` + +NOTE: `name` param is deprecated, use `id` instead + +Return data format: + +``` +{ + "name": "", + "metric": "", + "status": "" +} +``` + +status field can be one of: + +- `learning` +- `ready` +- `failed` + +### Get anomaly status +`GET /anomalies/status?id=[&name=]` + +NOTE: `name` param is deprecated, use `id` instead + +Return data format: + +``` +{ + "status": +} +``` + +status field can be one of: + +- `learning` +- `ready` +- `failed` + +### Add anomaly + +`POST /anomalies` + +Data format: + +``` +{ + "name": "cpu_utilization_supervised", + "metric": { + "datasource": "influx accelerometer", + "targets": [ + + ] + }, + "panelUrl": "http://grafana.example.com/d/oNZ35bWiz/new-dashboard-copy?panelId=2&fullscreen" +} +``` + +`targets` example: + +``` +{ + "alias": "command", + "groupBy": [], + "measurement": "data", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "command" + ], + "type": "field" + } + ] + ], + "tags": [] +} +``` + +Return data format: + +``` +{ + "anomaly_id": "" +} +``` + +### Delete anpmalies +`DELETE /anomalies` + +Data format: + +``` +{ + "id": "", + "name": "" // deprecated, use id instead +} +``` + +Return data format: + +``` +Success +``` + +## /segments + +### Get segments +`GET /segments?anomaly_id=[&last_segment=][&from=][&to=]` + +Return data format: + +``` +{ + "segments": [ + { + "id": 0, + "start": 1392765184318, + "finish": 1397243699000, + "labeled": true + }, + ... + ] +} +``` + +### Update segments + +`PATCH /segments` + +Data format: + +``` +{ + "anomaly_id": "", + "name": "", // deprecated, use id instead + "added_segments": [ + { + "start": 1397164656000, + "finish": 1397243699000 + }, + ... + ], + "removed_segments": [3, 9] +} +``` + +Return data format: + +``` +{ + "added_ids": [12, ...] +} +``` + +## /alerts + +### Check if alert is enabled for anomaly + +`GET /alerts?anomaly_id=` + +Return data format: + +``` +{ + "enable": true +} +``` + +### Enable / disable alert for anomaly + +`POST /alerts` + +Data format: + +``` +{ + "anomaly_id": "", + "enable": true +} +``` + +Return data format: + +``` +{ + "status": "Ok" +} +``` diff --git a/server/README.md b/server/README.md new file mode 100644 index 0000000..882cfdb --- /dev/null +++ b/server/README.md @@ -0,0 +1,27 @@ +# Hastic server + +REST server for managing data for analytics. + +Running on 8000 port. + +# Build + +``` +npm install +npm run build +``` + +# Run + +``` +npm start +``` + +# Development + +You should have `nodemon` module installed to run development server. + +``` +npm i -g nodemon +npm run dev +``` diff --git a/server/build/dev-server.js b/server/build/dev-server.js new file mode 100644 index 0000000..76ed9d3 --- /dev/null +++ b/server/build/dev-server.js @@ -0,0 +1,10 @@ +const { spawn } = require('child_process'); + +const webpack = spawn('webpack', ['--config', 'build/webpack.dev.conf.js'], { + stdio: 'inherit', + shell: true +}); +//webpack.stdout.pipe(process.stdout); + +const nodemon = spawn('nodemon', ['../dist/server', '--watch', 'server.js']); +nodemon.stdout.pipe(process.stdout); diff --git a/server/build/webpack.base.conf.js b/server/build/webpack.base.conf.js new file mode 100644 index 0000000..b910b69 --- /dev/null +++ b/server/build/webpack.base.conf.js @@ -0,0 +1,52 @@ +const path = require('path'); +const fs = require('fs'); + +const webpack = require('webpack'); + + +function resolve(p) { + return path.join(__dirname, '/../', p); +} + +module.exports = { + target: 'node', + node: { + __dirname: false, + __filename: false, + }, + context: resolve('./src'), + entry: './index', + devtool: 'inline-source-map', + output: { + filename: "server.js", + path: resolve('dist') + }, + externals: [ + function(context, request, callback) { + if(request[0] == '.') { + callback(); + } else { + callback(null, "require('" + request + "')"); + } + } + ], + plugins: [ + new webpack.optimize.OccurrenceOrderPlugin(), + new webpack.HotModuleReplacementPlugin(), + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify('development') + }) + ], + resolve: { + extensions: [".ts", ".js"] + }, + module: { + rules: [ + { + test: /\.ts$/, + loader: "ts-loader", + exclude: /node_modules/ + } + ] + } +} diff --git a/server/build/webpack.dev.conf.js b/server/build/webpack.dev.conf.js new file mode 100644 index 0000000..7be3655 --- /dev/null +++ b/server/build/webpack.dev.conf.js @@ -0,0 +1,4 @@ +var base = require('./webpack.base.conf'); + +base.watch = true; +module.exports = base; \ No newline at end of file diff --git a/server/build/webpack.prod.conf.js b/server/build/webpack.prod.conf.js new file mode 100644 index 0000000..b5b325e --- /dev/null +++ b/server/build/webpack.prod.conf.js @@ -0,0 +1,3 @@ +var base = require('./webpack.base.conf'); + +module.exports = base; \ No newline at end of file diff --git a/server/package-lock.json b/server/package-lock.json new file mode 100644 index 0000000..1484146 --- /dev/null +++ b/server/package-lock.json @@ -0,0 +1,5093 @@ +{ + "name": "hastic-server", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/body-parser": { + "version": "1.16.8", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz", + "integrity": "sha512-BdN2PXxOFnTXFcyONPW6t0fHjz2fvRZHVMFpaS0wYr+Y8fWEaNOs4V8LEu/fpzQlMx+ahdndgTaGTwPC+J/EeA==", + "dev": true, + "requires": { + "@types/express": "4.11.1", + "@types/node": "9.6.6" + } + }, + "@types/events": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==", + "dev": true + }, + "@types/express": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.1.tgz", + "integrity": "sha512-ttWle8cnPA5rAelauSWeWJimtY2RsUf2aspYZs7xPHiWgOlPn6nnUfBMtrkcnjFJuIHJF4gNOdVvpLK2Zmvh6g==", + "dev": true, + "requires": { + "@types/body-parser": "1.16.8", + "@types/express-serve-static-core": "4.11.1", + "@types/serve-static": "1.13.1" + } + }, + "@types/express-serve-static-core": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz", + "integrity": "sha512-EehCl3tpuqiM8RUb+0255M8PhhSwTtLfmO7zBBdv0ay/VTd/zmrqDfQdZFsa5z/PVMbH2yCMZPXsnrImpATyIw==", + "dev": true, + "requires": { + "@types/events": "1.2.0", + "@types/node": "9.6.6" + } + }, + "@types/mime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", + "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==", + "dev": true + }, + "@types/node": { + "version": "9.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.6.tgz", + "integrity": "sha512-SJe0g5cZeGNDP5sD8mIX3scb+eq8LQQZ60FXiKZHipYSeEFZ5EKml+NNMiO76F74TY4PoMWlNxF/YRY40FOvZQ==" + }, + "@types/serve-static": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-jDMH+3BQPtvqZVIcsH700Dfi8Q3MIcEx16g/VdxjoqiGR/NntekB10xdBpirMKnPe9z2C5cBmL0vte0YttOr3Q==", + "dev": true, + "requires": { + "@types/express-serve-static-core": "4.11.1", + "@types/mime": "2.0.0" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "2.1.18", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "dev": true, + "requires": { + "acorn": "4.0.13" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, + "ajv": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", + "dev": true, + "requires": { + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1", + "uri-js": "3.0.2" + } + }, + "ajv-keywords": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", + "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "2.1.1" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "3.1.10", + "normalize-path": "2.1.1" + } + }, + "arguments-extended": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/arguments-extended/-/arguments-extended-0.0.3.tgz", + "integrity": "sha1-YQfkkX0OtvCk3WYyD8Fa/HLvSUY=", + "requires": { + "extended": "0.0.6", + "is-extended": "0.0.10" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-extended": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/array-extended/-/array-extended-0.0.11.tgz", + "integrity": "sha1-1xRK50jek8pybxIQCdv/FibRZL0=", + "requires": { + "arguments-extended": "0.0.3", + "extended": "0.0.6", + "is-extended": "0.0.10" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", + "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.2", + "http-errors": "1.6.3", + "iconv-lite": "0.4.19", + "on-finished": "2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "1.6.16" + } + }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.4.0", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "1.2.0", + "browserify-des": "1.0.1", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.6" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "1.0.6" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "1.3.0", + "ieee754": "1.1.11", + "isarray": "1.0.0" + } + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "chokidar": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "fsevents": "1.1.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.0.4" + } + }, + "ci-info": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "configstore": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "dev": true, + "requires": { + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.2.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.1.tgz", + "integrity": "sha512-iZvCCg8XqHQZ1ioNBTzXS/cQSkqkqcPs8xSX4upNB+DAk9Ht3uzQf2J32uAHNCne8LDmKr29AgZrEs4oIrwLuQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.14", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.42" + } + }, + "date-extended": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/date-extended/-/date-extended-0.0.6.tgz", + "integrity": "sha1-I4AtV90b94GIE/4MMuhRqG2iZ8k=", + "requires": { + "array-extended": "0.0.11", + "extended": "0.0.6", + "is-extended": "0.0.10" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "declare.js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/declare.js/-/declare.js-0.0.8.tgz", + "integrity": "sha1-BHit/5VkwAT1Hfc9i8E0AZ0o3N4=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "object-assign": "4.1.1", + "tapable": "0.2.8" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "1.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "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 + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42" + } + }, + "event-stream": { + "version": "3.3.4", + "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "requires": { + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", + "pause-stream": "0.0.11", + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" + } + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "express": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "requires": { + "accepts": "1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "1.1.2", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "2.0.3", + "qs": "6.5.1", + "range-parser": "1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "1.4.0", + "type-is": "1.6.16", + "utils-merge": "1.0.1", + "vary": "1.1.2" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "extended": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/extended/-/extended-0.0.6.tgz", + "integrity": "sha1-f7i/e52uOXWG5IVwrP1kLHjlBmk=", + "requires": { + "extender": "0.0.10" + } + }, + "extender": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/extender/-/extender-0.0.10.tgz", + "integrity": "sha1-WJwHSCvmGhRgttgfnCSqZ+jzJM0=", + "requires": { + "declare.js": "0.0.8" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "fast-csv": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-2.4.1.tgz", + "integrity": "sha1-vX3SaDkfcpNntZRFuN0K0CaIGyY=", + "requires": { + "extended": "0.0.6", + "is-extended": "0.0.10", + "object-extended": "0.0.7", + "string-extended": "0.0.8" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.4.0", + "unpipe": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "1.3.5" + } + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": "1.4.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "ieee754": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==", + "dev": true + }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ipaddr.js": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-ci": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "dev": true, + "requires": { + "ci-info": "1.1.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extended": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/is-extended/-/is-extended-0.0.10.tgz", + "integrity": "sha1-JE4UDfdbscmjEG9BL/GC+1NKbWI=", + "requires": { + "extended": "0.0.6" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "dev": true, + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "4.0.1" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", + "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "dev": true, + "requires": { + "pify": "3.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "1.0.1" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "0.1.7", + "readable-stream": "2.3.6" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "node-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", + "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true, + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.1", + "string_decoder": "1.1.1", + "timers-browserify": "2.0.10", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "nodemon": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.17.3.tgz", + "integrity": "sha512-8AtS+wA5u6qoE12LONjqOzUzxAI5ObzSw6U5LgqpaO/0y6wwId4l5dN0ZulYyYdpLZD1MbkBp7GjG1hqaoRqYg==", + "dev": true, + "requires": { + "chokidar": "2.0.3", + "debug": "3.1.0", + "ignore-by-default": "1.0.1", + "minimatch": "3.0.4", + "pstree.remy": "1.1.0", + "semver": "5.5.0", + "supports-color": "5.4.0", + "touch": "3.1.0", + "undefsafe": "2.0.2", + "update-notifier": "2.5.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1.1.1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "object-extended": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/object-extended/-/object-extended-0.0.7.tgz", + "integrity": "sha1-hP0j9WsVWCrrPoiwXLVdJDLWijM=", + "requires": { + "array-extended": "0.0.11", + "extended": "0.0.6", + "is-extended": "0.0.10" + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.2.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.5.0" + } + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.14" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "dev": true, + "requires": { + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "proxy-addr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", + "requires": { + "forwarded": "0.1.2", + "ipaddr.js": "1.6.0" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "ps-tree": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", + "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", + "dev": true, + "requires": { + "event-stream": "3.3.4" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "pstree.remy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.0.tgz", + "integrity": "sha512-q5I5vLRMVtdWa8n/3UEzZX7Lfghzrg9eG2IKk2ENLSofKRCXVqMvMUHxCKgXNaqH/8ebhBxrqftHWnyTFweJ5Q==", + "dev": true, + "requires": { + "ps-tree": "1.1.0" + } + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" + } + }, + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "2.0.6", + "safe-buffer": "5.1.1" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.4.0" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + } + } + }, + "rc": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", + "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "1.2.6", + "safe-buffer": "5.1.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "1.2.6" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "0.1.4" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "0.1.15" + } + }, + "sandwich-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sandwich-stream/-/sandwich-stream-1.0.0.tgz", + "integrity": "sha1-eDDkV5e1kzKH8fmyj4cZB0ViYvI=" + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "5.5.0" + } + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.3", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.2" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "dev": true, + "requires": { + "atob": "2.1.0", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "0.1.1" + } + }, + "stream-http": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.1.tgz", + "integrity": "sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A==", + "dev": true, + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + } + }, + "string-extended": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/string-extended/-/string-extended-0.0.8.tgz", + "integrity": "sha1-dBlX3/SHsCcqee7FpE8jnubxfM0=", + "requires": { + "array-extended": "0.0.11", + "date-extended": "0.0.6", + "extended": "0.0.6", + "is-extended": "0.0.10" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + }, + "tapable": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=", + "dev": true + }, + "telegraf": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-3.21.0.tgz", + "integrity": "sha512-y49If1/sAcNqREB9dgxu4J7Ijkx/ILgE+sq3Qm3zuU7IudeJywsQTdT2bQ93p2OioFiyHzQiC6rfvKraCQyk+g==", + "requires": { + "@types/node": "9.6.6", + "debug": "3.1.0", + "node-fetch": "2.1.2", + "sandwich-stream": "1.0.0", + "telegram-typings": "3.6.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "telegram-typings": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/telegram-typings/-/telegram-typings-3.6.1.tgz", + "integrity": "sha512-njVv1EAhIZnmQVLocZEADYUyqA1WIXuVcDYlsp+mXua/XB0pxx+PKtMSPeZ/EE4wPWTw9h/hA9ASTT6yQelkiw==" + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "0.7.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "1.0.5" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + } + }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "1.0.10" + } + }, + "ts-loader": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-3.5.0.tgz", + "integrity": "sha512-JTia3kObhTk36wPFgy0RnkZReiusYx7Le9IhcUWRrCTcFcr6Dy1zGsFd3x8DG4gevlbN65knI8W50FfoykXcng==", + "dev": true, + "requires": { + "chalk": "2.4.0", + "enhanced-resolve": "3.4.1", + "loader-utils": "1.1.0", + "micromatch": "3.1.10", + "semver": "5.5.0" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.18" + } + }, + "typescript": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.3.tgz", + "integrity": "sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "dev": true, + "requires": { + "source-map": "0.5.7", + "uglify-js": "2.8.29", + "webpack-sources": "1.1.0" + } + }, + "undefsafe": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz", + "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=", + "dev": true, + "requires": { + "debug": "2.6.9" + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "1.0.0" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "upath": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", + "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==", + "dev": true + }, + "update-notifier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "dev": true, + "requires": { + "boxen": "1.3.0", + "chalk": "2.4.0", + "configstore": "3.1.2", + "import-lazy": "2.1.0", + "is-ci": "1.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + } + }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "dev": true, + "requires": { + "punycode": "2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", + "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", + "dev": true, + "requires": { + "chokidar": "2.0.3", + "graceful-fs": "4.1.11", + "neo-async": "2.5.1" + } + }, + "webpack": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.11.0.tgz", + "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==", + "dev": true, + "requires": { + "acorn": "5.5.3", + "acorn-dynamic-import": "2.0.2", + "ajv": "6.4.0", + "ajv-keywords": "3.1.0", + "async": "2.6.0", + "enhanced-resolve": "3.4.1", + "escope": "3.6.0", + "interpret": "1.1.0", + "json-loader": "0.5.7", + "json5": "0.5.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "mkdirp": "0.5.1", + "node-libs-browser": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.5.0", + "tapable": "0.2.8", + "uglifyjs-webpack-plugin": "0.4.6", + "watchpack": "1.5.0", + "webpack-sources": "1.1.0", + "yargs": "8.0.2" + }, + "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 + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "dev": true, + "requires": { + "lodash": "4.17.5" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "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" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "dev": true, + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "requires": { + "source-list-map": "2.0.0", + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "widest-line": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "dev": true, + "requires": { + "string-width": "2.1.1" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "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 + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "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" + } + } + } + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + } + } +} diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..fe97965 --- /dev/null +++ b/server/package.json @@ -0,0 +1,32 @@ +{ + "name": "hastic-server", + "version": "1.0.0", + "description": "REST server for managing data for analytics", + "scripts": { + "start": "node dist/server.js", + "dev": "node build/dev-server.js", + "build": "webpack --config build/webpack.prod.conf.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hastic/hastic-server.git" + }, + "author": "CorpGlory", + "license": "ISC", + "bugs": { + "url": "https://github.com/hastic/hastic-server/issues" + }, + "homepage": "https://github.com/hastic/hastic-server#readme", + "dependencies": { + "express": "^4.16.3", + "fast-csv": "^2.4.1", + "telegraf": "^3.21.0" + }, + "devDependencies": { + "@types/express": "^4.11.1", + "nodemon": "^1.17.3", + "ts-loader": "^3.5.0", + "typescript": "^2.8.3", + "webpack": "^3.5.6" + } +} diff --git a/server/src/config.ts b/server/src/config.ts new file mode 100644 index 0000000..a6ada60 --- /dev/null +++ b/server/src/config.ts @@ -0,0 +1,9 @@ +import * as path from 'path'; + +const DATA_PATH = path.join(__dirname, '../data'); +const ANALYTICS_PATH = path.join(__dirname, '../../src'); +const ANOMALIES_PATH = path.join(ANALYTICS_PATH, 'anomalies'); +const SEGMENTS_PATH = path.join(ANALYTICS_PATH, 'segments'); +const METRICS_PATH = path.join(ANALYTICS_PATH, 'metrics'); + +export { DATA_PATH, ANALYTICS_PATH, ANOMALIES_PATH, SEGMENTS_PATH, METRICS_PATH } diff --git a/server/src/index.ts b/server/src/index.ts new file mode 100644 index 0000000..3b3dcaf --- /dev/null +++ b/server/src/index.ts @@ -0,0 +1,31 @@ +import * as express from 'express'; +import * as bodyParser from 'body-parser'; + +import { router as anomaliesRouter } from './routes/anomalies'; +import { router as segmentsRouter } from './routes/segments'; +import { router as alertsRouter } from './routes/alerts'; +import { tgBotInit } from './services/notification'; + +const app = express(); +const PORT = 8000; + +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: true })); + +app.use(function (req, res, next) { + res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS'); + res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); + next(); +}); + +app.use('/anomalies', anomaliesRouter); +app.use('/segments', segmentsRouter); +app.use('/alerts', alertsRouter); +app.use('/', (req, res) => { res.send('Analytic unit works') }); + +app.listen(PORT, () => { + console.log(`Server is running on :${PORT}`) +}); + +tgBotInit(); diff --git a/server/src/routes/alerts.ts b/server/src/routes/alerts.ts new file mode 100644 index 0000000..195b000 --- /dev/null +++ b/server/src/routes/alerts.ts @@ -0,0 +1,62 @@ +import * as express from 'express'; +import {AnomalyId, getAnomalyIdByName, loadAnomalyById} from '../services/anomalyType'; +import { getAlertsAnomalies, saveAlertsAnomalies } from '../services/alerts'; + +function getAlert(req, res) { + try { + let anomalyId: AnomalyId = req.query.anomaly_id; + let anomaly = loadAnomalyById(anomalyId) + if (anomaly == null) { + anomalyId = getAnomalyIdByName(anomalyId.toLowerCase()); + } + + let alertsAnomalies = getAlertsAnomalies(); + let pos = alertsAnomalies.indexOf(anomalyId); + + let enable: boolean = (pos !== -1); + res.status(200).send({ + enable + }); + } catch(e) { + res.status(500).send({ + code: 500, + message: 'Internal error' + }); + } +} + +function changeAlert(req, res) { + try { + let anomalyId: AnomalyId = req.body.anomaly_id; + let enable: boolean = req.body.enable; + + let anomaly = loadAnomalyById(anomalyId) + if (anomaly == null) { + anomalyId = getAnomalyIdByName(anomalyId.toLowerCase()); + } + + let alertsAnomalies = getAlertsAnomalies(); + let pos: number = alertsAnomalies.indexOf(anomalyId); + if(enable && pos == -1) { + alertsAnomalies.push(anomalyId); + saveAlertsAnomalies(alertsAnomalies); + } else if(!enable && pos > -1) { + alertsAnomalies.splice(pos, 1); + saveAlertsAnomalies(alertsAnomalies); + } + res.status(200).send({ + status: 'Ok' + }); + } catch(e) { + res.status(500).send({ + code: 500, + message: 'Internal error' + }); + } +} + +export const router = express.Router(); + +router.get('/', getAlert); +router.post('/', changeAlert); + diff --git a/server/src/routes/anomalies.ts b/server/src/routes/anomalies.ts new file mode 100644 index 0000000..72c38d2 --- /dev/null +++ b/server/src/routes/anomalies.ts @@ -0,0 +1,136 @@ +import * as express from 'express'; + +import { + Metric, + Anomaly, + saveAnomaly, + insertAnomaly, removeAnomaly, loadAnomalyByName, loadAnomalyById, getAnomalyIdByName +} from '../services/anomalyType'; +import { runLearning } from '../services/analytics' +import { saveTargets } from '../services/metrics'; + +async function sendAnomalyTypeStatus(req, res) { + let id = req.query.id; + let name = req.query.name; + try { + let anomaly: Anomaly; + if(id !== undefined) { + anomaly = loadAnomalyById(id); + } else { + anomaly = loadAnomalyByName(name); + } + if(anomaly === null) { + res.status(404).send({ + code: 404, + message: 'Not found' + }); + return; + } + if(anomaly.status === undefined) { + throw new Error('No status for ' + name); + } + res.status(200).send({ status: anomaly.status }); + } catch(e) { + console.error(e); + // TODO: better send 404 when we know than isn`t found + res.status(500).send({ error: 'Can`t return anything' }); + } + +} + +async function getAnomaly(req, res) { + try { + let id = req.query.id; + let name = req.query.name; + + let anomaly:Anomaly; + if(id !== undefined) { + anomaly = loadAnomalyById(id); + } else { + anomaly = loadAnomalyByName(name.toLowerCase()); + } + if(anomaly === null) { + res.status(404).send({ + code: 404, + message: 'Not found' + }); + return; + } + + let payload = JSON.stringify({ + name: anomaly.name, + metric: anomaly.metric, + status: anomaly.status + }); + res.status(200).send(payload) + } catch(e) { + console.error(e); + // TODO: better send 404 when we know than isn`t found + res.status(500).send('Can`t get anything'); + } +} + +async function createAnomaly(req, res) { + try { + const metric:Metric = { + datasource: req.body.metric.datasource, + targets: saveTargets(req.body.metric.targets) + }; + + const anomaly:Anomaly = { + name: req.body.name, + panelUrl: req.body.panelUrl, + metric: metric, + status: 'learning', + last_prediction_time: 0, + next_id: 0 + }; + let anomalyId = insertAnomaly(anomaly); + if(anomalyId === null) { + res.status(403).send({ + code: 403, + message: 'Already exists' + }); + } + + let payload = JSON.stringify({ anomaly_id: anomalyId }) + res.status(200).send(payload); + + runLearning(anomalyId); + } catch(e) { + res.status(500).send({ + code: 500, + message: 'Internal error' + }); + } +} + +function deleteAnomaly(req, res) { + try { + let id = req.query.id; + let name = req.query.name; + + if(id !== undefined) { + removeAnomaly(id); + } else { + removeAnomaly(name.toLowerCase()); + } + + res.status(200).send({ + code: 200, + message: 'Success' + }); + } catch(e) { + res.status(500).send({ + code: 500, + message: 'Internal error' + }); + } +} + +export const router = express.Router(); + +router.get('/status', sendAnomalyTypeStatus); +router.get('/', getAnomaly); +router.post('/', createAnomaly); +router.delete('/', deleteAnomaly); diff --git a/server/src/routes/segments.ts b/server/src/routes/segments.ts new file mode 100644 index 0000000..6ffa755 --- /dev/null +++ b/server/src/routes/segments.ts @@ -0,0 +1,80 @@ +import * as express from 'express'; +import { + getLabeledSegments, + insertSegments, + removeSegments, +} from '../services/segments'; +import {runLearning} from '../services/analytics'; +import {Anomaly, AnomalyId, getAnomalyIdByName, loadAnomalyById} from '../services/anomalyType'; + + +async function sendSegments(req, res) { + try { + let anomalyId: AnomalyId = req.query.anomaly_id; + let anomaly:Anomaly = loadAnomalyById(anomalyId); + if(anomaly === null) { + anomalyId = getAnomalyIdByName(anomalyId); + } + + let lastSegmentId = req.query.last_segment; + let timeFrom = req.query.from; + let timeTo = req.query.to; + + let segments = getLabeledSegments(anomalyId); + + // Id filtering + if(lastSegmentId !== undefined) { + segments = segments.filter(el => el.id > lastSegmentId); + } + + // Time filtering + if(timeFrom !== undefined) { + segments = segments.filter(el => el.finish > timeFrom); + } + + if(timeTo !== undefined) { + segments = segments.filter(el => el.start < timeTo); + } + + let payload = JSON.stringify({ + segments + }); + res.status(200).send(payload); + } catch(e) { + res.status(500).send({ + code: 500, + message: 'Internal error' + }); + } +} + +async function updateSegments(req, res) { + try { + let segmentsUpdate = req.body; + + let anomalyId = segmentsUpdate.anomaly_id; + let anomalyName = segmentsUpdate.name; + + if(anomalyId === undefined) { + anomalyId = getAnomalyIdByName(anomalyName.toLowerCase()); + } + + let addedIds = insertSegments(anomalyId, segmentsUpdate.added_segments, true); + removeSegments(anomalyId, segmentsUpdate.removed_segments); + + let payload = JSON.stringify({ added_ids: addedIds }); + res.status(200).send(payload); + + runLearning(anomalyId); + } catch(e) { + res.status(500).send({ + code: 500, + message: 'Internal error' + }); + } +} + +export const router = express.Router(); + +router.get('/', sendSegments); +router.patch('/', updateSegments); diff --git a/server/src/services/alerts.ts b/server/src/services/alerts.ts new file mode 100644 index 0000000..55f177a --- /dev/null +++ b/server/src/services/alerts.ts @@ -0,0 +1,58 @@ +import { getJsonDataSync, writeJsonDataSync } from './json'; +import * as path from 'path'; +import { AnomalyId } from './anomalyType'; +import { ANOMALIES_PATH } from '../config'; +import { runPredict } from './analytics'; +import { sendNotification } from './notification'; +import { getLabeledSegments } from './segments'; + +function getAlertsAnomalies() : AnomalyId[] { + return getJsonDataSync(path.join(ANOMALIES_PATH, `alerts_anomalies.json`)); +} + +function saveAlertsAnomalies(anomalies: AnomalyId[]) { + return writeJsonDataSync(path.join(ANOMALIES_PATH, `alerts_anomalies.json`), anomalies); +} + +function processAlerts(anomalyId) { + let segments = getLabeledSegments(anomalyId); + + const currentTime = new Date().getTime(); + const activeAlert = activeAlerts.has(anomalyId); + let newActiveAlert = false; + + if(segments.length > 0) { + let lastSegment = segments[segments.length - 1]; + if(lastSegment.finish >= currentTime - alertTimeout) { + newActiveAlert = true; + } + } + + if(!activeAlert && newActiveAlert) { + activeAlerts.add(anomalyId); + sendNotification(anomalyId, true); + } else if(activeAlert && !newActiveAlert) { + activeAlerts.delete(anomalyId); + sendNotification(anomalyId, false); + } +} + +async function alertsTick() { + let alertsAnomalies = getAlertsAnomalies(); + for (let anomalyId of alertsAnomalies) { + try { + await runPredict(anomalyId); + processAlerts(anomalyId); + } catch (e) { + console.error(e); + } + } + setTimeout(alertsTick, 5000); +} + +const alertTimeout = 60000; // ms +const activeAlerts = new Set(); +setTimeout(alertsTick, 5000); + + +export { getAlertsAnomalies, saveAlertsAnomalies } diff --git a/server/src/services/analytics.ts b/server/src/services/analytics.ts new file mode 100644 index 0000000..1e7e18f --- /dev/null +++ b/server/src/services/analytics.ts @@ -0,0 +1,141 @@ +import { spawn } from 'child_process' +import { ANALYTICS_PATH } from '../config' +import { + Anomaly, + AnomalyId, getAnomalyTypeInfo, + loadAnomalyById, + setAnomalyPredictionTime, + setAnomalyStatus +} from './anomalyType' +import { getTarget } from './metrics'; +import { getLabeledSegments, insertSegments, removeSegments } from './segments'; +import { split, map, mapSync } from 'event-stream' + +const learnWorker = spawn('python3', ['worker.py'], { cwd: ANALYTICS_PATH }) +learnWorker.stdout.pipe(split()) + .pipe( + mapSync(function(line){ + console.log(line) + onMessage(line) + }) + ); + +learnWorker.stderr.on('data', data => console.error(`worker stderr: ${data}`)); + +const taskMap = {}; +let nextTaskId = 0; + +function onMessage(data) { + let response = JSON.parse(data); + let taskId = response.__task_id; + // let anomalyName = response.anomaly_name; + // let task = response.task; + let status = response.status; + + if(status === 'success' || status === 'failed') { + if(taskId in taskMap) { + let resolver = taskMap[taskId]; + resolver(response); + delete taskMap[taskId]; + } + } +} + +function runTask(task) : Promise { + let anomaly:Anomaly = loadAnomalyById(task.anomaly_id); + task.metric = { + datasource: anomaly.metric.datasource, + targets: anomaly.metric.targets.map(t => getTarget(t)) + }; + + task.__task_id = nextTaskId++; + let command = JSON.stringify(task) + learnWorker.stdin.write(`${command}\n`); + return new Promise((resolve, reject) => { + taskMap[task.__task_id] = resolve + }) +} + +async function runLearning(anomalyId:AnomalyId) { + let segments = getLabeledSegments(anomalyId); + setAnomalyStatus(anomalyId, 'learning'); + let anomaly:Anomaly = loadAnomalyById(anomalyId); + let analyticsType = "anomalies"; + let preset = undefined; + if (anomaly.name.includes("jumps")) { + analyticsType = "patterns"; + preset = "steps" + } + if (anomaly.name.includes("cliffs") || anomaly.name.includes("drops")) { + analyticsType = "patterns"; + preset = "cliffs" + } + if (anomaly.name.includes("peaks")) { + analyticsType = "patterns"; + preset = "peaks" + } + let task = { + type: 'learn', + anomaly_id: anomalyId, + analytics_type: analyticsType, + preset, + segments: segments + }; + + let result = await runTask(task); + + if (result.status === 'success') { + setAnomalyStatus(anomalyId, 'ready'); + insertSegments(anomalyId, result.segments, false); + setAnomalyPredictionTime(anomalyId, result.last_prediction_time); + } else { + setAnomalyStatus(anomalyId, 'failed'); + } +} + +async function runPredict(anomalyId:AnomalyId) { + let anomaly:Anomaly = loadAnomalyById(anomalyId); + let analyticsType = "anomalies"; + let preset = undefined; + if (anomaly.name.includes("jump")) { + analyticsType = "patterns"; + preset = "steps" + } + if (anomaly.name.includes("cliffs") || anomaly.name.includes("drops")) { + analyticsType = "patterns"; + preset = "cliffs" + } + if (anomaly.name.includes("peaks")) { + analyticsType = "patterns"; + preset = "peaks" + } + let task = { + type: 'predict', + anomaly_id: anomalyId, + analytics_type: analyticsType, + preset, + last_prediction_time: anomaly.last_prediction_time + }; + let result = await runTask(task); + + if(result.status === 'failed') { + return []; + } + // Merging segments + let segments = getLabeledSegments(anomalyId); + if(segments.length > 0 && result.segments.length > 0) { + let lastOldSegment = segments[segments.length - 1]; + let firstNewSegment = result.segments[0]; + + if(firstNewSegment.start <= lastOldSegment.finish) { + result.segments[0].start = lastOldSegment.start; + removeSegments(anomalyId, [lastOldSegment.id]); + } + } + + insertSegments(anomalyId, result.segments, false); + setAnomalyPredictionTime(anomalyId, result.last_prediction_time); + return result.segments; +} + +export { runLearning, runPredict } diff --git a/server/src/services/anomalyType.ts b/server/src/services/anomalyType.ts new file mode 100644 index 0000000..c478344 --- /dev/null +++ b/server/src/services/anomalyType.ts @@ -0,0 +1,117 @@ +import * as path from 'path' +import { getJsonDataSync, writeJsonDataSync } from './json' +import { ANOMALIES_PATH } from '../config' +import * as fs from 'fs' +import * as crypto from 'crypto'; + +export type Metric = { + datasource: string, + targets: string[] +} + +export type Anomaly = { + name: string, + + panelUrl: string, + + metric: Metric, + status: string, + + last_prediction_time: number, + next_id: number +} + +export type AnomalyId = string; + +let anomaliesNameToIdMap = {}; + +function loadAnomaliesMap() { + let filename = path.join(ANOMALIES_PATH, `all_anomalies.json`); + anomaliesNameToIdMap = getJsonDataSync(filename); +} + +function saveAnomaliesMap() { + let filename = path.join(ANOMALIES_PATH, `all_anomalies.json`); + writeJsonDataSync(filename, anomaliesNameToIdMap); +} + +function getAnomalyIdByName(anomalyName:string) : AnomalyId { + loadAnomaliesMap(); + anomalyName = anomalyName.toLowerCase(); + if(anomalyName in anomaliesNameToIdMap) { + return anomaliesNameToIdMap[anomalyName]; + } + return anomalyName; +} + +function insertAnomaly(anomaly: Anomaly) : AnomalyId { + const hashString = anomaly.name + (new Date()).toString(); + const anomalyId:AnomalyId = crypto.createHash('md5').update(hashString).digest('hex'); + anomaliesNameToIdMap[anomaly.name] = anomalyId; + saveAnomaliesMap(); + // return anomalyId + // const anomalyId:AnomalyId = anomaly.name; + let filename = path.join(ANOMALIES_PATH, `${anomalyId}.json`); + if(fs.existsSync(filename)) { + return null; + } + saveAnomaly(anomalyId, anomaly); + return anomalyId; +} + +function removeAnomaly(anomalyId:AnomalyId) { + let filename = path.join(ANOMALIES_PATH, `${anomalyId}.json`); + fs.unlinkSync(filename); +} + +function saveAnomaly(anomalyId: AnomalyId, anomaly: Anomaly) { + let filename = path.join(ANOMALIES_PATH, `${anomalyId}.json`); + return writeJsonDataSync(filename, anomaly); +} + +function loadAnomalyById(anomalyId: AnomalyId) : Anomaly { + let filename = path.join(ANOMALIES_PATH, `${anomalyId}.json`); + if(!fs.existsSync(filename)) { + return null; + } + return getJsonDataSync(filename); +} + +function loadAnomalyByName(anomalyName: string) : Anomaly { + let anomalyId = getAnomalyIdByName(anomalyName); + return loadAnomalyById(anomalyId); +} + +function saveAnomalyTypeInfo(info) { + console.log('Saving'); + let filename = path.join(ANOMALIES_PATH, `${info.name}.json`); + if(info.next_id === undefined) { + info.next_id = 0; + } + if(info.last_prediction_time === undefined) { + info.last_prediction_time = 0; + } + + return writeJsonDataSync(filename, info); +} + +function getAnomalyTypeInfo(name) { + return getJsonDataSync(path.join(ANOMALIES_PATH, `${name}.json`)); +} + +function setAnomalyStatus(anomalyId:AnomalyId, status:string) { + let info = loadAnomalyById(anomalyId); + info.status = status; + saveAnomaly(anomalyId, info); +} + +function setAnomalyPredictionTime(anomalyId:AnomalyId, lastPredictionTime:number) { + let info = loadAnomalyById(anomalyId); + info.last_prediction_time = lastPredictionTime; + saveAnomaly(anomalyId, info); +} + +export { + saveAnomaly, loadAnomalyById, loadAnomalyByName, insertAnomaly, removeAnomaly, saveAnomalyTypeInfo, + getAnomalyTypeInfo, getAnomalyIdByName, setAnomalyStatus, setAnomalyPredictionTime +} diff --git a/server/src/services/json.ts b/server/src/services/json.ts new file mode 100644 index 0000000..0390661 --- /dev/null +++ b/server/src/services/json.ts @@ -0,0 +1,55 @@ +import * as fs from 'fs'; + +async function getJsonData(filename: string): Promise { + var data = await new Promise((resolve, reject) => { + fs.readFile(filename, 'utf8', (err, data) => { + if(err) { + console.error(err); + reject('Can`t read file'); + } else { + resolve(data); + } + }); + }); + + try { + return JSON.parse(data); + } catch(e) { + console.error(e); + throw new Error('Wrong file format'); + } +} + +function writeJsonData(filename: string, data: Object) { + return new Promise((resolve, reject) => { + fs.writeFile(filename, JSON.stringify(data), 'utf8', (err) => { + if(err) { + console.error(err); + reject('Cat`t write file'); + } else { + resolve(); + } + }); + }) +} + +function getJsonDataSync(filename: string) { + let data = fs.readFileSync(filename, 'utf8'); + try { + return JSON.parse(data); + } catch(e) { + console.error(e); + throw new Error('Wrong file format'); + } +} + +function writeJsonDataSync(filename: string, data: Object) { + fs.writeFileSync(filename, JSON.stringify(data)); +} + +export { + getJsonData, + writeJsonData, + getJsonDataSync, + writeJsonDataSync +} diff --git a/server/src/services/metrics.ts b/server/src/services/metrics.ts new file mode 100644 index 0000000..52ce444 --- /dev/null +++ b/server/src/services/metrics.ts @@ -0,0 +1,27 @@ +import * as path from 'path'; +import { getJsonDataSync, writeJsonDataSync } from './json'; +import { METRICS_PATH } from '../config'; +import * as crypto from 'crypto'; + +function saveTargets(targets) { + let metrics = []; + for (let target of targets) { + metrics.push(saveTarget(target)); + } + return metrics; +} + +function saveTarget(target) { + //const md5 = crypto.createHash('md5') + const targetId = crypto.createHash('md5').update(JSON.stringify(target)).digest('hex'); + let filename = path.join(METRICS_PATH, `${targetId}.json`); + writeJsonDataSync(filename, target); + return targetId; +} + +function getTarget(targetId) { + let filename = path.join(METRICS_PATH, `${targetId}.json`); + return getJsonDataSync(filename); +} + +export { saveTargets, getTarget } diff --git a/server/src/services/notification.ts b/server/src/services/notification.ts new file mode 100644 index 0000000..d6fd4c3 --- /dev/null +++ b/server/src/services/notification.ts @@ -0,0 +1,140 @@ +//import * as Telegraf from 'telegraf' +import * as path from 'path'; +import { DATA_PATH } from '../config'; +import { getJsonDataSync, writeJsonDataSync } from './json'; +import { AnomalyId } from './anomalyType'; + + +type SubscriberId = string; +type SubscribersMap = Map< AnomalyId, SubscriberId[] >; + +type BotConfig = { + token: string, + subscriptions: SubscribersMap +}; + +function sendNotification(anomalyName, active) { + console.log('Notification ' + anomalyName); + if(anomalyName in botConfig.subscriptions) { + let notificationMessage; + if(active) { + notificationMessage = 'Alert! Anomaly type ' + anomalyName; + } else { + notificationMessage = 'Ok! Anomaly type ' + anomalyName; + } + + for (let SubscriberId of botConfig.subscriptions[anomalyName]) { + bot.telegram.sendMessage(SubscriberId, notificationMessage); + } + } +} + +function loadBotConfig() : BotConfig { + let filename = path.join(DATA_PATH, `bot_config.json`); + let jsonData; + try { + jsonData = getJsonDataSync(filename); + } catch(e) { + console.error(e.message); + jsonData = []; + } + return jsonData; +} + +function saveBotConfig(botConfig: BotConfig) { + let filename = path.join(DATA_PATH, `bot_config.json`); + try { + writeJsonDataSync(filename, botConfig); + } catch(e) { + console.error(e.message); + } +} + +const commandArgs = (ctx, next) => { + try { + if(ctx.updateType === 'message') { + const text = ctx.update.message.text; + if(text !== undefined && text.startsWith('/')) { + const match = text.match(/^\/([^\s]+)\s?(.+)?/); + let args = []; + let command; + if(match !== null) { + if(match[1]) { + command = match[1]; + } + if(match[2]) { + args = match[2].split(' '); + } + } + ctx.state.command = { + raw: text, + command, + args, + }; + } + } + return next(ctx); + } catch (e) { + + } +}; + +function addNotification(ctx) { + console.log('addNotification') + let command = ctx.state.command; + let chatId = ctx.chat.id; + if(command.args.length > 0) { + for (let anomalyName of command.args) { + if(!(anomalyName in botConfig.subscriptions)) { + botConfig.subscriptions[anomalyName] = [] + } + if(botConfig.subscriptions[anomalyName].includes(chatId)) { + return ctx.reply('You are already subscribed on alerts from anomaly ' + command.args) + } else { + botConfig.subscriptions[anomalyName].push(chatId); + saveBotConfig(botConfig); + } + } + return ctx.reply('You have been successfully subscribed on alerts from anomaly ' + command.args) + } else { + return ctx.reply('You should use syntax: \/addNotification ') + } +} + +function removeNotification(ctx) { + let command = ctx.state.command; + let chatId = ctx.chat.id; + if(command.args.length > 0) { + for (let anomalyName of command.args) { + if(anomalyName in botConfig.subscriptions) { + botConfig.subscriptions[anomalyName] = botConfig.subscriptions[anomalyName].filter(el => el !== chatId); + saveBotConfig(botConfig); + } + } + return ctx.reply('You have been successfully unsubscribed from alerts from ' + command.args); + } else { + return ctx.reply('You should use syntax: \/removeNotification '); + } +} + +const Telegraf = require('telegraf'); +let botConfig: BotConfig; +let bot; + +function tgBotInit() { + try { + botConfig = loadBotConfig(); + bot = new Telegraf(botConfig.token); + + bot.use(commandArgs); + + bot.command('addNotification', addNotification); + bot.command('removeNotification', removeNotification); + + bot.startPolling(); + } catch(e) { + // TODO: handle exception + } +} + +export { sendNotification, tgBotInit } diff --git a/server/src/services/segments.ts b/server/src/services/segments.ts new file mode 100644 index 0000000..6f8ed8c --- /dev/null +++ b/server/src/services/segments.ts @@ -0,0 +1,75 @@ +import * as path from 'path'; +import { getJsonDataSync, writeJsonDataSync } from './json'; +import { SEGMENTS_PATH } from '../config'; +import { AnomalyId, loadAnomalyById, saveAnomaly } from './anomalyType'; + +function getLabeledSegments(anomalyId: AnomalyId) { + let filename = path.join(SEGMENTS_PATH, `${anomalyId}_labeled.json`); + + let segments = []; + try { + segments = getJsonDataSync(filename); + for (let segment of segments) { + if (segment.labeled === undefined) { + segment.labeled = false; + } + } + } catch (e) { + console.error(e.message); + } + return segments; +} + +function getPredictedSegments(anomalyId: AnomalyId) { + let filename = path.join(SEGMENTS_PATH, `${anomalyId}_segments.json`); + + let jsonData; + try { + jsonData = getJsonDataSync(filename); + } catch(e) { + console.error(e.message); + jsonData = []; + } + return jsonData; +} + +function saveSegments(anomalyId: AnomalyId, segments) { + let filename = path.join(SEGMENTS_PATH, `${anomalyId}_labeled.json`); + + try { + return writeJsonDataSync(filename, segments); + } catch(e) { + console.error(e.message); + throw new Error('Can`t write to db'); + } +} + +function insertSegments(anomalyId: AnomalyId, addedSegments, labeled:boolean) { + // Set status + let info = loadAnomalyById(anomalyId); + let segments = getLabeledSegments(anomalyId); + + let nextId = info.next_id; + let addedIds = [] + for (let segment of addedSegments) { + segment.id = nextId; + segment.labeled = labeled; + addedIds.push(nextId); + nextId++; + segments.push(segment); + } + info.next_id = nextId; + saveSegments(anomalyId, segments); + saveAnomaly(anomalyId, info); + return addedIds; +} + +function removeSegments(anomalyId: AnomalyId, removedSegments) { + let segments = getLabeledSegments(anomalyId); + for (let segmentId of removedSegments) { + segments = segments.filter(el => el.id !== segmentId); + } + saveSegments(anomalyId, segments); +} + +export { getLabeledSegments, getPredictedSegments, saveSegments, insertSegments, removeSegments } diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 0000000..987f1c7 --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "outDir": "./dist/", + "sourceMap": true, + "noImplicitAny": false, + "module": "commonjs", + "target": "es2015", + "allowJs": true + } +} diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..a62c4bc --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,11 @@ +anomalies/ +segments/ +datasets/ +datasources/ +models/ +metrics/ +__pycache__/ +*.pyc +*.txt +*.log +tasks.csv diff --git a/src/add_anomaly.py b/src/add_anomaly.py new file mode 100644 index 0000000..1020700 --- /dev/null +++ b/src/add_anomaly.py @@ -0,0 +1,5 @@ +from worker import worker + +if __name__ == "__main__": + w = worker() + w.do_task({"type": "learn", "anomaly_name": "cpu_utilization_supervised", "segments": []}) \ No newline at end of file diff --git a/src/anomaly_model.py b/src/anomaly_model.py new file mode 100644 index 0000000..bdd21b1 --- /dev/null +++ b/src/anomaly_model.py @@ -0,0 +1,157 @@ +import os.path +from data_provider import DataProvider +from data_preprocessor import data_preprocessor +import json +import pandas as pd +import logging + +datasource_folder = "datasources/" +dataset_folder = "datasets/" +anomalies_folder = "anomalies/" +models_folder = "models/" +metrics_folder = "metrics/" +logger = logging.getLogger('analytic_toolset') + + +def anomalies_to_timestamp(anomalies): + for anomaly in anomalies: + anomaly['start'] = int(anomaly['start'].timestamp() * 1000) + anomaly['finish'] = int(anomaly['finish'].timestamp() * 1000) + return anomalies + + +class AnomalyModel: + + def __init__(self, anomaly_name): + self.anomaly_name = anomaly_name + self.load_anomaly_config() + + datasource = self.anomaly_config['metric']['datasource'] + metric_name = self.anomaly_config['metric']['targets'][0] + + dbconfig_filename = os.path.join(datasource_folder, datasource + ".json") + target_filename = os.path.join(metrics_folder, metric_name + ".json") + + dataset_filename = os.path.join(dataset_folder, metric_name + ".csv") + augmented_path = os.path.join(dataset_folder, metric_name + "_augmented.csv") + + with open(dbconfig_filename, 'r') as config_file: + dbconfig = json.load(config_file) + + with open(target_filename, 'r') as file: + target = json.load(file) + + self.data_prov = DataProvider(dbconfig, target, dataset_filename) + self.preprocessor = data_preprocessor(self.data_prov, augmented_path) + self.model = None + + self.__load_model() + + def anomalies_box(self, anomalies): + max_time = 0 + min_time = float("inf") + for anomaly in anomalies: + max_time = max(max_time, anomaly['finish']) + min_time = min(min_time, anomaly['start']) + min_time = pd.to_datetime(min_time, unit='ms') + max_time = pd.to_datetime(max_time, unit='ms') + return min_time, max_time + + def learn(self, anomalies): + logger.info("Start to learn for anomaly_name='%s'" % self.anomaly_name) + + confidence = 0.02 + dataframe = self.data_prov.get_dataframe() + start_index, stop_index = 0, len(dataframe) + if len(anomalies) > 0: + confidence = 0.0 + min_time, max_time = self.anomalies_box(anomalies) + start_index = dataframe[dataframe['timestamp'] >= min_time].index[0] + stop_index = dataframe[dataframe['timestamp'] > max_time].index[0] + start_index, stop_index = self.preprocessor.expand_indexes(start_index, stop_index) + dataframe = dataframe[start_index:stop_index] + + train_augmented = self.preprocessor.get_augmented_data( + start_index, + stop_index, + anomalies + ) + + self.model = self.create_algorithm() + self.model.fit(train_augmented, confidence) + if len(anomalies) > 0: + last_dataframe_time = dataframe.iloc[- 1]['timestamp'] + last_prediction_time = int(last_dataframe_time.timestamp() * 1000) + else: + last_prediction_time = 0 + + self.__save_model() + logger.info("Learning is finished for anomaly_name='%s'" % self.anomaly_name) + return last_prediction_time + + def predict(self, last_prediction_time): + logger.info("Start to predict for anomaly type='%s'" % self.anomaly_name) + last_prediction_time = pd.to_datetime(last_prediction_time, unit='ms') + + start_index = self.data_prov.get_upper_bound(last_prediction_time) + stop_index = self.data_prov.size() + + # last_prediction_time = pd.to_datetime(last_prediction_time, unit='ms') + # dataframe = dataframe[dataframe['timestamp'] > last_prediction_time] + last_prediction_time = int(last_prediction_time.timestamp() * 1000) + + predicted_anomalies = [] + if start_index < stop_index: + max_chunk_size = 50000 + predicted = pd.Series() + for index in range(start_index, stop_index, max_chunk_size): + chunk_start = index + chunk_finish = min(index + max_chunk_size, stop_index) + predict_augmented = self.preprocessor.get_augmented_data(chunk_start, chunk_finish) + + assert(len(predict_augmented) == chunk_finish - chunk_start) + + predicted_current = self.model.predict(predict_augmented) + predicted = pd.concat([predicted, predicted_current]) + predicted_anomalies = self.preprocessor.inverse_transform_anomalies(predicted) + + last_row = self.data_prov.get_data_range(stop_index - 1, stop_index) + + last_dataframe_time = last_row.iloc[0]['timestamp'] + predicted_anomalies = anomalies_to_timestamp(predicted_anomalies) + last_prediction_time = int(last_dataframe_time.timestamp() * 1000) + + logger.info("Predicting is finished for anomaly type='%s'" % self.anomaly_name) + return predicted_anomalies, last_prediction_time + + def synchronize_data(self): + self.data_prov.synchronize() + self.preprocessor.set_data_provider(self.data_prov) + self.preprocessor.synchronize() + + def load_anomaly_config(self): + with open(os.path.join(anomalies_folder, self.anomaly_name + ".json"), 'r') as config_file: + self.anomaly_config = json.load(config_file) + + def get_anomalies(self): + labeled_anomalies_file = os.path.join(anomalies_folder, self.anomaly_name + "_labeled.json") + if not os.path.exists(labeled_anomalies_file): + return [] + with open(labeled_anomalies_file) as file: + return json.load(file) + + def create_algorithm(self): + from supervised_algorithm import supervised_algorithm + return supervised_algorithm() + + def __save_model(self): + logger.info("Save model '%s'" % self.anomaly_name) + model_filename = os.path.join(models_folder, self.anomaly_name + ".m") + self.model.save(model_filename) + + def __load_model(self): + logger.info("Load model '%s'" % self.anomaly_name) + model_filename = os.path.join(models_folder, self.anomaly_name + ".m") + if os.path.exists(model_filename): + self.model = self.create_algorithm() + self.model.load(model_filename) diff --git a/src/data_preprocessor.py b/src/data_preprocessor.py new file mode 100644 index 0000000..4c6eb91 --- /dev/null +++ b/src/data_preprocessor.py @@ -0,0 +1,255 @@ +import os.path +import pandas as pd +import numpy as np +import math +import time + +from tsfresh.transformers.feature_augmenter import FeatureAugmenter +from tsfresh.feature_extraction.settings import from_columns +from pytz import timezone + + +class data_preprocessor: + # augmented = None + frame_size = 16 + calc_features = [ + # "value__agg_linear_trend__f_agg_\"max\"__chunk_len_5__attr_\"intercept\"", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_12__w_20", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_13__w_5", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_2__w_10", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_2__w_20", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_8__w_20", + # "value__fft_coefficient__coeff_3__attr_\"abs\"", + "time_of_day_column_x", + "time_of_day_column_y", + "value__abs_energy", + "value__absolute_sum_of_changes", + "value__sum_of_reoccurring_data_points", + ] + time_features = [ + 'time_of_day_column_x', + 'time_of_day_column_y' + ] + chunk_size = 50000 + + def __init__(self, data_provider, augmented_path): + self.data_provider = data_provider + self.augmented_path = augmented_path + self.last_chunk_index = 0 + self.total_size = 0 + self.__init_chunks() + self.synchronize() + + def set_data_provider(self, data_provider): + self.data_provider = data_provider + + def synchronize(self): + start_frame = self.total_size + stop_frame = self.data_provider.size() + + max_chunk_size = 30000 + for frame in range(start_frame, stop_frame, max_chunk_size): + data = self.__get_source_frames(frame, min(stop_frame, frame + max_chunk_size)) + + if len(data) == 0: + return + + append_augmented = self.__extract_features(data, self.calc_features) + self.__append_data(append_augmented) + + def expand_indexes(self, start_index, stop_index): + return start_index, stop_index + + def get_augmented_data(self, start_index, stop_index, anomalies=[]): + start_frame = start_index + stop_frame = stop_index + augmented = self.__get_data(start_frame, stop_frame) + + if len(anomalies) > 0: + anomalies_indexes = self.transform_anomalies(anomalies) + augmented = augmented.drop(anomalies_indexes) + + return augmented + + def transform_anomalies(self, anomalies): + anomaly_index = None + dataframe = self.data_provider.get_dataframe(None) + for anomaly in anomalies: + start_time = pd.to_datetime(anomaly['start'], unit='ms') + finish_time = pd.to_datetime(anomaly['finish'], unit='ms') + current_index = (dataframe['timestamp'] >= start_time) & (dataframe['timestamp'] <= finish_time) + if anomaly_index is not None: + anomaly_index = (anomaly_index | current_index) + else: + anomaly_index = current_index + + rows = dataframe[anomaly_index] + # indexes = np.floor_divide(rows.index, self.frame_size) + indexes = np.unique(rows.index) + return indexes + + def inverse_transform_anomalies(self, prediction): + anomalies = [] + cur_anomaly = None + source_dataframe = self.data_provider.get_dataframe(None) + for i in prediction.index: + if prediction[i]: + start_frame_index = max(0, i - self.frame_size + 1) + finish_frame_index = i + start = source_dataframe['timestamp'][start_frame_index] + finish = source_dataframe['timestamp'][finish_frame_index] + if cur_anomaly is None: + if len(anomalies) > 0 and start <= anomalies[len(anomalies) - 1]['finish']: + cur_anomaly = anomalies[len(anomalies) - 1] + anomalies.pop() + else: + cur_anomaly = {'start': start, 'finish': finish} + cur_anomaly['finish'] = finish + elif cur_anomaly is not None: + anomalies.append(cur_anomaly) + cur_anomaly = None + + if cur_anomaly: + anomalies.append(cur_anomaly) + return anomalies + + def __get_data(self, start_index, stop_index): + result = pd.DataFrame() + start_chunk = start_index // self.chunk_size + finish_chunk = stop_index // self.chunk_size + for chunk_num in range(start_chunk, finish_chunk + 1): + chunk = self.__load_chunk(chunk_num) + if chunk_num == finish_chunk: + chunk = chunk[:stop_index % self.chunk_size] + if chunk_num == start_chunk: + chunk = chunk[start_index % self.chunk_size:] + result = pd.concat([result, chunk]) + return result + + def __init_chunks(self): + chunk_index = 0 + self.last_chunk_index = 0 + while True: + filename = self.augmented_path + if chunk_index > 0: + filename += "." + str(chunk_index) + if os.path.exists(filename): + self.last_chunk_index = chunk_index + else: + break + chunk_index += 1 + self.total_size = self.last_chunk_index * self.chunk_size + last_chunk = self.__load_chunk(self.last_chunk_index) + self.total_size += len(last_chunk) + + def __append_data(self, dataframe): + while len(dataframe) > 0: + chunk = self.__load_chunk(self.last_chunk_index) + rows_count = min(self.chunk_size - len(chunk), len(dataframe)) + + rows = dataframe.iloc[0:rows_count] + self.__save_chunk(self.last_chunk_index, rows) + self.total_size += rows_count + + dataframe = dataframe[rows_count:] + if len(dataframe) > 0: + self.last_chunk_index += 1 + + def __load_chunk(self, index): + filename = self.augmented_path + if index > 0: + filename += "." + str(index) + + if os.path.exists(filename): + chunk = pd.read_csv(filename) + frame_index = np.arange(index * self.chunk_size, index * self.chunk_size + len(chunk)) + chunk = chunk.set_index(frame_index) + return chunk + return pd.DataFrame() + + def __save_chunk(self, index, dataframe): + filename = self.augmented_path + if index > 0: + filename += "." + str(index) + + if os.path.exists(filename): + dataframe.to_csv(filename, mode='a', index=False, header=False) + else: + dataframe.to_csv(filename, mode='w', index=False, header=True) + + def __get_source_frames(self, start_frame, stop_frame): + start_index = start_frame + stop_index = stop_frame + + # frame = self.source_dataframe[start_index:stop_index] + # mat = frame.as_matrix() + + source_dataframe = self.data_provider.get_data_range(max(start_index - self.frame_size + 1, 0), stop_index) + + dataframe = None + for i in range(start_index, stop_index): + mini = max(0, i - self.frame_size + 1) + frame = source_dataframe.loc[mini:i + 1].copy() + frame['id'] = i + if dataframe is None: + dataframe = frame + else: + dataframe = dataframe.append(frame, ignore_index=True) + + #dataframe = self.source_dataframe[start_index:stop_index].copy() + #dataframe['id'] = np.floor_divide(dataframe.index, self.frame_size) + dataframe.reset_index(drop=True, inplace=True) + return dataframe + + def __extract_features(self, data, features=None): + start_frame = data['id'][0] + stop_frame = data['id'][len(data)-1] + 1 + augmented = pd.DataFrame(index=np.arange(start_frame, stop_frame)) + + # tsfresh features + tsfresh_features = None + if features is not None: + tsfresh_features = set(features) - set(self.time_features) + + augmented = self.__extract_tfresh_features(data, augmented, tsfresh_features) + + # time features + augmented = self.__extract_time_features(data, augmented, features) + return augmented + + def __extract_tfresh_features(self, data, augmented, features): + relevant_extraction_settings = None + if features is not None: + augmented_features = set(features) + relevant_extraction_settings = from_columns(augmented_features) + + #impute_function = partial(impute_dataframe_range, col_to_max=self.col_to_max, + # col_to_min=self.col_to_min, col_to_median=self.col_to_median) + + feature_extractor = FeatureAugmenter( + kind_to_fc_parameters=relevant_extraction_settings, + column_id='id', + column_sort='timestamp') + feature_extractor.set_timeseries_container(data) + + return feature_extractor.transform(augmented) + + def __extract_time_features(self, data, augmented, features): + if features is None: + features = self.time_features + + seconds = np.zeros(len(augmented)) + first_id = data['id'][0] + + for i in range(len(data)): + id = data['id'][i] - first_id + timeobj = data['timestamp'][i].time() + seconds[id] = timeobj.second + 60 * (timeobj.minute + 60 * timeobj.hour) + + norm_seconds = 2 * math.pi * seconds / (24 * 3600) + + if 'time_of_day_column_x' in features: + augmented['time_of_day_column_x'] = np.cos(norm_seconds) + if 'time_of_day_column_y' in features: + augmented['time_of_day_column_y'] = np.sin(norm_seconds) + return augmented \ No newline at end of file diff --git a/src/data_provider.py b/src/data_provider.py new file mode 100644 index 0000000..63409a2 --- /dev/null +++ b/src/data_provider.py @@ -0,0 +1,220 @@ +from influxdb import InfluxDBClient +import pandas as pd +import os.path +import numpy as np + + +class DataProvider: + chunk_size = 50000 + + def __init__(self, dbconfig, target, data_filename): + self.dbconfig = dbconfig + self.target = target + self.data_filename = data_filename + self.last_time = None + self.total_size = 0 + self.last_chunk_index = 0 + self.chunk_last_times = {} + self.__init_chunks() + self.synchronize() + + def get_dataframe(self, after_time=None): + result = pd.DataFrame() + for chunk_index, last_chunk_time in self.chunk_last_times.items(): + if after_time is None or after_time <= last_chunk_time: + chunk = self.__load_chunk(chunk_index) + if after_time is not None: + chunk = chunk[chunk['timestamp'] > after_time] + result = pd.concat([result, chunk]) + return result + + def get_upper_bound(self, after_time): + for chunk_index, last_chunk_time in self.chunk_last_times.items(): + if after_time < last_chunk_time: + chunk = self.__load_chunk(chunk_index) + chunk = chunk[chunk['timestamp'] > after_time] + return chunk.index[0] + return self.size() + + def size(self): + return self.total_size + + def get_data_range(self, start_index, stop_index=None): + return self.__get_data(start_index, stop_index) + + def transform_anomalies(self, anomalies): + result = [] + if len(anomalies) == 0: + return result + dataframe = self.get_dataframe(None) + for anomaly in anomalies: + start_time = pd.to_datetime(anomaly['start']-1, unit='ms') + finish_time = pd.to_datetime(anomaly['finish']+1, unit='ms') + current_index = (dataframe['timestamp'] >= start_time) & (dataframe['timestamp'] <= finish_time) + anomaly_frame = dataframe[current_index] + cur_anomaly = { + 'start': anomaly_frame.index[0], + 'finish': anomaly_frame.index[len(anomaly_frame) - 1], + 'labeled': anomaly['labeled'] + } + result.append(cur_anomaly) + + return result + + def inverse_transform_indexes(self, indexes): + if len(indexes) == 0: + return [] + dataframe = self.get_data_range(indexes[0][0], indexes[-1][1] + 1) + + return [(dataframe['timestamp'][i1], dataframe['timestamp'][i2]) for (i1, i2) in indexes] + + def synchronize(self): + # last_time = None + # if len(self.dataframe/) > 0: + # last_time = self.dataframe['time'][len(self.dataframe)-1] + append_dataframe = self.load_from_db(self.last_time) + self.__append_data(append_dataframe) + # append_dataframe + # append_dataframe.to_csv(self.data_filename, mode='a', index=False, header=False) + # self.dataframe = pd.concat([self.dataframe, append_dataframe], ignore_index=True) + + # def load(self): + # if os.path.exists(self.data_filename): + # self.dataframe = pd.read_csv(self.data_filename, parse_dates=[0]) + # self.synchronize() + # else: + # append_dataframe = self.load_from_db() + # self.__append_data(append_dataframe) + # #self.dataframe.to_csv(self.data_filename, index=False, header=True) + + def custom_query(self, after_time): + query = self.target["query"] + timeFilter = "TRUE" + if after_time is not None: + timeFilter = "time > '%s'" % (str(after_time)) + query = query.replace("$timeFilter", timeFilter) + return query + + def load_from_db(self, after_time=None): + """Instantiate a connection to the InfluxDB.""" + host = self.dbconfig['host'] + port = self.dbconfig['port'] + user = self.dbconfig['user'] + password = self.dbconfig['password'] + dbname = self.dbconfig['dbname'] + + client = InfluxDBClient(host, port, user, password, dbname) + # query = 'select k0, k1, k2 from vals;' + + measurement = self.target['measurement'] + select = self.target['select'] + tags = self.target['tags'] + + if "query" in self.target: + query = self.custom_query(after_time) + else: + select_values = select[0][0]['params'] + escaped_select_values = ["\"" + value + "\"" for value in select_values] + + conditions_entries = [] + if len(tags) > 0: + for tag in tags: + conditions_entries.append("(\"" + tag['key'] + "\"" + tag['operator'] + "'" + tag['value'] + "')") + if after_time: + conditions_entries.append("time > '%s'" % (str(after_time))) + + condition = "" + if len(conditions_entries) > 0: + condition = " where " + " AND ".join(conditions_entries) + + query = "select %s from \"%s\"%s;" % (",".join(escaped_select_values), measurement, condition) + + result = client.query(query, chunked=True, chunk_size=10000) + dataframe = pd.DataFrame(result.get_points()) + if len(dataframe) > 0: + cols = dataframe.columns.tolist() + cols.remove('time') + cols = ['time'] + cols + dataframe = dataframe[cols] + + dataframe['time'] = pd.to_datetime(dataframe['time']) + dataframe = dataframe.dropna(axis=0, how='any') + + return dataframe + + def __init_chunks(self): + chunk_index = 0 + self.last_chunk_index = 0 + while True: + filename = self.data_filename + if chunk_index > 0: + filename += "." + str(chunk_index) + if os.path.exists(filename): + self.last_chunk_index = chunk_index + chunk = self.__load_chunk(chunk_index) + chunk_last_time = chunk.iloc[len(chunk) - 1]['timestamp'] + self.chunk_last_times[chunk_index] = chunk_last_time + self.last_time = chunk_last_time + else: + break + chunk_index += 1 + self.total_size = self.last_chunk_index * self.chunk_size + last_chunk = self.__load_chunk(self.last_chunk_index) + self.total_size += len(last_chunk) + + def __load_chunk(self, index): + filename = self.data_filename + if index > 0: + filename += "." + str(index) + + if os.path.exists(filename): + chunk = pd.read_csv(filename, parse_dates=[0]) + frame_index = np.arange(index * self.chunk_size, index * self.chunk_size + len(chunk)) + chunk = chunk.set_index(frame_index) + return chunk.rename(columns={chunk.columns[0]: "timestamp", chunk.columns[1]: "value"}) + return pd.DataFrame() + + def __save_chunk(self, index, dataframe): + filename = self.data_filename + if index > 0: + filename += "." + str(index) + + chunk_last_time = dataframe.iloc[len(dataframe) - 1]['time'] + self.chunk_last_times[index] = chunk_last_time + + if os.path.exists(filename): + dataframe.to_csv(filename, mode='a', index=False, header=False) + else: + dataframe.to_csv(filename, mode='w', index=False, header=True) + + def __append_data(self, dataframe): + while len(dataframe) > 0: + chunk = self.__load_chunk(self.last_chunk_index) + rows_count = min(self.chunk_size - len(chunk), len(dataframe)) + + rows = dataframe.iloc[0:rows_count] + + if len(rows) > 0: + self.__save_chunk(self.last_chunk_index, rows) + self.total_size += rows_count + + self.last_time = rows.iloc[-1]['time'] + dataframe = dataframe[rows_count:] + + if len(dataframe) > 0: + self.last_chunk_index += 1 + + def __get_data(self, start_index, stop_index): + result = pd.DataFrame() + start_chunk = start_index // self.chunk_size + finish_chunk = self.last_chunk_index + if stop_index is not None: + finish_chunk = stop_index // self.chunk_size + for chunk_num in range(start_chunk, finish_chunk + 1): + chunk = self.__load_chunk(chunk_num) + if stop_index is not None and chunk_num == finish_chunk: + chunk = chunk[:stop_index % self.chunk_size] + if chunk_num == start_chunk: + chunk = chunk[start_index % self.chunk_size:] + result = pd.concat([result, chunk]) + return result diff --git a/src/learn.py b/src/learn.py new file mode 100644 index 0000000..7925a03 --- /dev/null +++ b/src/learn.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +import csv +import os +from worker import worker + + +def enqueue_task(): + tasks_file = "tasks.csv" + tasks = [] + with open(tasks_file) as csvfile: + rdr = csv.reader(csvfile, delimiter=',') + tasks = list(rdr) + if len(tasks) == 0: + return None + res = tasks[0][0] + tasks = tasks[1:] + with open(tasks_file, "w+") as csvfile: + writer = csv.writer(csvfile) + writer.writerows(tasks) + return res + + +def set_lock(value): + lock_file = "learn.lock" + exists = os.path.exists(lock_file) + if exists == value: + return False + + if value: + open(lock_file, "w+") + else: + os.remove(lock_file) + return True + + +if __name__ == "__main__": + if not set_lock(True): + print("learn locked") + exit(0) + + w = worker() + while True: + task = enqueue_task() + if task is None: + break + + w.start() + w.add_task({"type": "learn", "anomaly_name": task}) + w.add_task({"type": "predict", "anomaly_name": task}) + w.stop() + + set_lock(False) \ No newline at end of file diff --git a/src/pattern_detection_model.py b/src/pattern_detection_model.py new file mode 100644 index 0000000..8396578 --- /dev/null +++ b/src/pattern_detection_model.py @@ -0,0 +1,127 @@ +from data_provider import DataProvider +import logging +import os.path +import json +import pandas as pd + +datasource_folder = "datasources/" +dataset_folder = "datasets/" +anomalies_folder = "anomalies/" +models_folder = "models/" +metrics_folder = "metrics/" +logger = logging.getLogger('analytic_toolset') + + +def segments_box(segments): + max_time = 0 + min_time = float("inf") + for segment in segments: + min_time = min(min_time, segment['start']) + max_time = max(max_time, segment['finish']) + min_time = pd.to_datetime(min_time, unit='ms') + max_time = pd.to_datetime(max_time, unit='ms') + return min_time, max_time + + +class PatternDetectionModel: + + def __init__(self, pattern_name, preset=None): + self.pattern_name = pattern_name + self.preset = preset + + self.__load_anomaly_config() + datasource = self.anomaly_config['metric']['datasource'] + metric_name = self.anomaly_config['metric']['targets'][0] + + dbconfig_filename = os.path.join(datasource_folder, datasource + ".json") + target_filename = os.path.join(metrics_folder, metric_name + ".json") + + dataset_filename = os.path.join(dataset_folder, metric_name + ".csv") + + with open(dbconfig_filename, 'r') as config_file: + dbconfig = json.load(config_file) + + with open(target_filename, 'r') as file: + target = json.load(file) + + self.data_prov = DataProvider(dbconfig, target, dataset_filename) + + self.model = None + self.__load_model(preset) + + def learn(self, segments): + self.model = self.__create_model(self.preset) + window_size = 200 + + dataframe = self.data_prov.get_dataframe() + start_index, stop_index = 0, len(dataframe) + if len(segments) > 0: + min_time, max_time = segments_box(segments) + start_index = dataframe[dataframe['timestamp'] >= min_time].index[0] + stop_index = dataframe[dataframe['timestamp'] > max_time].index[0] + start_index = max(start_index - window_size, 0) + stop_index = min(stop_index + window_size, len(dataframe)) + + dataframe = dataframe[start_index:stop_index] + + segments = self.data_prov.transform_anomalies(segments) + self.model.fit(dataframe, segments) + self.__save_model() + return 0 + # return last_prediction_time + + def predict(self, last_prediction_time): + if self.model is None: + return [], last_prediction_time + + window_size = 100 + last_prediction_time = pd.to_datetime(last_prediction_time, unit='ms') + + start_index = self.data_prov.get_upper_bound(last_prediction_time) + start_index = max(0, start_index - window_size) + dataframe = self.data_prov.get_data_range(start_index) + + predicted_indexes = self.model.predict(dataframe) + predicted_indexes = [(x, y) for (x, y) in predicted_indexes if x >= start_index and y >= start_index] + + predicted_times = self.data_prov.inverse_transform_indexes(predicted_indexes) + segments = [] + for time_value in predicted_times: + ts1 = int(time_value[0].timestamp() * 1000) + ts2 = int(time_value[1].timestamp() * 1000) + segments.append({ + 'start': ts1, + 'finish': ts2 + }) + + last_dataframe_time = dataframe.iloc[- 1]['timestamp'] + last_prediction_time = int(last_dataframe_time.timestamp() * 1000) + return segments, last_prediction_time + # return predicted_anomalies, last_prediction_time + + def synchronize_data(self): + self.data_prov.synchronize() + + def __create_model(self, preset): + if preset == "peaks": + from peaks_detector import PeaksDetector + return PeaksDetector() + if preset == "steps" or preset == "cliffs": + from step_detector import StepDetector + return StepDetector(preset) + + def __load_anomaly_config(self): + with open(os.path.join(anomalies_folder, self.pattern_name + ".json"), 'r') as config_file: + self.anomaly_config = json.load(config_file) + + def __save_model(self): + logger.info("Save model '%s'" % self.pattern_name) + model_filename = os.path.join(models_folder, self.pattern_name + ".m") + self.model.save(model_filename) + + def __load_model(self, preset): + logger.info("Load model '%s'" % self.pattern_name) + model_filename = os.path.join(models_folder, self.pattern_name + ".m") + if os.path.exists(model_filename): + self.model = self.__create_model(preset) + self.model.load(model_filename) \ No newline at end of file diff --git a/src/peaks_detector.py b/src/peaks_detector.py new file mode 100644 index 0000000..3ea1138 --- /dev/null +++ b/src/peaks_detector.py @@ -0,0 +1,71 @@ +from scipy import signal +import numpy as np +import step_detect + + +class PeaksDetector: + def __init__(self): + pass + + def fit(self, dataset, contamination=0.005): + pass + + def predict(self, dataframe): + array = dataframe['value'].as_matrix() + window_size = 20 + # window = np.ones(101) + # mean_filtered = signal.fftconvolve( + # np.concatenate([np.zeros(window_size), array, np.zeros(window_size)]), + # window, + # mode='valid' + # ) + # filtered = np.divide(array, mean_filtered / 101) + + window = signal.general_gaussian(2 * window_size + 1, p=0.5, sig=5) + #print(window) + filtered = signal.fftconvolve(array, window, mode='valid') + + # filtered = np.concatenate([ + # np.zeros(window_size), + # filtered, + # np.zeros(window_size) + # ]) + filtered = filtered / np.sum(window) + array = array[window_size:-window_size] + filtered = np.subtract(array, filtered) + + import matplotlib.pyplot as plt + + # filtered = np.convolve(array, step, mode='valid') + # print(len(array)) + # print(len(filtered)) + + # step = np.hstack((np.ones(window_size), 0, -1*np.ones(window_size))) + # + # conv = np.convolve(array, step, mode='valid') + # + # conv = np.concatenate([ + # np.zeros(window_size), + # conv, + # np.zeros(window_size)]) + + #data = step_detect.t_scan(array, window=window_size) + data = filtered + data /= data.max() + + #plt.plot(array[:1000]) + plt.plot(data[:1000]) + plt.show() + + result = step_detect.find_steps(data, 0.1) + return [dataframe.index[x + window_size] for x in result] + + def save(self, model_filename): + pass + # with open(model_filename, 'wb') as file: + # pickle.dump((self.clf, self.scaler), file) + + def load(self, model_filename): + pass + # with open(model_filename, 'rb') as file: + # self.clf, self.scaler = pickle.load(file) \ No newline at end of file diff --git a/src/predict.py b/src/predict.py new file mode 100644 index 0000000..bd975a8 --- /dev/null +++ b/src/predict.py @@ -0,0 +1,83 @@ +import argparse +import csv +import time +import datetime +import pandas as pd +import matplotlib.pyplot as plt + +from influxdb import InfluxDBClient +from sklearn import svm +import numpy as np +import math +import pickle + + +host = "209.205.120.226" +port = 8086 +datasetFile = "/tmp/dataset.csv" +anomaliesFile = "anomalies.csv" +predictedAnomaliesFile = "predicted_anomalies.csv" +modelFilename = 'finalized_model.sav' + + +def readAnomalies(): + anomalies = [] + + with open(anomaliesFile) as csvfile: + rdr = csv.reader(csvfile, delimiter=',') + for row in rdr: + anomaly = (int(row[0]), int(row[1])) + anomalies.append(anomaly) + + return anomalies + + +"""Instantiate a connection to the InfluxDB.""" +user = '' +password = '' +dbname = 'accelerometer' +query = 'select k0, k1, k2 from vals limit 10000;' + + +client = InfluxDBClient(host, port, user, password, dbname) + +def predict(host=host, port=port): + + result = client.query(query) + df = pd.DataFrame(result['vals'], columns=['time', 'k0', 'k1', 'k2']) + + basedAnomalies = readAnomalies() + + df2 = df.rolling(200, win_type='triang').sum() + df2['time'] = pd.to_datetime(df2['time']) + df2 = df2[np.isfinite(df2['k0'])] + + print(len(df2)) + + + anomalies = [] + last_anomaly = (-1, -1) + with open(modelFilename, 'rb') as fid: + clf = pickle.load(fid) + prediction = clf.predict(df2[['k0', 'k1', 'k2']]) + print(len(prediction)) + #print(prediction) + for i in range(len(prediction)): + if prediction[i] > 0.: + t = df2['time'][i + 199].timestamp() + t = ((t + 0 * 3600) * 1000) + if t < basedAnomalies[len(basedAnomalies) - 1][1]: + continue + if t < last_anomaly[1] + 1000: + last_anomaly = (last_anomaly[0], t) + else: + if last_anomaly[1] != -1: + anomalies.append(last_anomaly) + last_anomaly = (t, t) + + with open(predictedAnomaliesFile, "w") as file: + for anomaly in anomalies: + file.write(str(int(anomaly[0])) + "," + str(int(anomaly[1])) + "\n") + +predict() + diff --git a/src/prophet_algorithm.py b/src/prophet_algorithm.py new file mode 100644 index 0000000..f51c99d --- /dev/null +++ b/src/prophet_algorithm.py @@ -0,0 +1,46 @@ +from fbprophet import Prophet +import pandas as pd + + +class prophet_algorithm(object): + def __init__(self): + self.model = None + self.dataset = None + + def fit(self, data, anomalies): + pass + + def predict(self, data): + data = data.reset_index() + data = data.rename(columns={'timestamp': 'ds', 'value': 'y'}) + self.dataset = data + + self.model = Prophet(yearly_seasonality=False, weekly_seasonality=False, daily_seasonality=True) + self.model.fit(self.dataset) + + future = self.model.make_future_dataframe(freq='H', periods=0, include_history=True) + forecast = self.model.predict(future) + cmp_df = forecast.set_index('ds')[['yhat', 'yhat_lower', 'yhat_upper']].join(self.dataset.set_index('ds')) + cmp_df['e'] = [ max(row.y - row.yhat_upper, row.yhat_lower - row.y, 0) for index, row in cmp_df.iterrows() ] + return self.__calc_anomalies(cmp_df) + + def __calc_anomalies(self, dataset): + anomalies = [] + cur_anomaly = None + for i in range(len(dataset)): + if dataset['e'][i] > 17: + if cur_anomaly is None: + cur_anomaly = {'start': dataset.index[i], 'finish': dataset.index[i], 'weight': 0} + cur_anomaly['finish'] = dataset.index[i] + cur_anomaly['weight'] += dataset['e'][i] + elif cur_anomaly is not None: + anomalies.append(cur_anomaly) + cur_anomaly = None + return anomalies + + +if __name__ == "__main__": + dataset = pd.read_csv('art_daily_flatmiddle.csv', index_col=['timestamp'], parse_dates=['timestamp']) + algo = prophet_algorithm(dataset) + res = algo.fit() + print(res) \ No newline at end of file diff --git a/src/step_detect.py b/src/step_detect.py new file mode 100644 index 0000000..4ff627d --- /dev/null +++ b/src/step_detect.py @@ -0,0 +1,231 @@ + +""" +Thomas Kahn +thomas.b.kahn@gmail.com +""" +from __future__ import absolute_import +from math import sqrt +import multiprocessing as mp +import numpy as np +from six.moves import range +from six.moves import zip + + +def t_scan(L, window = 1e3, num_workers = -1): + """ + Computes t statistic for i to i+window points versus i-window to i + points for each point i in input array. Uses multiple processes to + do this calculation asynchronously. Array is decomposed into window + number of frames, each consisting of points spaced at window + intervals. This optimizes the calculation, as the drone function + need only compute the mean and variance for each set once. + Parameters + ---------- + L : numpy array + 1 dimensional array that represents time series of datapoints + window : int / float + Number of points that comprise the windows of data that are + compared + num_workers : int + Number of worker processes for multithreaded t_stat computation + Defult value uses num_cpu - 1 workers + Returns + ------- + t_stat : numpy array + Array which holds t statistic values for each point. The first + and last (window) points are replaced with zero, since the t + statistic calculation cannot be performed in that case. + """ + size = L.size + window = int(window) + frames = list(range(window)) + n_cols = (size // window) - 1 + + t_stat = np.zeros((window, n_cols)) + + if num_workers == 1: + results = [_t_scan_drone(L, n_cols, frame, window) for frame in frames] + else: + if num_workers == -1: + num_workers = mp.cpu_count() - 1 + pool = mp.Pool(processes = num_workers) + results = [pool.apply_async(_t_scan_drone, args=(L, n_cols, frame, window)) for frame in frames] + results = [r.get() for r in results] + pool.close() + + for index, row in results: + t_stat[index] = row + + t_stat = np.concatenate(( + np.zeros(window), + t_stat.transpose().ravel(order='C'), + np.zeros(size % window) + )) + + return t_stat + + +def _t_scan_drone(L, n_cols, frame, window=1e3): + """ + Drone function for t_scan. Not Intended to be called manually. + Computes t_scan for the designated frame, and returns result as + array along with an integer tag for proper placement in the + aggregate array + """ + size = L.size + window = int(window) + root_n = sqrt(window) + + output = np.zeros(n_cols) + b = L[frame:window+frame] + b_mean = b.mean() + b_var = b.var() + for i in range(window+frame, size-window, window): + a = L[i:i+window] + a_mean = a.mean() + a_var = a.var() + output[i // window - 1] = root_n * (a_mean - b_mean) / sqrt(a_var + b_var) + b_mean, b_var = a_mean, a_var + + return frame, output + + +def mz_fwt(x, n=2): + """ + Computes the multiscale product of the Mallat-Zhong discrete forward + wavelet transform up to and including scale n for the input data x. + If n is even, the spikes in the signal will be positive. If n is odd + the spikes will match the polarity of the step (positive for steps + up, negative for steps down). + This function is essentially a direct translation of the MATLAB code + provided by Sadler and Swami in section A.4 of the following: + http://www.dtic.mil/dtic/tr/fulltext/u2/a351960.pdf + Parameters + ---------- + x : numpy array + 1 dimensional array that represents time series of data points + n : int + Highest scale to multiply to + Returns + ------- + prod : numpy array + The multiscale product for x + """ + N_pnts = x.size + lambda_j = [1.5, 1.12, 1.03, 1.01][0:n] + if n > 4: + lambda_j += [1.0]*(n-4) + + H = np.array([0.125, 0.375, 0.375, 0.125]) + G = np.array([2.0, -2.0]) + + Gn = [2] + Hn = [3] + for j in range(1,n): + q = 2**(j-1) + Gn.append(q+1) + Hn.append(3*q+1) + + S = np.concatenate((x[::-1], x)) + S = np.concatenate((S, x[::-1])) + prod = np.ones(N_pnts) + for j in range(n): + n_zeros = 2**j - 1 + Gz = _insert_zeros(G, n_zeros) + Hz = _insert_zeros(H, n_zeros) + current = (1.0/lambda_j[j])*np.convolve(S,Gz) + current = current[N_pnts+Gn[j]:2*N_pnts+Gn[j]] + prod *= current + if j == n-1: + break + S_new = np.convolve(S, Hz) + S_new = S_new[N_pnts+Hn[j]:2*N_pnts+Hn[j]] + S = np.concatenate((S_new[::-1], S_new)) + S = np.concatenate((S, S_new[::-1])) + return prod + + +def _insert_zeros(x, n): + """ + Helper function for mz_fwt. Splits input array and adds n zeros + between values. + """ + newlen = (n+1)*x.size + out = np.zeros(newlen) + indices = list(range(0, newlen-n, n+1)) + out[indices] = x + return out + + +def find_steps(array, threshold): + """ + Finds local maxima by segmenting array based on positions at which + the threshold value is crossed. Note that this thresholding is + applied after the absolute value of the array is taken. Thus, + the distinction between upward and downward steps is lost. However, + get_step_sizes can be used to determine directionality after the + fact. + Parameters + ---------- + array : numpy array + 1 dimensional array that represents time series of data points + threshold : int / float + Threshold value that defines a step + Returns + ------- + steps : list + List of indices of the detected steps + """ + steps = [] + array = np.abs(array) + above_points = np.where(array > threshold, 1, 0) + ap_dif = np.diff(above_points) + cross_ups = np.where(ap_dif == 1)[0] + cross_dns = np.where(ap_dif == -1)[0] + for upi, dni in zip(cross_ups,cross_dns): + steps.append(np.argmax(array[upi:dni]) + upi) + return steps + + +def get_step_sizes(array, indices, window=1000): + """ + Calculates step size for each index within the supplied list. Step + size is determined by averaging over a range of points (specified + by the window parameter) before and after the index of step + occurrence. The directionality of the step is reflected by the sign + of the step size (i.e. a positive value indicates an upward step, + and a negative value indicates a downward step). The combined + standard deviation of both measurements (as a measure of uncertainty + in step calculation) is also provided. + Parameters + ---------- + array : numpy array + 1 dimensional array that represents time series of data points + indices : list + List of indices of the detected steps (as provided by + find_steps, for example) + window : int, optional + Number of points to average over to determine baseline levels + before and after step. + Returns + ------- + step_sizes : list + List of the calculated sizes of each step + step_error : list + """ + step_sizes = [] + step_error = [] + indices = sorted(indices) + last = len(indices) - 1 + for i, index in enumerate(indices): + if i == 0: + q = min(window, indices[i+1]-index) + elif i == last: + q = min(window, index - indices[i-1]) + else: + q = min(window, index-indices[i-1], indices[i+1]-index) + a = array[index:index+q] + b = array[index-q:index] + step_sizes.append(a.mean() - b.mean()) + step_error.append(sqrt(a.var()+b.var())) + return step_sizes, step_error \ No newline at end of file diff --git a/src/step_detector.py b/src/step_detector.py new file mode 100644 index 0000000..0c2d66a --- /dev/null +++ b/src/step_detector.py @@ -0,0 +1,188 @@ +import numpy as np +import pickle + + +def find_segments(array, threshold): + segments = [] + above_points = np.where(array > threshold, 1, 0) + ap_dif = np.diff(above_points) + cross_ups = np.where(ap_dif == 1)[0] + cross_dns = np.where(ap_dif == -1)[0] + for upi, dni in zip(cross_ups,cross_dns): + segments.append((upi, dni)) + return segments + + +def is_intersect(target_segment, segments): + for segment in segments: + start = max(segment['start'], target_segment[0]) + finish = min(segment['finish'], target_segment[1]) + if start <= finish: + return True + return False + + +def calc_intersections(segments, finded_segments): + intersections = 0 + labeled = 0 + for segment in segments: + if not segment['labeled']: + continue + + labeled += 1 + intersect = False + for finded_segment in finded_segments: + start = max(segment['start'], finded_segment[0]) + finish = min(segment['finish'], finded_segment[1]) + if start <= finish: + intersect = True + break + if intersect: + intersections += 1 + return intersections, labeled + + +def cost_function(segments, finded_segments): + intersections, labeled = calc_intersections(segments, finded_segments) + return intersections == labeled + + +def compress_segments(segments): + result = [] + for segment in segments: + if len(result) == 0 or result[len(result) - 1][1] < segment[0]: + result.append(segment) + else: + result[len(result) - 1] = (result[len(result) - 1][0], segment[1]) + return result + + +class StepDetector: + def __init__(self, preset): + self.preset = preset + self.mean = None + self.window_size = None + self.corr_max = None + self.threshold = None + self.segments = [] + + def fit(self, dataframe, segments, contamination=0.01): + array = dataframe['value'].as_matrix() + self.mean = array.mean() + self.segments = segments + + norm_data = (array - self.mean) + + self.__optimize(norm_data, segments, contamination) + + # print(self.threshold) + + # import matplotlib.pyplot as plt + # fig, ax = plt.subplots(figsize=[18, 16]) + # ax = fig.add_subplot(2, 1, 1) + # ax.plot(array) + # ax = fig.add_subplot(2, 1, 2, sharex=ax) + # ax.plot(corr_res) + # plt.show() + + # #print(R.size) + # # Nw = 20 + # # result = R[Nw,Nw:-1] + # # result[0] = 0 + # #ax.plot(result) + # #print(len(data)) + # #print(len(R)) + # + # print(self.window_size) + # print(self.threshold) + + def predict(self, dataframe): + array = dataframe['value'].as_matrix() + + norm_data = (array - self.mean) + + step_size = self.window_size // 2 + pattern = np.concatenate([[-1] * step_size, [1] * step_size]) + corr_res = np.correlate(norm_data, pattern, mode='valid') / self.window_size + corr_res = np.concatenate((np.zeros(step_size), corr_res, np.zeros(step_size))) + + corr_res /= self.corr_max + + result = self.__predict(corr_res, self.threshold) + + # import matplotlib.pyplot as plt + # fig, ax = plt.subplots(figsize=[18, 16]) + # ax = fig.add_subplot(2, 1, 1) + # ax.plot(array[:70000]) + # ax = fig.add_subplot(2, 1, 2, sharex=ax) + # ax.plot(corr_res[:70000]) + # plt.show() + + result.sort() + result = compress_segments(result) + + if len(self.segments) > 0: + result = [segment for segment in result if not is_intersect(segment, self.segments)] + return result + + def __optimize(self, data, segments, contamination): + window_size = 10 + mincost = None + while window_size < 100: + # print(window_size) + cost = self.__optimize_threshold(data, window_size, segments, contamination) + if mincost is None or cost < mincost: + mincost = cost + self.window_size = window_size + window_size = int(window_size * 1.2) + self.__optimize_threshold(data, self.window_size, segments, contamination) + + def __optimize_threshold(self, data, window_size, segments, contamination): + step_size = window_size // 2 + pattern = np.concatenate([[-1] * step_size, [1] * step_size]) + corr_res = np.correlate(data, pattern, mode='same') / window_size + corr_res = np.concatenate((np.zeros(step_size), corr_res, np.zeros(step_size))) + self.corr_max = corr_res.max() + corr_res /= self.corr_max + N = 20 + lower = 0. + upper = 1. + cost = 0 + for i in range(0, N): + self.threshold = 0.5 * (lower + upper) + result = self.__predict(corr_res, self.threshold) + + if len(segments) > 0: + intersections, labeled = calc_intersections(segments, result) + good = intersections == labeled + cost = len(result) + else: + total_sum = 0 + for segment in result: + total_sum += (segment[1] - segment[0]) + good = total_sum > len(data) * contamination + cost = -self.threshold + + if good: + lower = self.threshold + else: + upper = self.threshold + + return cost + + def __predict(self, data, threshold): + segments = find_segments(data, threshold) + segments += find_segments(data * -1, threshold) + #segments -= 1 + return [(x - 1, y - 1) for (x, y) in segments] + + def save(self, model_filename): + with open(model_filename, 'wb') as file: + pickle.dump((self.mean, self.window_size, self.corr_max, self.threshold), file) + + def load(self, model_filename): + try: + with open(model_filename, 'rb') as file: + self.mean, self.window_size, self.corr_max, self.threshold = pickle.load(file) + except: + pass \ No newline at end of file diff --git a/src/supervised_algorithm.py b/src/supervised_algorithm.py new file mode 100644 index 0000000..59da1a4 --- /dev/null +++ b/src/supervised_algorithm.py @@ -0,0 +1,71 @@ +import pickle +from tsfresh.transformers.feature_selector import FeatureSelector +from sklearn.preprocessing import MinMaxScaler +from sklearn.ensemble import IsolationForest +import pandas as pd + +from sklearn import svm + + +class supervised_algorithm(object): + frame_size = 16 + good_features = [ + #"value__agg_linear_trend__f_agg_\"max\"__chunk_len_5__attr_\"intercept\"", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_12__w_20", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_13__w_5", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_2__w_10", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_2__w_20", + # "value__cwt_coefficients__widths_(2, 5, 10, 20)__coeff_8__w_20", + # "value__fft_coefficient__coeff_3__attr_\"abs\"", + "time_of_day_column_x", + "time_of_day_column_y", + "value__abs_energy", + # "value__absolute_sum_of_changes", + # "value__sum_of_reoccurring_data_points", + ] + clf = None + scaler = None + + def __init__(self): + self.features = [] + self.col_to_max, self.col_to_min, self.col_to_median = None, None, None + self.augmented_path = None + + def fit(self, dataset, contamination=0.005): + dataset = dataset[self.good_features] + dataset = dataset[-100000:] + + self.scaler = MinMaxScaler(feature_range=(-1, 1)) + # self.clf = svm.OneClassSVM(nu=contamination, kernel="rbf", gamma=0.1) + self.clf = IsolationForest(contamination=contamination) + + self.scaler.fit(dataset) + + dataset = self.scaler.transform(dataset) + self.clf.fit(dataset) + + def predict(self, dataframe): + dataset = dataframe[self.good_features] + dataset = self.scaler.transform(dataset) + prediction = self.clf.predict(dataset) + + # for i in range(len(dataset)): + # print(str(dataset[i]) + " " + str(prediction[i])) + + prediction = [x < 0.0 for x in prediction] + return pd.Series(prediction, index=dataframe.index) + + def save(self, model_filename): + with open(model_filename, 'wb') as file: + pickle.dump((self.clf, self.scaler), file) + + def load(self, model_filename): + with open(model_filename, 'rb') as file: + self.clf, self.scaler = pickle.load(file) + + def __select_features(self, x, y): + # feature_selector = FeatureSelector() + feature_selector = FeatureSelector() + + feature_selector.fit(x, y) + return feature_selector.relevant_features diff --git a/src/worker.py b/src/worker.py new file mode 100644 index 0000000..7359fbf --- /dev/null +++ b/src/worker.py @@ -0,0 +1,131 @@ +from anomaly_model import AnomalyModel +from pattern_detection_model import PatternDetectionModel +import queue +import threading +import json +import logging +import sys +import traceback + +logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', + filename='analytic_toolset.log', + filemode='a') +logger = logging.getLogger('analytic_toolset') + + +class worker(object): + models_cache = {} + thread = None + queue = queue.Queue() + + def start(self): + self.thread = threading.Thread(target=self.run) + self.thread.start() + + def stop(self): + if self.thread: + self.queue.put(None) + self.thread.join() + + def run(self): + while True: + task = self.queue.get() + if task['type'] == "stop": + break + self.do_task(task) + self.queue.task_done() + + def add_task(self, task): + self.queue.put(task) + + def do_task(self, task): + try: + type = task['type'] + anomaly_id = task['anomaly_id'] + if type == "predict": + last_prediction_time = task['last_prediction_time'] + analytics_type = task['analytics_type'] + preset = None + if "preset" in task: + preset = task['preset'] + result = self.do_predict(anomaly_id, last_prediction_time, analytics_type, preset) + elif type == "learn": + segments = task['segments'] + analytics_type = task['analytics_type'] + preset = None + if "preset" in task: + preset = task['preset'] + result = self.do_learn(anomaly_id, segments, analytics_type, preset) + else: + result = { + 'status': "failed", + 'error': "unknown type " + str(type) + } + except Exception as e: + #traceback.extract_stack() + error_text = traceback.format_exc() + logger.error("Exception: '%s'" % error_text) + result = { + 'task': type, + 'status': "failed", + 'anomaly_id': anomaly_id, + 'error': str(e) + } + return result + + def do_learn(self, anomaly_id, segments, analytics_type, preset=None): + model = self.get_model(anomaly_id, analytics_type, preset) + model.synchronize_data() + last_prediction_time = model.learn(segments) + result = self.do_predict(anomaly_id, last_prediction_time, analytics_type, preset) + result['task'] = 'learn' + return result + + def do_predict(self, anomaly_id, last_prediction_time, analytics_type, preset=None): + model = self.get_model(anomaly_id, analytics_type, preset) + model.synchronize_data() + segments, last_prediction_time = model.predict(last_prediction_time) + return { + 'task': "predict", + 'status': "success", + 'anomaly_id': anomaly_id, + 'segments': segments, + 'last_prediction_time': last_prediction_time + } + + def get_model(self, anomaly_id, analytics_type, preset=None): + if anomaly_id not in self.models_cache: + if analytics_type == "anomalies": + model = AnomalyModel(anomaly_id) + elif analytics_type == "patterns": + model = PatternDetectionModel(anomaly_id, preset) + self.models_cache[anomaly_id] = model + return self.models_cache[anomaly_id] + + +if __name__ == "__main__": + w = worker() + logger.info("Worker was started") + while True: + try: + text = input("") + task = json.loads(text) + logger.info("Received command '%s'" % text) + if task['type'] == "stop": + logger.info("Stopping...") + break + print(json.dumps({ + 'task': task['type'], + 'anomaly_id': task['anomaly_id'], + '__task_id': task['__task_id'], + 'status': "in progress" + })) + sys.stdout.flush() + res = w.do_task(task) + res['__task_id'] = task['__task_id'] + print(json.dumps(res)) + sys.stdout.flush() + except Exception as e: + logger.error("Exception: '%s'" % str(e)) +