Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-08-09 06:49:19 +0300
committerKat Marchán <kzm@zkat.tech>2018-08-09 06:49:55 +0300
commitf861c2b579a9d4feae1653222afcefdd4f0e978f (patch)
tree86becac1713437401ada0cf90cb4f468dbb87581 /node_modules
parent866d776c27f80a71309389aaab42825b2a0916f6 (diff)
node-gyp@3.8.0
Credit: @rvagg
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/boom/.npmignore18
-rwxr-xr-xnode_modules/boom/.travis.yml8
-rw-r--r--node_modules/boom/CONTRIBUTING.md1
-rwxr-xr-xnode_modules/boom/LICENSE28
-rwxr-xr-xnode_modules/boom/README.md652
-rwxr-xr-xnode_modules/boom/images/boom.pngbin29479 -> 0 bytes
-rwxr-xr-xnode_modules/boom/lib/index.js318
-rw-r--r--node_modules/boom/package.json59
-rwxr-xr-xnode_modules/boom/test/index.js654
-rw-r--r--node_modules/cryptiles/.npmignore18
-rwxr-xr-xnode_modules/cryptiles/.travis.yml8
-rwxr-xr-xnode_modules/cryptiles/LICENSE28
-rw-r--r--node_modules/cryptiles/README.md16
-rwxr-xr-xnode_modules/cryptiles/lib/index.js68
-rwxr-xr-xnode_modules/cryptiles/package.json59
-rwxr-xr-xnode_modules/cryptiles/test/index.js102
-rw-r--r--node_modules/hawk/.npmignore20
-rwxr-xr-xnode_modules/hawk/.travis.yml5
-rwxr-xr-xnode_modules/hawk/LICENSE28
-rwxr-xr-xnode_modules/hawk/README.md634
-rw-r--r--node_modules/hawk/bower.json24
-rw-r--r--node_modules/hawk/component.json19
-rw-r--r--node_modules/hawk/dist/client.js343
-rwxr-xr-xnode_modules/hawk/example/usage.js78
-rwxr-xr-xnode_modules/hawk/images/hawk.pngbin6945 -> 0 bytes
-rwxr-xr-xnode_modules/hawk/images/logo.pngbin71732 -> 0 bytes
-rwxr-xr-xnode_modules/hawk/lib/browser.js637
-rwxr-xr-xnode_modules/hawk/lib/client.js369
-rwxr-xr-xnode_modules/hawk/lib/crypto.js126
-rwxr-xr-xnode_modules/hawk/lib/index.js15
-rwxr-xr-xnode_modules/hawk/lib/server.js548
-rwxr-xr-xnode_modules/hawk/lib/utils.js184
-rwxr-xr-xnode_modules/hawk/package.json70
-rwxr-xr-xnode_modules/hawk/test/browser.js1492
-rwxr-xr-xnode_modules/hawk/test/client.js440
-rwxr-xr-xnode_modules/hawk/test/crypto.js70
-rwxr-xr-xnode_modules/hawk/test/index.js378
-rwxr-xr-xnode_modules/hawk/test/readme.js95
-rwxr-xr-xnode_modules/hawk/test/server.js1329
-rwxr-xr-xnode_modules/hawk/test/uri.js838
-rwxr-xr-xnode_modules/hawk/test/utils.js149
-rw-r--r--node_modules/hoek/.npmignore18
-rw-r--r--node_modules/hoek/.travis.yml7
-rw-r--r--node_modules/hoek/CONTRIBUTING.md1
-rw-r--r--node_modules/hoek/LICENSE31
-rw-r--r--node_modules/hoek/README.md584
-rw-r--r--node_modules/hoek/images/hoek.pngbin37939 -> 0 bytes
-rw-r--r--node_modules/hoek/lib/escape.js132
-rw-r--r--node_modules/hoek/lib/index.js993
-rw-r--r--node_modules/hoek/package.json57
-rw-r--r--node_modules/hoek/test/escaper.js88
-rw-r--r--node_modules/hoek/test/index.js2513
-rw-r--r--node_modules/hoek/test/modules/ignore.txt0
-rw-r--r--node_modules/hoek/test/modules/test1.js1
-rw-r--r--node_modules/hoek/test/modules/test2.js1
-rw-r--r--node_modules/hoek/test/modules/test3.js1
-rw-r--r--node_modules/json-stable-stringify/.npmignore1
-rw-r--r--node_modules/json-stable-stringify/.travis.yml4
-rw-r--r--node_modules/json-stable-stringify/LICENSE18
-rw-r--r--node_modules/json-stable-stringify/example/key_cmp.js7
-rw-r--r--node_modules/json-stable-stringify/example/nested.js3
-rw-r--r--node_modules/json-stable-stringify/example/str.js3
-rw-r--r--node_modules/json-stable-stringify/example/value_cmp.js7
-rw-r--r--node_modules/json-stable-stringify/index.js84
-rw-r--r--node_modules/json-stable-stringify/package.json74
-rw-r--r--node_modules/json-stable-stringify/readme.markdown130
-rw-r--r--node_modules/json-stable-stringify/test/cmp.js11
-rw-r--r--node_modules/json-stable-stringify/test/nested.js35
-rw-r--r--node_modules/json-stable-stringify/test/replacer.js74
-rw-r--r--node_modules/json-stable-stringify/test/space.js59
-rw-r--r--node_modules/json-stable-stringify/test/str.js32
-rw-r--r--node_modules/json-stable-stringify/test/to-json.js20
-rw-r--r--node_modules/jsonify/README.markdown34
-rw-r--r--node_modules/jsonify/index.js2
-rw-r--r--node_modules/jsonify/lib/parse.js273
-rw-r--r--node_modules/jsonify/lib/stringify.js154
-rw-r--r--node_modules/jsonify/package.json62
-rw-r--r--node_modules/jsonify/test/parse.js16
-rw-r--r--node_modules/jsonify/test/stringify.js15
-rw-r--r--node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md2
-rw-r--r--node_modules/node-gyp/CHANGELOG.md45
-rw-r--r--node_modules/node-gyp/README.md21
-rw-r--r--node_modules/node-gyp/gyp/AUTHORS7
-rw-r--r--node_modules/node-gyp/gyp/PRESUBMIT.py26
-rw-r--r--node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py2
-rw-r--r--node_modules/node-gyp/gyp/pylib/gyp/generator/make.py21
-rw-r--r--node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py11
-rw-r--r--node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py13
-rw-r--r--node_modules/node-gyp/lib/Find-VS2017.cs4
-rw-r--r--node_modules/node-gyp/lib/configure.js10
-rw-r--r--node_modules/node-gyp/node_modules/ajv/.tonic_example.js20
-rw-r--r--node_modules/node-gyp/node_modules/ajv/LICENSE22
-rw-r--r--node_modules/node-gyp/node_modules/ajv/README.md1213
-rw-r--r--node_modules/node-gyp/node_modules/ajv/dist/ajv.bundle.js8023
-rw-r--r--node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js6
-rw-r--r--node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js.map1
-rw-r--r--node_modules/node-gyp/node_modules/ajv/dist/nodent.min.js8
-rw-r--r--node_modules/node-gyp/node_modules/ajv/dist/regenerator.min.js32
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/ajv.d.ts284
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/ajv.js420
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/async.js218
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/cache.js26
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/_rules.js28
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/equal.js45
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/formats.js164
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/index.js390
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/resolve.js267
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/rules.js40
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/schema_obj.js9
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/ucs2length.js20
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/util.js257
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/compile/validation_error.js14
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/_limit.jst49
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/_limitItems.jst10
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/_limitLength.jst10
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/_limitProperties.jst10
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/allOf.jst34
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/anyOf.jst48
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/coerce.def61
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/custom.jst184
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/defaults.def32
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/definitions.def182
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/dependencies.jst69
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/enum.jst30
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/errors.def185
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/format.jst100
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/items.jst101
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/missing.def34
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/multipleOf.jst20
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/not.jst43
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/oneOf.jst44
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/pattern.jst14
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/properties.jst319
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/ref.jst86
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/required.jst96
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/uniqueItems.jst38
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/v5/_formatLimit.jst116
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/v5/constant.jst10
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/v5/patternRequired.jst28
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/v5/switch.jst73
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dot/validate.jst210
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/README.md3
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/_formatLimit.js176
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limit.js124
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitItems.js76
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitLength.js81
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitProperties.js76
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/allOf.js43
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/anyOf.js65
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/constant.js52
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/custom.js220
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/dependencies.js147
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/enum.js65
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/format.js138
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/items.js144
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/multipleOf.js76
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/not.js83
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/oneOf.js76
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/pattern.js74
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/patternRequired.js51
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/properties.js445
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/ref.js119
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/required.js249
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/switch.js128
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/uniqueItems.js71
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/dotjs/validate.js375
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/keyword.js129
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-draft-04.json150
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-v5.json328
-rw-r--r--node_modules/node-gyp/node_modules/ajv/lib/v5.js52
-rw-r--r--node_modules/node-gyp/node_modules/ajv/package.json131
-rw-r--r--node_modules/node-gyp/node_modules/ajv/scripts/.eslintrc.yml3
-rw-r--r--node_modules/node-gyp/node_modules/ajv/scripts/bundle.js54
-rw-r--r--node_modules/node-gyp/node_modules/ajv/scripts/compile-dots.js73
-rwxr-xr-xnode_modules/node-gyp/node_modules/ajv/scripts/info10
-rwxr-xr-xnode_modules/node-gyp/node_modules/ajv/scripts/prepare-tests9
-rwxr-xr-xnode_modules/node-gyp/node_modules/ajv/scripts/travis-gh-pages23
-rw-r--r--node_modules/node-gyp/node_modules/assert-plus/AUTHORS6
-rw-r--r--node_modules/node-gyp/node_modules/assert-plus/CHANGES.md8
-rw-r--r--node_modules/node-gyp/node_modules/assert-plus/README.md155
-rw-r--r--node_modules/node-gyp/node_modules/assert-plus/assert.js206
-rw-r--r--node_modules/node-gyp/node_modules/assert-plus/package.json82
-rw-r--r--node_modules/node-gyp/node_modules/aws-sign2/LICENSE55
-rw-r--r--node_modules/node-gyp/node_modules/aws-sign2/README.md4
-rw-r--r--node_modules/node-gyp/node_modules/aws-sign2/index.js212
-rw-r--r--node_modules/node-gyp/node_modules/aws-sign2/package.json50
-rw-r--r--node_modules/node-gyp/node_modules/form-data/License19
-rw-r--r--node_modules/node-gyp/node_modules/form-data/README.md217
-rw-r--r--node_modules/node-gyp/node_modules/form-data/lib/browser.js2
-rw-r--r--node_modules/node-gyp/node_modules/form-data/lib/form_data.js444
-rw-r--r--node_modules/node-gyp/node_modules/form-data/lib/populate.js10
-rw-r--r--node_modules/node-gyp/node_modules/form-data/package.json98
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/LICENSE13
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/README.md49
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/afterRequest.json29
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/beforeRequest.json29
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/browser.json19
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/cache.json20
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/content.json28
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/cookie.json35
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/creator.json19
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/entry.json52
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/har.json12
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/header.json19
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/index.js22
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/log.json35
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/page.json31
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/pageTimings.json17
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/postData.json42
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/query.json19
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/request.json56
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/response.json53
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/lib/timings.json41
-rw-r--r--node_modules/node-gyp/node_modules/har-schema/package.json86
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/LICENSE13
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/README.md75
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/browser/async.js96
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/browser/error.js15
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/browser/promise.js93
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node4/async.js136
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node4/error.js22
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node4/promise.js132
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node6/async.js133
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node6/error.js22
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node6/promise.js130
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node7/async.js133
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node7/error.js22
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/lib/node7/promise.js130
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/package.json101
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/src/async.js96
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/src/error.js15
-rw-r--r--node_modules/node-gyp/node_modules/har-validator/src/promise.js93
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/.npmignore7
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/CHANGES.md46
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/LICENSE18
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/README.md79
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/http_signing.md363
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/lib/index.js29
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/lib/parser.js318
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/lib/signer.js399
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/lib/utils.js112
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/lib/verify.js88
-rw-r--r--node_modules/node-gyp/node_modules/http-signature/package.json77
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/.npmignore1
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/.tm_properties7
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/.travis.yml4
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/Makefile25
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/README.md30
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/lib/performance-now.js32
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/license.txt7
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/package.json57
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/src/performance-now.coffee15
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/test/mocha.opts3
-rw-r--r--node_modules/node-gyp/node_modules/performance-now/test/performance-now.coffee38
-rw-r--r--node_modules/node-gyp/node_modules/qs/.eslintignore1
-rw-r--r--node_modules/node-gyp/node_modules/qs/.jscs.json176
-rw-r--r--node_modules/node-gyp/node_modules/qs/CHANGELOG.md175
-rw-r--r--node_modules/node-gyp/node_modules/qs/LICENSE28
-rw-r--r--node_modules/node-gyp/node_modules/qs/README.md440
-rw-r--r--node_modules/node-gyp/node_modules/qs/dist/qs.js597
-rw-r--r--node_modules/node-gyp/node_modules/qs/lib/formats.js18
-rw-r--r--node_modules/node-gyp/node_modules/qs/lib/index.js11
-rw-r--r--node_modules/node-gyp/node_modules/qs/lib/parse.js167
-rw-r--r--node_modules/node-gyp/node_modules/qs/lib/stringify.js207
-rw-r--r--node_modules/node-gyp/node_modules/qs/lib/utils.js182
-rw-r--r--node_modules/node-gyp/node_modules/qs/package.json78
-rw-r--r--node_modules/node-gyp/node_modules/qs/test/index.js7
-rw-r--r--node_modules/node-gyp/node_modules/qs/test/parse.js519
-rw-r--r--node_modules/node-gyp/node_modules/qs/test/stringify.js567
-rw-r--r--node_modules/node-gyp/node_modules/qs/test/utils.js22
-rw-r--r--node_modules/node-gyp/node_modules/request/CHANGELOG.md674
-rw-r--r--node_modules/node-gyp/node_modules/request/LICENSE55
-rw-r--r--node_modules/node-gyp/node_modules/request/README.md1115
-rwxr-xr-xnode_modules/node-gyp/node_modules/request/index.js156
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/auth.js168
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/cookies.js39
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/getProxyFromURI.js79
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/har.js215
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/helpers.js66
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/multipart.js113
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/oauth.js148
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/querystring.js51
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/redirect.js157
-rw-r--r--node_modules/node-gyp/node_modules/request/lib/tunnel.js176
-rw-r--r--node_modules/node-gyp/node_modules/request/package.json118
-rw-r--r--node_modules/node-gyp/node_modules/request/request.js1565
-rw-r--r--node_modules/node-gyp/package.json12
-rw-r--r--node_modules/node-gyp/test/process-exec-sync.js138
-rw-r--r--node_modules/node-gyp/test/test-addon.js4
-rw-r--r--node_modules/node-gyp/test/test-find-python.js20
-rw-r--r--node_modules/node-gyp/tools/gyp/pylib/gyp/generator/compile_commands_json.py115
-rw-r--r--node_modules/sntp/.npmignore18
-rwxr-xr-xnode_modules/sntp/.travis.yml5
-rwxr-xr-xnode_modules/sntp/LICENSE28
-rwxr-xr-xnode_modules/sntp/Makefile9
-rwxr-xr-xnode_modules/sntp/README.md68
-rwxr-xr-xnode_modules/sntp/examples/offset.js16
-rwxr-xr-xnode_modules/sntp/examples/time.js25
-rwxr-xr-xnode_modules/sntp/index.js1
-rwxr-xr-xnode_modules/sntp/lib/index.js412
-rwxr-xr-xnode_modules/sntp/package.json68
-rwxr-xr-xnode_modules/sntp/test/index.js435
-rw-r--r--node_modules/stringstream/.travis.yml4
-rw-r--r--node_modules/stringstream/LICENSE.txt22
-rw-r--r--node_modules/stringstream/README.md38
-rw-r--r--node_modules/stringstream/example.js27
-rw-r--r--node_modules/stringstream/package.json51
-rw-r--r--node_modules/stringstream/stringstream.js102
308 files changed, 382 insertions, 48329 deletions
diff --git a/node_modules/boom/.npmignore b/node_modules/boom/.npmignore
deleted file mode 100644
index 77ba16cb0..000000000
--- a/node_modules/boom/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-
diff --git a/node_modules/boom/.travis.yml b/node_modules/boom/.travis.yml
deleted file mode 100755
index dd1b24f13..000000000
--- a/node_modules/boom/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
- - 4.0
-
-sudo: false
-
diff --git a/node_modules/boom/CONTRIBUTING.md b/node_modules/boom/CONTRIBUTING.md
deleted file mode 100644
index 892836159..000000000
--- a/node_modules/boom/CONTRIBUTING.md
+++ /dev/null
@@ -1 +0,0 @@
-Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/node_modules/boom/LICENSE b/node_modules/boom/LICENSE
deleted file mode 100755
index 394688939..000000000
--- a/node_modules/boom/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2012-2014, Walmart and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors \ No newline at end of file
diff --git a/node_modules/boom/README.md b/node_modules/boom/README.md
deleted file mode 100755
index cbd91c931..000000000
--- a/node_modules/boom/README.md
+++ /dev/null
@@ -1,652 +0,0 @@
-![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png)
-
-HTTP-friendly error objects
-
-[![Build Status](https://secure.travis-ci.org/hapijs/boom.png)](http://travis-ci.org/hapijs/boom)
-[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom)
-
-Lead Maintainer: [Adam Bretz](https://github.com/arb)
-
-**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response
-object (instance of `Error`) which includes the following properties:
-- `isBoom` - if `true`, indicates this is a `Boom` object instance.
-- `isServer` - convenience bool indicating status code >= 500.
-- `message` - the error message.
-- `output` - the formatted response. Can be directly manipulated after object construction to return a custom
- error response. Allowed root keys:
- - `statusCode` - the HTTP status code (typically 4xx or 5xx).
- - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content.
- - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any
- changes will be lost
- if `reformat()` is called. Any content allowed and by default includes the following content:
- - `statusCode` - the HTTP status code, derived from `error.output.statusCode`.
- - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`.
- - `message` - the error message derived from `error.message`.
-- inherited `Error` properties.
-
-The `Boom` object also supports the following method:
-- `reformat()` - rebuilds `error.output` using the other object properties.
-
-## Overview
-
-- Helper methods
- - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message)
- - [`create(statusCode, [message], [data])`](#createstatuscode-message-data)
-- HTTP 4xx Errors
- - 400: [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data)
- - 401: [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes)
- - 403: [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data)
- - 404: [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data)
- - 405: [`Boom.methodNotAllowed([message], [data])`](#boommethodnotallowedmessage-data)
- - 406: [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data)
- - 407: [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data)
- - 408: [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data)
- - 409: [`Boom.conflict([message], [data])`](#boomconflictmessage-data)
- - 410: [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data)
- - 411: [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data)
- - 412: [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data)
- - 413: [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data)
- - 414: [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data)
- - 415: [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data)
- - 416: [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data)
- - 417: [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data)
- - 422: [`Boom.badData([message], [data])`](#boombaddatamessage-data)
- - 428: [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data)
- - 429: [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data)
-- HTTP 5xx Errors
- - 500: [`Boom.badImplementation([message], [data])`](#boombadimplementationmessage-data)
- - 501: [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data)
- - 502: [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data)
- - 503: [`Boom.serverTimeout([message], [data])`](#boomservertimeoutmessage-data)
- - 504: [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data)
-- [FAQ](#faq)
-
-
-## Helper Methods
-
-### `wrap(error, [statusCode], [message])`
-
-Decorates an error with the **boom** properties where:
-- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object.
-- `statusCode` - optional HTTP status code. Defaults to `500`.
-- `message` - optional message string. If the error already has a message, it adds the message as a prefix.
- Defaults to no message.
-
-```js
-var error = new Error('Unexpected input');
-Boom.wrap(error, 400);
-```
-
-### `create(statusCode, [message], [data])`
-
-Generates an `Error` object with the **boom** decorations where:
-- `statusCode` - an HTTP error code number. Must be greater or equal 400.
-- `message` - optional message string.
-- `data` - additional error data set to `error.data` property.
-
-```js
-var error = Boom.create(400, 'Bad request', { timestamp: Date.now() });
-```
-
-## HTTP 4xx Errors
-
-### `Boom.badRequest([message], [data])`
-
-Returns a 400 Bad Request error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badRequest('invalid query');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 400,
- "error": "Bad Request",
- "message": "invalid query"
-}
-```
-
-### `Boom.unauthorized([message], [scheme], [attributes])`
-
-Returns a 401 Unauthorized error where:
-- `message` - optional message.
-- `scheme` can be one of the following:
- - an authentication scheme name
- - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header.
-- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used
- when `schema` is a string, otherwise it is ignored. Every key/value pair will be included in the
- 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key.
- `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as
- the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header
- will not be present and `isMissing` will be true on the error object.
-
-If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response.
-
-```js
-Boom.unauthorized('invalid password');
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "message": "invalid password"
-},
-"headers" {}
-```
-
-```js
-Boom.unauthorized('invalid password', 'sample');
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "message": "invalid password",
- "attributes": {
- "error": "invalid password"
- }
-},
-"headers" {
- "WWW-Authenticate": "sample error=\"invalid password\""
-}
-```
-
-```js
-Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' });
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "message": "invalid password",
- "attributes": {
- "error": "invalid password",
- "ttl": 0,
- "cache": "",
- "foo": "bar"
- }
-},
-"headers" {
- "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\""
-}
-```
-
-### `Boom.forbidden([message], [data])`
-
-Returns a 403 Forbidden error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.forbidden('try again some time');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 403,
- "error": "Forbidden",
- "message": "try again some time"
-}
-```
-
-### `Boom.notFound([message], [data])`
-
-Returns a 404 Not Found error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.notFound('missing');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 404,
- "error": "Not Found",
- "message": "missing"
-}
-```
-
-### `Boom.methodNotAllowed([message], [data])`
-
-Returns a 405 Method Not Allowed error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.methodNotAllowed('that method is not allowed');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 405,
- "error": "Method Not Allowed",
- "message": "that method is not allowed"
-}
-```
-
-### `Boom.notAcceptable([message], [data])`
-
-Returns a 406 Not Acceptable error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.notAcceptable('unacceptable');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 406,
- "error": "Not Acceptable",
- "message": "unacceptable"
-}
-```
-
-### `Boom.proxyAuthRequired([message], [data])`
-
-Returns a 407 Proxy Authentication Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.proxyAuthRequired('auth missing');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 407,
- "error": "Proxy Authentication Required",
- "message": "auth missing"
-}
-```
-
-### `Boom.clientTimeout([message], [data])`
-
-Returns a 408 Request Time-out error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.clientTimeout('timed out');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 408,
- "error": "Request Time-out",
- "message": "timed out"
-}
-```
-
-### `Boom.conflict([message], [data])`
-
-Returns a 409 Conflict error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.conflict('there was a conflict');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 409,
- "error": "Conflict",
- "message": "there was a conflict"
-}
-```
-
-### `Boom.resourceGone([message], [data])`
-
-Returns a 410 Gone error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.resourceGone('it is gone');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 410,
- "error": "Gone",
- "message": "it is gone"
-}
-```
-
-### `Boom.lengthRequired([message], [data])`
-
-Returns a 411 Length Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.lengthRequired('length needed');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 411,
- "error": "Length Required",
- "message": "length needed"
-}
-```
-
-### `Boom.preconditionFailed([message], [data])`
-
-Returns a 412 Precondition Failed error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.preconditionFailed();
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 412,
- "error": "Precondition Failed"
-}
-```
-
-### `Boom.entityTooLarge([message], [data])`
-
-Returns a 413 Request Entity Too Large error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.entityTooLarge('too big');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 413,
- "error": "Request Entity Too Large",
- "message": "too big"
-}
-```
-
-### `Boom.uriTooLong([message], [data])`
-
-Returns a 414 Request-URI Too Large error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.uriTooLong('uri is too long');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 414,
- "error": "Request-URI Too Large",
- "message": "uri is too long"
-}
-```
-
-### `Boom.unsupportedMediaType([message], [data])`
-
-Returns a 415 Unsupported Media Type error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.unsupportedMediaType('that media is not supported');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 415,
- "error": "Unsupported Media Type",
- "message": "that media is not supported"
-}
-```
-
-### `Boom.rangeNotSatisfiable([message], [data])`
-
-Returns a 416 Requested Range Not Satisfiable error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.rangeNotSatisfiable();
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 416,
- "error": "Requested Range Not Satisfiable"
-}
-```
-
-### `Boom.expectationFailed([message], [data])`
-
-Returns a 417 Expectation Failed error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.expectationFailed('expected this to work');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 417,
- "error": "Expectation Failed",
- "message": "expected this to work"
-}
-```
-
-### `Boom.badData([message], [data])`
-
-Returns a 422 Unprocessable Entity error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badData('your data is bad and you should feel bad');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 422,
- "error": "Unprocessable Entity",
- "message": "your data is bad and you should feel bad"
-}
-```
-
-### `Boom.preconditionRequired([message], [data])`
-
-Returns a 428 Precondition Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.preconditionRequired('you must supply an If-Match header');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 428,
- "error": "Precondition Required",
- "message": "you must supply an If-Match header"
-}
-```
-
-### `Boom.tooManyRequests([message], [data])`
-
-Returns a 429 Too Many Requests error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.tooManyRequests('you have exceeded your request limit');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 429,
- "error": "Too Many Requests",
- "message": "you have exceeded your request limit"
-}
-```
-
-## HTTP 5xx Errors
-
-All 500 errors hide your message from the end user. Your message is recorded in the server log.
-
-### `Boom.badImplementation([message], [data])`
-
-Returns a 500 Internal Server Error error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badImplementation('terrible implementation');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 500,
- "error": "Internal Server Error",
- "message": "An internal server error occurred"
-}
-```
-
-### `Boom.notImplemented([message], [data])`
-
-Returns a 501 Not Implemented error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.notImplemented('method not implemented');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 501,
- "error": "Not Implemented",
- "message": "method not implemented"
-}
-```
-
-### `Boom.badGateway([message], [data])`
-
-Returns a 502 Bad Gateway error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badGateway('that is a bad gateway');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 502,
- "error": "Bad Gateway",
- "message": "that is a bad gateway"
-}
-```
-
-### `Boom.serverTimeout([message], [data])`
-
-Returns a 503 Service Unavailable error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.serverTimeout('unavailable');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 503,
- "error": "Service Unavailable",
- "message": "unavailable"
-}
-```
-
-### `Boom.gatewayTimeout([message], [data])`
-
-Returns a 504 Gateway Time-out error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.gatewayTimeout();
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 504,
- "error": "Gateway Time-out"
-}
-```
-
-## F.A.Q.
-
-###### How do I include extra information in my responses? `output.payload` is missing `data`, what gives?
-
-There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation.
diff --git a/node_modules/boom/images/boom.png b/node_modules/boom/images/boom.png
deleted file mode 100755
index 373bc1345..000000000
--- a/node_modules/boom/images/boom.png
+++ /dev/null
Binary files differ
diff --git a/node_modules/boom/lib/index.js b/node_modules/boom/lib/index.js
deleted file mode 100755
index 6bdea6936..000000000
--- a/node_modules/boom/lib/index.js
+++ /dev/null
@@ -1,318 +0,0 @@
-// Load modules
-
-var Http = require('http');
-var Hoek = require('hoek');
-
-
-// Declare internals
-
-var internals = {};
-
-exports.wrap = function (error, statusCode, message) {
-
- Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
- return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message));
-};
-
-
-exports.create = function (statusCode, message, data) {
-
- return internals.create(statusCode, message, data, exports.create);
-};
-
-internals.create = function (statusCode, message, data, ctor) {
-
- var error = new Error(message ? message : undefined); // Avoids settings null message
- Error.captureStackTrace(error, ctor); // Filter the stack to our external API
- error.data = data || null;
- internals.initialize(error, statusCode);
- return error;
-};
-
-internals.initialize = function (error, statusCode, message) {
-
- var numberCode = parseInt(statusCode, 10);
- Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode);
-
- error.isBoom = true;
- error.isServer = numberCode >= 500;
-
- if (!error.hasOwnProperty('data')) {
- error.data = null;
- }
-
- error.output = {
- statusCode: numberCode,
- payload: {},
- headers: {}
- };
-
- error.reformat = internals.reformat;
- error.reformat();
-
- if (!message &&
- !error.message) {
-
- message = error.output.payload.error;
- }
-
- if (message) {
- error.message = (message + (error.message ? ': ' + error.message : ''));
- }
-
- return error;
-};
-
-
-internals.reformat = function () {
-
- this.output.payload.statusCode = this.output.statusCode;
- this.output.payload.error = Http.STATUS_CODES[this.output.statusCode] || 'Unknown';
-
- if (this.output.statusCode === 500) {
- this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user
- }
- else if (this.message) {
- this.output.payload.message = this.message;
- }
-};
-
-
-// 4xx Client Errors
-
-exports.badRequest = function (message, data) {
-
- return internals.create(400, message, data, exports.badRequest);
-};
-
-
-exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
-
- var err = internals.create(401, message, undefined, exports.unauthorized);
-
- if (!scheme) {
- return err;
- }
-
- var wwwAuthenticate = '';
- var i = 0;
- var il = 0;
-
- if (typeof scheme === 'string') {
-
- // function (message, scheme, attributes)
-
- wwwAuthenticate = scheme;
-
- if (attributes || message) {
- err.output.payload.attributes = {};
- }
-
- if (attributes) {
- var names = Object.keys(attributes);
- for (i = 0, il = names.length; i < il; ++i) {
- var name = names[i];
- if (i) {
- wwwAuthenticate += ',';
- }
-
- var value = attributes[name];
- if (value === null ||
- value === undefined) { // Value can be zero
-
- value = '';
- }
- wwwAuthenticate += ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"';
- err.output.payload.attributes[name] = value;
- }
- }
-
- if (message) {
- if (attributes) {
- wwwAuthenticate += ',';
- }
- wwwAuthenticate += ' error="' + Hoek.escapeHeaderAttribute(message) + '"';
- err.output.payload.attributes.error = message;
- }
- else {
- err.isMissing = true;
- }
- }
- else {
-
- // function (message, wwwAuthenticate[])
-
- var wwwArray = scheme;
- for (i = 0, il = wwwArray.length; i < il; ++i) {
- if (i) {
- wwwAuthenticate += ', ';
- }
-
- wwwAuthenticate += wwwArray[i];
- }
- }
-
- err.output.headers['WWW-Authenticate'] = wwwAuthenticate;
-
- return err;
-};
-
-
-exports.forbidden = function (message, data) {
-
- return internals.create(403, message, data, exports.forbidden);
-};
-
-
-exports.notFound = function (message, data) {
-
- return internals.create(404, message, data, exports.notFound);
-};
-
-
-exports.methodNotAllowed = function (message, data) {
-
- return internals.create(405, message, data, exports.methodNotAllowed);
-};
-
-
-exports.notAcceptable = function (message, data) {
-
- return internals.create(406, message, data, exports.notAcceptable);
-};
-
-
-exports.proxyAuthRequired = function (message, data) {
-
- return internals.create(407, message, data, exports.proxyAuthRequired);
-};
-
-
-exports.clientTimeout = function (message, data) {
-
- return internals.create(408, message, data, exports.clientTimeout);
-};
-
-
-exports.conflict = function (message, data) {
-
- return internals.create(409, message, data, exports.conflict);
-};
-
-
-exports.resourceGone = function (message, data) {
-
- return internals.create(410, message, data, exports.resourceGone);
-};
-
-
-exports.lengthRequired = function (message, data) {
-
- return internals.create(411, message, data, exports.lengthRequired);
-};
-
-
-exports.preconditionFailed = function (message, data) {
-
- return internals.create(412, message, data, exports.preconditionFailed);
-};
-
-
-exports.entityTooLarge = function (message, data) {
-
- return internals.create(413, message, data, exports.entityTooLarge);
-};
-
-
-exports.uriTooLong = function (message, data) {
-
- return internals.create(414, message, data, exports.uriTooLong);
-};
-
-
-exports.unsupportedMediaType = function (message, data) {
-
- return internals.create(415, message, data, exports.unsupportedMediaType);
-};
-
-
-exports.rangeNotSatisfiable = function (message, data) {
-
- return internals.create(416, message, data, exports.rangeNotSatisfiable);
-};
-
-
-exports.expectationFailed = function (message, data) {
-
- return internals.create(417, message, data, exports.expectationFailed);
-};
-
-exports.badData = function (message, data) {
-
- return internals.create(422, message, data, exports.badData);
-};
-
-
-exports.preconditionRequired = function (message, data) {
-
- return internals.create(428, message, data, exports.preconditionRequired);
-};
-
-
-exports.tooManyRequests = function (message, data) {
-
- return internals.create(429, message, data, exports.tooManyRequests);
-};
-
-
-// 5xx Server Errors
-
-exports.internal = function (message, data, statusCode) {
-
- return internals.serverError(message, data, statusCode, exports.internal);
-};
-
-internals.serverError = function (message, data, statusCode, ctor) {
-
- var error;
- if (data instanceof Error) {
- error = exports.wrap(data, statusCode, message);
- } else {
- error = internals.create(statusCode || 500, message, undefined, ctor);
- error.data = data;
- }
-
- return error;
-};
-
-
-exports.notImplemented = function (message, data) {
-
- return internals.serverError(message, data, 501, exports.notImplemented);
-};
-
-
-exports.badGateway = function (message, data) {
-
- return internals.serverError(message, data, 502, exports.badGateway);
-};
-
-
-exports.serverTimeout = function (message, data) {
-
- return internals.serverError(message, data, 503, exports.serverTimeout);
-};
-
-
-exports.gatewayTimeout = function (message, data) {
-
- return internals.serverError(message, data, 504, exports.gatewayTimeout);
-};
-
-
-exports.badImplementation = function (message, data) {
-
- var err = internals.serverError(message, data, 500, exports.badImplementation);
- err.isDeveloperError = true;
- return err;
-};
diff --git a/node_modules/boom/package.json b/node_modules/boom/package.json
deleted file mode 100644
index f776e8278..000000000
--- a/node_modules/boom/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "boom@2.x.x",
- "_id": "boom@2.10.1",
- "_inBundle": false,
- "_integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
- "_location": "/boom",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "boom@2.x.x",
- "name": "boom",
- "escapedName": "boom",
- "rawSpec": "2.x.x",
- "saveSpec": null,
- "fetchSpec": "2.x.x"
- },
- "_requiredBy": [
- "/cryptiles",
- "/hawk"
- ],
- "_resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
- "_shasum": "39c8918ceff5799f83f9492a848f625add0c766f",
- "_spec": "boom@2.x.x",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
- "bugs": {
- "url": "https://github.com/hapijs/boom/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "hoek": "2.x.x"
- },
- "deprecated": false,
- "description": "HTTP-friendly error objects",
- "devDependencies": {
- "code": "1.x.x",
- "lab": "7.x.x"
- },
- "engines": {
- "node": ">=0.10.40"
- },
- "homepage": "https://github.com/hapijs/boom#readme",
- "keywords": [
- "error",
- "http"
- ],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
- "name": "boom",
- "repository": {
- "type": "git",
- "url": "git://github.com/hapijs/boom.git"
- },
- "scripts": {
- "test": "lab -a code -t 100 -L",
- "test-cov-html": "lab -a code -r html -o coverage.html -L"
- },
- "version": "2.10.1"
-}
diff --git a/node_modules/boom/test/index.js b/node_modules/boom/test/index.js
deleted file mode 100755
index 79a59e9f4..000000000
--- a/node_modules/boom/test/index.js
+++ /dev/null
@@ -1,654 +0,0 @@
-// Load modules
-
-var Code = require('code');
-var Boom = require('../lib');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.describe;
-var it = lab.it;
-var expect = Code.expect;
-
-
-it('returns the same object when already boom', function (done) {
-
- var error = Boom.badRequest();
- var wrapped = Boom.wrap(error);
- expect(error).to.equal(wrapped);
- done();
-});
-
-it('returns an error with info when constructed using another error', function (done) {
-
- var error = new Error('ka-boom');
- error.xyz = 123;
- var err = Boom.wrap(error);
- expect(err.xyz).to.equal(123);
- expect(err.message).to.equal('ka-boom');
- expect(err.output).to.deep.equal({
- statusCode: 500,
- payload: {
- statusCode: 500,
- error: 'Internal Server Error',
- message: 'An internal server error occurred'
- },
- headers: {}
- });
- expect(err.data).to.equal(null);
- done();
-});
-
-it('does not override data when constructed using another error', function (done) {
-
- var error = new Error('ka-boom');
- error.data = { useful: 'data' };
- var err = Boom.wrap(error);
- expect(err.data).to.equal(error.data);
- done();
-});
-
-it('sets new message when none exists', function (done) {
-
- var error = new Error();
- var wrapped = Boom.wrap(error, 400, 'something bad');
- expect(wrapped.message).to.equal('something bad');
- done();
-});
-
-it('throws when statusCode is not a number', function (done) {
-
- expect(function () {
-
- Boom.create('x');
- }).to.throw('First argument must be a number (400+): x');
- done();
-});
-
-it('will cast a number-string to an integer', function (done) {
-
- var codes = [
- { input: '404', result: 404 },
- { input: '404.1', result: 404 },
- { input: 400, result: 400 },
- { input: 400.123, result: 400 }];
- for (var i = 0, il = codes.length; i < il; ++i) {
- var code = codes[i];
- var err = Boom.create(code.input);
- expect(err.output.statusCode).to.equal(code.result);
- }
-
- done();
-});
-
-it('throws when statusCode is not finite', function (done) {
-
- expect(function () {
-
- Boom.create(1 / 0);
- }).to.throw('First argument must be a number (400+): null');
- done();
-});
-
-it('sets error code to unknown', function (done) {
-
- var err = Boom.create(999);
- expect(err.output.payload.error).to.equal('Unknown');
- done();
-});
-
-describe('create()', function () {
-
- it('does not sets null message', function (done) {
-
- var error = Boom.unauthorized(null);
- expect(error.output.payload.message).to.not.exist();
- expect(error.isServer).to.be.false();
- done();
- });
-
- it('sets message and data', function (done) {
-
- var error = Boom.badRequest('Missing data', { type: 'user' });
- expect(error.data.type).to.equal('user');
- expect(error.output.payload.message).to.equal('Missing data');
- done();
- });
-});
-
-describe('isBoom()', function () {
-
- it('returns true for Boom object', function (done) {
-
- expect(Boom.badRequest().isBoom).to.equal(true);
- done();
- });
-
- it('returns false for Error object', function (done) {
-
- expect((new Error()).isBoom).to.not.exist();
- done();
- });
-});
-
-describe('badRequest()', function () {
-
- it('returns a 400 error statusCode', function (done) {
-
- var error = Boom.badRequest();
-
- expect(error.output.statusCode).to.equal(400);
- expect(error.isServer).to.be.false();
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.badRequest('my message').message).to.equal('my message');
- done();
- });
-
- it('sets the message to HTTP status if none provided', function (done) {
-
- expect(Boom.badRequest().message).to.equal('Bad Request');
- done();
- });
-});
-
-describe('unauthorized()', function () {
-
- it('returns a 401 error statusCode', function (done) {
-
- var err = Boom.unauthorized();
- expect(err.output.statusCode).to.equal(401);
- expect(err.output.headers).to.deep.equal({});
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.unauthorized('my message').message).to.equal('my message');
- done();
- });
-
- it('returns a WWW-Authenticate header when passed a scheme', function (done) {
-
- var err = Boom.unauthorized('boom', 'Test');
- expect(err.output.statusCode).to.equal(401);
- expect(err.output.headers['WWW-Authenticate']).to.equal('Test error="boom"');
- done();
- });
-
- it('returns a WWW-Authenticate header set to the schema array value', function (done) {
-
- var err = Boom.unauthorized(null, ['Test','one','two']);
- expect(err.output.statusCode).to.equal(401);
- expect(err.output.headers['WWW-Authenticate']).to.equal('Test, one, two');
- done();
- });
-
- it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) {
-
- var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 });
- expect(err.output.statusCode).to.equal(401);
- expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"');
- expect(err.output.payload.attributes).to.deep.equal({ a: 1, b: 'something', c: '', d: 0, error: 'boom' });
- done();
- });
-
- it('returns a WWW-Authenticate header when passed attributes, missing error', function (done) {
-
- var err = Boom.unauthorized(null, 'Test', { a: 1, b: 'something', c: null, d: 0 });
- expect(err.output.statusCode).to.equal(401);
- expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0"');
- expect(err.isMissing).to.equal(true);
- done();
- });
-
- it('sets the isMissing flag when error message is empty', function (done) {
-
- var err = Boom.unauthorized('', 'Basic');
- expect(err.isMissing).to.equal(true);
- done();
- });
-
- it('does not set the isMissing flag when error message is not empty', function (done) {
-
- var err = Boom.unauthorized('message', 'Basic');
- expect(err.isMissing).to.equal(undefined);
- done();
- });
-
- it('sets a WWW-Authenticate when passed as an array', function (done) {
-
- var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']);
- expect(err.output.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"');
- done();
- });
-});
-
-
-describe('methodNotAllowed()', function () {
-
- it('returns a 405 error statusCode', function (done) {
-
- expect(Boom.methodNotAllowed().output.statusCode).to.equal(405);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.methodNotAllowed('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('notAcceptable()', function () {
-
- it('returns a 406 error statusCode', function (done) {
-
- expect(Boom.notAcceptable().output.statusCode).to.equal(406);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.notAcceptable('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('proxyAuthRequired()', function () {
-
- it('returns a 407 error statusCode', function (done) {
-
- expect(Boom.proxyAuthRequired().output.statusCode).to.equal(407);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.proxyAuthRequired('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('clientTimeout()', function () {
-
- it('returns a 408 error statusCode', function (done) {
-
- expect(Boom.clientTimeout().output.statusCode).to.equal(408);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.clientTimeout('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('conflict()', function () {
-
- it('returns a 409 error statusCode', function (done) {
-
- expect(Boom.conflict().output.statusCode).to.equal(409);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.conflict('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('resourceGone()', function () {
-
- it('returns a 410 error statusCode', function (done) {
-
- expect(Boom.resourceGone().output.statusCode).to.equal(410);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.resourceGone('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('lengthRequired()', function () {
-
- it('returns a 411 error statusCode', function (done) {
-
- expect(Boom.lengthRequired().output.statusCode).to.equal(411);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.lengthRequired('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('preconditionFailed()', function () {
-
- it('returns a 412 error statusCode', function (done) {
-
- expect(Boom.preconditionFailed().output.statusCode).to.equal(412);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.preconditionFailed('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('entityTooLarge()', function () {
-
- it('returns a 413 error statusCode', function (done) {
-
- expect(Boom.entityTooLarge().output.statusCode).to.equal(413);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.entityTooLarge('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('uriTooLong()', function () {
-
- it('returns a 414 error statusCode', function (done) {
-
- expect(Boom.uriTooLong().output.statusCode).to.equal(414);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.uriTooLong('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('unsupportedMediaType()', function () {
-
- it('returns a 415 error statusCode', function (done) {
-
- expect(Boom.unsupportedMediaType().output.statusCode).to.equal(415);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.unsupportedMediaType('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('rangeNotSatisfiable()', function () {
-
- it('returns a 416 error statusCode', function (done) {
-
- expect(Boom.rangeNotSatisfiable().output.statusCode).to.equal(416);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.rangeNotSatisfiable('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('expectationFailed()', function () {
-
- it('returns a 417 error statusCode', function (done) {
-
- expect(Boom.expectationFailed().output.statusCode).to.equal(417);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.expectationFailed('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('badData()', function () {
-
- it('returns a 422 error statusCode', function (done) {
-
- expect(Boom.badData().output.statusCode).to.equal(422);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.badData('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('preconditionRequired()', function () {
-
- it('returns a 428 error statusCode', function (done) {
-
- expect(Boom.preconditionRequired().output.statusCode).to.equal(428);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.preconditionRequired('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('tooManyRequests()', function () {
-
- it('returns a 429 error statusCode', function (done) {
-
- expect(Boom.tooManyRequests().output.statusCode).to.equal(429);
- done();
- });
-
- it('sets the message with the passed-in message', function (done) {
-
- expect(Boom.tooManyRequests('my message').message).to.equal('my message');
- done();
- });
-});
-
-describe('serverTimeout()', function () {
-
- it('returns a 503 error statusCode', function (done) {
-
- expect(Boom.serverTimeout().output.statusCode).to.equal(503);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.serverTimeout('my message').message).to.equal('my message');
- done();
- });
-});
-
-describe('forbidden()', function () {
-
- it('returns a 403 error statusCode', function (done) {
-
- expect(Boom.forbidden().output.statusCode).to.equal(403);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.forbidden('my message').message).to.equal('my message');
- done();
- });
-});
-
-describe('notFound()', function () {
-
- it('returns a 404 error statusCode', function (done) {
-
- expect(Boom.notFound().output.statusCode).to.equal(404);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.notFound('my message').message).to.equal('my message');
- done();
- });
-});
-
-describe('internal()', function () {
-
- it('returns a 500 error statusCode', function (done) {
-
- expect(Boom.internal().output.statusCode).to.equal(500);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- var err = Boom.internal('my message');
- expect(err.message).to.equal('my message');
- expect(err.isServer).to.true();
- expect(err.output.payload.message).to.equal('An internal server error occurred');
- done();
- });
-
- it('passes data on the callback if its passed in', function (done) {
-
- expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data');
- done();
- });
-
- it('returns an error with composite message', function (done) {
-
- try {
- JSON.parse('{');
- }
- catch (err) {
- var boom = Boom.internal('Someting bad', err);
- expect(boom.message).to.equal('Someting bad: Unexpected end of input');
- expect(boom.isServer).to.be.true();
- done();
- }
- });
-});
-
-describe('notImplemented()', function () {
-
- it('returns a 501 error statusCode', function (done) {
-
- expect(Boom.notImplemented().output.statusCode).to.equal(501);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.notImplemented('my message').message).to.equal('my message');
- done();
- });
-});
-
-
-describe('badGateway()', function () {
-
- it('returns a 502 error statusCode', function (done) {
-
- expect(Boom.badGateway().output.statusCode).to.equal(502);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.badGateway('my message').message).to.equal('my message');
- done();
- });
-});
-
-describe('gatewayTimeout()', function () {
-
- it('returns a 504 error statusCode', function (done) {
-
- expect(Boom.gatewayTimeout().output.statusCode).to.equal(504);
- done();
- });
-
- it('sets the message with the passed in message', function (done) {
-
- expect(Boom.gatewayTimeout('my message').message).to.equal('my message');
- done();
- });
-});
-
-describe('badImplementation()', function () {
-
- it('returns a 500 error statusCode', function (done) {
-
- var err = Boom.badImplementation();
- expect(err.output.statusCode).to.equal(500);
- expect(err.isDeveloperError).to.equal(true);
- expect(err.isServer).to.be.true();
- done();
- });
-});
-
-describe('stack trace', function () {
-
- it('should omit lib', function (done) {
-
- ['badRequest', 'unauthorized', 'forbidden', 'notFound', 'methodNotAllowed',
- 'notAcceptable', 'proxyAuthRequired', 'clientTimeout', 'conflict',
- 'resourceGone', 'lengthRequired', 'preconditionFailed', 'entityTooLarge',
- 'uriTooLong', 'unsupportedMediaType', 'rangeNotSatisfiable', 'expectationFailed',
- 'badData', 'preconditionRequired', 'tooManyRequests',
-
- // 500s
- 'internal', 'notImplemented', 'badGateway', 'serverTimeout', 'gatewayTimeout',
- 'badImplementation'
- ].forEach(function (name) {
-
- var err = Boom[name]();
- expect(err.stack).to.not.match(/\/lib\/index\.js/);
- });
-
- done();
- });
-});
diff --git a/node_modules/cryptiles/.npmignore b/node_modules/cryptiles/.npmignore
deleted file mode 100644
index b3bb51763..000000000
--- a/node_modules/cryptiles/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-
diff --git a/node_modules/cryptiles/.travis.yml b/node_modules/cryptiles/.travis.yml
deleted file mode 100755
index 4d8269258..000000000
--- a/node_modules/cryptiles/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
- - 4.0
-
-sudo: false
-
diff --git a/node_modules/cryptiles/LICENSE b/node_modules/cryptiles/LICENSE
deleted file mode 100755
index cda44736a..000000000
--- a/node_modules/cryptiles/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2014, Eran Hammer and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hueniverse/cryptiles/graphs/contributors
diff --git a/node_modules/cryptiles/README.md b/node_modules/cryptiles/README.md
deleted file mode 100644
index 400830501..000000000
--- a/node_modules/cryptiles/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-cryptiles
-=========
-
-General purpose crypto utilities
-
-[![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles)
-
-Lead Maintainer - [C J Silverio](https://github.com/ceejbot)
-
-## Methods
-
-### `randomString(<Number> size)`
-Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.
-
-### `fixedTimeComparison(<String> a, <String> b)`
-Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ.
diff --git a/node_modules/cryptiles/lib/index.js b/node_modules/cryptiles/lib/index.js
deleted file mode 100755
index f385870ee..000000000
--- a/node_modules/cryptiles/lib/index.js
+++ /dev/null
@@ -1,68 +0,0 @@
-// Load modules
-
-var Crypto = require('crypto');
-var Boom = require('boom');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Generate a cryptographically strong pseudo-random data
-
-exports.randomString = function (size) {
-
- var buffer = exports.randomBits((size + 1) * 6);
- if (buffer instanceof Error) {
- return buffer;
- }
-
- var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
- return string.slice(0, size);
-};
-
-
-exports.randomBits = function (bits) {
-
- if (!bits ||
- bits < 0) {
-
- return Boom.internal('Invalid random bits count');
- }
-
- var bytes = Math.ceil(bits / 8);
- try {
- return Crypto.randomBytes(bytes);
- }
- catch (err) {
- return Boom.internal('Failed generating random bits: ' + err.message);
- }
-};
-
-
-// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match)
-
-exports.fixedTimeComparison = function (a, b) {
-
- if (typeof a !== 'string' ||
- typeof b !== 'string') {
-
- return false;
- }
-
- var mismatch = (a.length === b.length ? 0 : 1);
- if (mismatch) {
- b = a;
- }
-
- for (var i = 0, il = a.length; i < il; ++i) {
- var ac = a.charCodeAt(i);
- var bc = b.charCodeAt(i);
- mismatch |= (ac ^ bc);
- }
-
- return (mismatch === 0);
-};
-
-
diff --git a/node_modules/cryptiles/package.json b/node_modules/cryptiles/package.json
deleted file mode 100755
index 28c6ad361..000000000
--- a/node_modules/cryptiles/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "cryptiles@2.x.x",
- "_id": "cryptiles@2.0.5",
- "_inBundle": false,
- "_integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
- "_location": "/cryptiles",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cryptiles@2.x.x",
- "name": "cryptiles",
- "escapedName": "cryptiles",
- "rawSpec": "2.x.x",
- "saveSpec": null,
- "fetchSpec": "2.x.x"
- },
- "_requiredBy": [
- "/hawk"
- ],
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
- "_shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
- "_spec": "cryptiles@2.x.x",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
- "bugs": {
- "url": "https://github.com/hapijs/cryptiles/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "boom": "2.x.x"
- },
- "deprecated": false,
- "description": "General purpose crypto utilities",
- "devDependencies": {
- "code": "1.x.x",
- "lab": "5.x.x"
- },
- "engines": {
- "node": ">=0.10.40"
- },
- "homepage": "https://github.com/hapijs/cryptiles#readme",
- "keywords": [
- "cryptography",
- "security",
- "utilites"
- ],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
- "name": "cryptiles",
- "repository": {
- "type": "git",
- "url": "git://github.com/hapijs/cryptiles.git"
- },
- "scripts": {
- "test": "lab -a code -t 100 -L",
- "test-cov-html": "lab -a code -r html -o coverage.html"
- },
- "version": "2.0.5"
-}
diff --git a/node_modules/cryptiles/test/index.js b/node_modules/cryptiles/test/index.js
deleted file mode 100755
index 170393f9b..000000000
--- a/node_modules/cryptiles/test/index.js
+++ /dev/null
@@ -1,102 +0,0 @@
-// Load modules
-
-var Code = require('code');
-var Cryptiles = require('..');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.describe;
-var it = lab.it;
-var expect = Code.expect;
-
-
-describe('randomString()', function () {
-
- it('should generate the right length string', function (done) {
-
- for (var i = 1; i <= 1000; ++i) {
- expect(Cryptiles.randomString(i).length).to.equal(i);
- }
-
- done();
- });
-
- it('returns an error on invalid bits size', function (done) {
-
- expect(Cryptiles.randomString(99999999999999999999).message).to.match(/Failed generating random bits/);
- done();
- });
-});
-
-describe('randomBits()', function () {
-
- it('returns an error on invalid input', function (done) {
-
- expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count');
- done();
- });
-});
-
-describe('fixedTimeComparison()', function () {
-
- var a = Cryptiles.randomString(50000);
- var b = Cryptiles.randomString(150000);
-
- it('should take the same amount of time comparing different string sizes', function (done) {
-
- var now = Date.now();
- Cryptiles.fixedTimeComparison(b, a);
- var t1 = Date.now() - now;
-
- now = Date.now();
- Cryptiles.fixedTimeComparison(b, b);
- var t2 = Date.now() - now;
-
- expect(t2 - t1).to.be.within(-20, 20);
- done();
- });
-
- it('should return true for equal strings', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true);
- done();
- });
-
- it('should return false for different strings (size, a < b)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false);
- done();
- });
-
- it('should return false for different strings (size, a > b)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false);
- done();
- });
-
- it('should return false for different strings (size, a = b)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false);
- done();
- });
-
- it('should return false when not a string', function (done) {
-
- expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
- done();
- });
-
- it('should return false when not a string (left)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
- done();
- });
-});
diff --git a/node_modules/hawk/.npmignore b/node_modules/hawk/.npmignore
deleted file mode 100644
index 96ed0910b..000000000
--- a/node_modules/hawk/.npmignore
+++ /dev/null
@@ -1,20 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-components
-build
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-
diff --git a/node_modules/hawk/.travis.yml b/node_modules/hawk/.travis.yml
deleted file mode 100755
index 40ca59eee..000000000
--- a/node_modules/hawk/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
-
diff --git a/node_modules/hawk/LICENSE b/node_modules/hawk/LICENSE
deleted file mode 100755
index 788093684..000000000
--- a/node_modules/hawk/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2012-2014, Eran Hammer and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hueniverse/hawk/graphs/contributors
diff --git a/node_modules/hawk/README.md b/node_modules/hawk/README.md
deleted file mode 100755
index b92cd7c43..000000000
--- a/node_modules/hawk/README.md
+++ /dev/null
@@ -1,634 +0,0 @@
-![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)
-
-<img align="right" src="https://raw.github.com/hueniverse/hawk/master/images/logo.png" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial
-HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).
-
-Current version: **3.x**
-
-Note: 3.x and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API.
-
-[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)
-
-# Table of Content
-
-- [**Introduction**](#introduction)
- - [Replay Protection](#replay-protection)
- - [Usage Example](#usage-example)
- - [Protocol Example](#protocol-example)
- - [Payload Validation](#payload-validation)
- - [Response Payload Validation](#response-payload-validation)
- - [Browser Support and Considerations](#browser-support-and-considerations)
-<p></p>
-- [**Single URI Authorization**](#single-uri-authorization)
- - [Usage Example](#bewit-usage-example)
-<p></p>
-- [**Security Considerations**](#security-considerations)
- - [MAC Keys Transmission](#mac-keys-transmission)
- - [Confidentiality of Requests](#confidentiality-of-requests)
- - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)
- - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)
- - [Entropy of Keys](#entropy-of-keys)
- - [Coverage Limitations](#coverage-limitations)
- - [Future Time Manipulation](#future-time-manipulation)
- - [Client Clock Poisoning](#client-clock-poisoning)
- - [Bewit Limitations](#bewit-limitations)
- - [Host Header Forgery](#host-header-forgery)
-<p></p>
-- [**Frequently Asked Questions**](#frequently-asked-questions)
-<p></p>
-- [**Implementations**](#implementations)
-- [**Acknowledgements**](#acknowledgements)
-
-# Introduction
-
-**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with
-partial cryptographic verification of the request and response, covering the HTTP method, request URI, host,
-and optionally the request payload.
-
-Similar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of
-client credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,
-the key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is
-included in its place.
-
-However, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of
-replay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less
-"chattiness" (interaction with the server).
-
-Also unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because
-the client and server must both have access to the key material in the clear.
-
-The primary design goals of this scheme are to:
-* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,
-* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where
- to send an authenticated request), and
-* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client
- failure to validate the server's identity as part of its TLS handshake.
-
-In addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using
-a query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).
-
-The **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,
-which is beyond the scope of this module. Typically, the shared credentials are established via an initial
-TLS-protected phase or derived from some other shared confidential information available to both the client
-and the server.
-
-
-## Replay Protection
-
-Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more
-than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when
-making requests. This gives the server enough information to prevent replay attacks.
-
-The nonce is generated by the client, and is a string unique across all requests with the same timestamp and
-key identifier combination.
-
-The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards
-are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.
-By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in
-practice translates to a maximum of 2 minutes as the skew can be positive or negative).
-
-Using a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client
-clock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types
-(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response
-to a bad timestamp.
-
-There is no expectation that the client will adjust its system clock to match the server (in fact, this would be a
-potential attack vector). Instead, the client only uses the server's time to calculate an offset used only
-for communications with that particular server. The protocol rewards clients with synchronized clocks by reducing
-the number of round trips required to authenticate the first request.
-
-
-## Usage Example
-
-Server code:
-
-```javascript
-var Http = require('http');
-var Hawk = require('hawk');
-
-
-// Credentials lookup function
-
-var credentialsFunc = function (id, callback) {
-
- var credentials = {
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'Steve'
- };
-
- return callback(null, credentials);
-};
-
-// Create HTTP server
-
-var handler = function (req, res) {
-
- // Authenticate incoming request
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
-
- // Prepare response
-
- var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');
- var headers = { 'Content-Type': 'text/plain' };
-
- // Generate Server-Authorization response header
-
- var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });
- headers['Server-Authorization'] = header;
-
- // Send the response back
-
- res.writeHead(!err ? 200 : 401, headers);
- res.end(payload);
- });
-};
-
-// Start server
-
-Http.createServer(handler).listen(8000, 'example.com');
-```
-
-Client code:
-
-```javascript
-var Request = require('request');
-var Hawk = require('hawk');
-
-
-// Client credentials
-
-var credentials = {
- id: 'dh37fgj492je',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256'
-}
-
-// Request options
-
-var requestOptions = {
- uri: 'http://example.com:8000/resource/1?b=1&a=2',
- method: 'GET',
- headers: {}
-};
-
-// Generate Authorization request header
-
-var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });
-requestOptions.headers.Authorization = header.field;
-
-// Send authenticated request
-
-Request(requestOptions, function (error, response, body) {
-
- // Authenticate the server's response
-
- var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });
-
- // Output results
-
- console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));
-});
-```
-
-**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local
-machine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.
-
-```javascript
-Hawk.sntp.start();
-```
-
-
-## Protocol Example
-
-The client attempts to access a protected resource without authentication, sending the following HTTP request to
-the resource server:
-
-```
-GET /resource/1?b=1&a=2 HTTP/1.1
-Host: example.com:8000
-```
-
-The resource server returns an authentication challenge.
-
-```
-HTTP/1.1 401 Unauthorized
-WWW-Authenticate: Hawk
-```
-
-The client has previously obtained a set of **Hawk** credentials for accessing resources on the "http://example.com/"
-server. The **Hawk** credentials issued to the client include the following attributes:
-
-* Key identifier: dh37fgj492je
-* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn
-* Algorithm: sha256
-
-The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,
-1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline
-character):
-
-```
-hawk.1.header
-1353832234
-j4h3g2
-GET
-/resource/1?b=1&a=2
-example.com
-8000
-
-some-app-ext-data
-
-```
-
-The request MAC is calculated using HMAC with the specified hash algorithm "sha256" and the key over the normalized request string.
-The result is base64-encoded to produce the request MAC:
-
-```
-6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=
-```
-
-The client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using
-the HTTP `Authorization` request header field:
-
-```
-GET /resource/1?b=1&a=2 HTTP/1.1
-Host: example.com:8000
-Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="
-```
-
-The server validates the request by calculating the request MAC again based on the request received and verifies the validity
-and scope of the **Hawk** credentials. If valid, the server responds with the requested resource.
-
-
-### Payload Validation
-
-**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash
-using the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):
-* `hawk.1.payload`
-* the content-type in lowercase, without any parameters (e.g. `application/json`)
-* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)
-
-For example:
-
-* Payload: `Thank you for flying Hawk`
-* Content Type: `text/plain`
-* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`
-
-Results in the following input to the payload hash function (newline terminated values):
-
-```
-hawk.1.payload
-text/plain
-Thank you for flying Hawk
-
-```
-
-Which produces the following hash value:
-
-```
-Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=
-```
-
-The client constructs the normalized request string (newline terminated values):
-
-```
-hawk.1.header
-1353832234
-j4h3g2
-POST
-/resource/1?a=1&b=2
-example.com
-8000
-Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=
-some-app-ext-data
-
-```
-
-Then calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,
-and request MAC, with the request using the HTTP `Authorization` request header field:
-
-```
-POST /resource/1?a=1&b=2 HTTP/1.1
-Host: example.com:8000
-Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="
-```
-
-It is up to the server if and when it validates the payload for any given request, based solely on it's security policy
-and the nature of the data included.
-
-If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct
-the normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value
-with the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.
-
-However, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed
-at a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value
-provided by the client after validating the MAC.
-
-It is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value
-included in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided
-by the client, the payload may be modified by an attacker.
-
-
-## Response Payload Validation
-
-**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the
-client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header
-as a response header using the exact same syntax as the `Authorization` request header field.
-
-The header is contructed using the same process as the client's request header. The server uses the same credentials and other
-artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with
-new values based on the server response. The rest as identical to those used by the client.
-
-The result MAC digest is included with the optional `hash` and `ext` values:
-
-```
-Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"
-```
-
-
-## Browser Support and Considerations
-
-A browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js). It's also a [component](http://component.io/hueniverse/hawk).
-
-**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client.
-Therefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value
-_"WWW-Authenticate, Server-Authorization"_ on each response from your server. As explained in the
-[specifications](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header), it will indicate that these headers
-can safely be accessed by the client (using getResponseHeader() on the XmlHttpRequest object). Otherwise you will be met with a
-["simple response header"](http://www.w3.org/TR/cors/#simple-response-header) which excludes these fields and would prevent the
-Hawk client from authenticating the requests.You can read more about the why and how in this
-[article](http://www.html5rocks.com/en/tutorials/cors/#toc-adding-cors-support-to-the-server)
-
-
-# Single URI Authorization
-
-There are cases in which limited and short-term access to a protected resource is granted to a third party which does not
-have access to the shared credentials. For example, displaying a protected image on a web page accessed by anyone. **Hawk**
-provides limited support for such URIs in the form of a _bewit_ - a URI query parameter appended to the request URI which contains
-the necessary credentials to authenticate the request.
-
-Because of the significant security risks involved in issuing such access, bewit usage is purposely limited only to GET requests
-and for a finite period of time. Both the client and server can issue bewit credentials, however, the server should not use the same
-credentials as the client to maintain clear traceability as to who issued which credentials.
-
-In order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within
-the granted access timeframe.
-
-
-## Bewit Usage Example
-
-Server code:
-
-```javascript
-var Http = require('http');
-var Hawk = require('hawk');
-
-
-// Credentials lookup function
-
-var credentialsFunc = function (id, callback) {
-
- var credentials = {
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256'
- };
-
- return callback(null, credentials);
-};
-
-// Create HTTP server
-
-var handler = function (req, res) {
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' });
- res.end(!err ? 'Access granted' : 'Shoosh!');
- });
-};
-
-Http.createServer(handler).listen(8000, 'example.com');
-```
-
-Bewit code generation:
-
-```javascript
-var Request = require('request');
-var Hawk = require('hawk');
-
-
-// Client credentials
-
-var credentials = {
- id: 'dh37fgj492je',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256'
-}
-
-// Generate bewit
-
-var duration = 60 * 5; // 5 Minutes
-var bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' });
-var uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit;
-```
-
-
-# Security Considerations
-
-The greatest sources of security risks are usually found not in **Hawk** but in the policies and procedures surrounding its use.
-Implementers are strongly encouraged to assess how this module addresses their security requirements. This section includes
-an incomplete list of security considerations that must be reviewed and understood before deploying **Hawk** on the server.
-Many of the protections provided in **Hawk** depends on whether and how they are used.
-
-### MAC Keys Transmission
-
-**Hawk** does not provide any mechanism for obtaining or transmitting the set of shared credentials required. Any mechanism used
-to obtain **Hawk** credentials must ensure that these transmissions are protected using transport-layer mechanisms such as TLS.
-
-### Confidentiality of Requests
-
-While **Hawk** provides a mechanism for verifying the integrity of HTTP requests, it provides no guarantee of request
-confidentiality. Unless other precautions are taken, eavesdroppers will have full access to the request content. Servers should
-carefully consider the types of data likely to be sent as part of such requests, and employ transport-layer security mechanisms
-to protect sensitive resources.
-
-### Spoofing by Counterfeit Servers
-
-**Hawk** provides limited verification of the server authenticity. When receiving a response back from the server, the server
-may choose to include a response `Server-Authorization` header which the client can use to verify the response. However, it is up to
-the server to determine when such measure is included, to up to the client to enforce that policy.
-
-A hostile party could take advantage of this by intercepting the client's requests and returning misleading or otherwise
-incorrect responses. Service providers should consider such attacks when developing services using this protocol, and should
-require transport-layer security for any requests where the authenticity of the resource server or of server responses is an issue.
-
-### Plaintext Storage of Credentials
-
-The **Hawk** key functions the same way passwords do in traditional authentication systems. In order to compute the request MAC,
-the server must have access to the key in plaintext form. This is in contrast, for example, to modern operating systems, which
-store only a one-way hash of user credentials.
-
-If an attacker were to gain access to these keys - or worse, to the server's database of all such keys - he or she would be able
-to perform any action on behalf of any resource owner. Accordingly, it is critical that servers protect these keys from unauthorized
-access.
-
-### Entropy of Keys
-
-Unless a transport-layer security protocol is used, eavesdroppers will have full access to authenticated requests and request
-MAC values, and will thus be able to mount offline brute-force attacks to recover the key used. Servers should be careful to
-assign keys which are long enough, and random enough, to resist such attacks for at least the length of time that the **Hawk**
-credentials are valid.
-
-For example, if the credentials are valid for two weeks, servers should ensure that it is not possible to mount a brute force
-attack that recovers the key in less than two weeks. Of course, servers are urged to err on the side of caution, and use the
-longest key reasonable.
-
-It is equally important that the pseudo-random number generator (PRNG) used to generate these keys be of sufficiently high
-quality. Many PRNG implementations generate number sequences that may appear to be random, but which nevertheless exhibit
-patterns or other weaknesses which make cryptanalysis or brute force attacks easier. Implementers should be careful to use
-cryptographically secure PRNGs to avoid these problems.
-
-### Coverage Limitations
-
-The request MAC only covers the HTTP `Host` header and optionally the `Content-Type` header. It does not cover any other headers
-which can often affect how the request body is interpreted by the server. If the server behavior is influenced by the presence
-or value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the
-`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC.
-
-The response authentication, when performed, only covers the response payload, content-type, and the request information
-provided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or
-any other response header field (e.g. Location) which can affect the client's behaviour.
-
-### Future Time Manipulation
-
-The protocol relies on a clock sync between the client and server. To accomplish this, the server informs the client of its
-current time when an invalid timestamp is received.
-
-If an attacker is able to manipulate this information and cause the client to use an incorrect time, it would be able to cause
-the client to generate authenticated requests using time in the future. Such requests will fail when sent by the client, and will
-not likely leave a trace on the server (given the common implementation of nonce, if at all enforced). The attacker will then
-be able to replay the request at the correct time without detection.
-
-The client must only use the time information provided by the server if:
-* it was delivered over a TLS connection and the server identity has been verified, or
-* the `tsm` MAC digest calculated using the same client credentials over the timestamp has been verified.
-
-### Client Clock Poisoning
-
-When receiving a request with a bad timestamp, the server provides the client with its current time. The client must never use
-the time received from the server to adjust its own clock, and must only use it to calculate an offset for communicating with
-that particular server.
-
-### Bewit Limitations
-
-Special care must be taken when issuing bewit credentials to third parties. Bewit credentials are valid until expiration and cannot
-be revoked or limited without using other means. Whatever resource they grant access to will be completely exposed to anyone with
-access to the bewit credentials which act as bearer credentials for that particular resource. While bewit usage is limited to GET
-requests only and therefore cannot be used to perform transactions or change server state, it can still be used to expose private
-and sensitive information.
-
-### Host Header Forgery
-
-Hawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port`
-options are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and
-use that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server
-implementors must manually verify that the host header received matches their expectation (or use the options mentioned above).
-
-# Frequently Asked Questions
-
-### Where is the protocol specification?
-
-If you are looking for some prose explaining how all this works, **this is it**. **Hawk** is being developed as an open source
-project instead of a standard. In other words, the [code](/hueniverse/hawk/tree/master/lib) is the specification. Not sure about
-something? Open an issue!
-
-### Is it done?
-
-As of version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental
-and is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions
-and suggestions.
-
-### Where can I find **Hawk** implementations in other languages?
-
-**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, it has been ported to other languages.
-The full list is maintained [here](https://github.com/hueniverse/hawk/issues?labels=port&state=closed). Please add an issue if you are
-working on another port. A cross-platform test-suite is in the works.
-
-### Why isn't the algorithm part of the challenge or dynamically negotiated?
-
-The algorithm used is closely related to the key issued as different algorithms require different key sizes (and other
-requirements). While some keys can be used for multiple algorithm, the protocol is designed to closely bind the key and algorithm
-together as part of the issued credentials.
-
-### Why is Host and Content-Type the only headers covered by the request MAC?
-
-It is really hard to include other headers. Headers can be changed by proxies and other intermediaries and there is no
-well-established way to normalize them. Many platforms change the case of header field names and values. The only
-straight-forward solution is to include the headers in some blob (say, base64 encoded JSON) and include that with the request,
-an approach taken by JWT and other such formats. However, that design violates the HTTP header boundaries, repeats information,
-and introduces other security issues because firewalls will not be aware of these "hidden" headers. In addition, any information
-repeated must be compared to the duplicated information in the header and therefore only moves the problem elsewhere.
-
-### Why not just use HTTP Digest?
-
-Digest requires pre-negotiation to establish a nonce. This means you can't just make a request - you must first send
-a protocol handshake to the server. This pattern has become unacceptable for most web services, especially mobile
-where extra round-trip are costly.
-
-### Why bother with all this nonce and timestamp business?
-
-**Hawk** is an attempt to find a reasonable, practical compromise between security and usability. OAuth 1.0 got timestamp
-and nonces halfway right but failed when it came to scalability and consistent developer experience. **Hawk** addresses
-it by requiring the client to sync its clock, but provides it with tools to accomplish it.
-
-In general, replay protection is a matter of application-specific threat model. It is less of an issue on a TLS-protected
-system where the clients are implemented using best practices and are under the control of the server. Instead of dropping
-replay protection, **Hawk** offers a required time window and an optional nonce verification. Together, it provides developers
-with the ability to decide how to enforce their security policy without impacting the client's implementation.
-
-### What are `app` and `dlg` in the authorization header and normalized mac string?
-
-The original motivation for **Hawk** was to replace the OAuth 1.0 use cases. This included both a simple client-server mode which
-this module is specifically designed for, and a delegated access mode which is being developed separately in
-[Oz](https://github.com/hueniverse/oz). In addition to the **Hawk** use cases, Oz requires another attribute: the application id `app`.
-This provides binding between the credentials and the application in a way that prevents an attacker from tricking an application
-to use credentials issued to someone else. It also has an optional 'delegated-by' attribute `dlg` which is the application id of the
-application the credentials were directly issued to. The goal of these two additions is to allow Oz to utilize **Hawk** directly,
-but with the additional security of delegated credentials.
-
-### What is the purpose of the static strings used in each normalized MAC input?
-
-When calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being
-used or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request,
-response, and a bewit use cases). It also protects against exploits created after a potential change in how the protocol
-creates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it
-can create an exploit opportunity for cases where the nonce is similar in format to a timestamp.
-
-### Does **Hawk** have anything to do with OAuth?
-
-Short answer: no.
-
-**Hawk** was originally proposed as the OAuth MAC Token specification. However, the OAuth working group in its consistent
-incompetence failed to produce a final, usable solution to address one of the most popular use cases of OAuth 1.0 - using it
-to authenticate simple client-server transactions (i.e. two-legged). As you can guess, the OAuth working group is still hard
-at work to produce more garbage.
-
-**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case
-of delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz).
-
-# Implementations
-
-- [Logibit Hawk in F#/.Net](https://github.com/logibit/logibit.hawk/)
-- [Tent Hawk in Ruby](https://github.com/tent/hawk-ruby)
-- [Wealdtech in Java](https://github.com/wealdtech/hawk)
-- [Kumar's Mohawk in Python](https://github.com/kumar303/mohawk/)
-
-# Acknowledgements
-
-**Hawk** is a derivative work of the [HTTP MAC Authentication Scheme](http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05) proposal
-co-authored by Ben Adida, Adam Barth, and Eran Hammer, which in turn was based on the OAuth 1.0 community specification.
-
-Special thanks to Ben Laurie for his always insightful feedback and advice.
-
-The **Hawk** logo was created by [Chris Carrasco](http://chriscarrasco.com).
diff --git a/node_modules/hawk/bower.json b/node_modules/hawk/bower.json
deleted file mode 100644
index 02729c5dc..000000000
--- a/node_modules/hawk/bower.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "hawk",
- "main": "lib/browser.js",
- "license": "./LICENSE",
- "ignore": [
- "!lib",
- "lib/*",
- "!lib/browser.js",
- "index.js"
- ],
- "keywords": [
- "http",
- "authentication",
- "scheme",
- "hawk"
- ],
- "authors": [
- "Eran Hammer <eran@hammer.io>"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/hueniverse/hawk.git"
- }
-}
diff --git a/node_modules/hawk/component.json b/node_modules/hawk/component.json
deleted file mode 100644
index 57be3ebf2..000000000
--- a/node_modules/hawk/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "hawk",
- "repo": "hueniverse/hawk",
- "description": "HTTP Hawk Authentication Scheme",
- "version": "1.0.0",
- "keywords": [
- "http",
- "authentication",
- "scheme",
- "hawk"
- ],
- "dependencies": {},
- "development": {},
- "license": "BSD",
- "main": "lib/browser.js",
- "scripts": [
- "lib/browser.js"
- ]
-} \ No newline at end of file
diff --git a/node_modules/hawk/dist/client.js b/node_modules/hawk/dist/client.js
deleted file mode 100644
index 1827386ed..000000000
--- a/node_modules/hawk/dist/client.js
+++ /dev/null
@@ -1,343 +0,0 @@
-'use strict'
-
-// Load modules
-
-;
-
-var _typeof = function (obj) {
-
- return obj && typeof Symbol !== 'undefined' && obj.constructor === Symbol ? 'symbol' : typeof obj;
-};
-
-var Url = require('url');
-var Hoek = require('hoek');
-var Cryptiles = require('cryptiles');
-var Crypto = require('./crypto');
-var Utils = require('./utils');
-
-// Declare internals
-
-var internals = {};
-
-// Generate an Authorization header for a given request
-
-/*
- uri: 'http://example.com/resource?a=b' or object from Url.parse()
- method: HTTP verb (e.g. 'GET', 'POST')
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
-
- // Optional
-
- ext: 'application-specific', // Application specific data sent via the ext attribute
- timestamp: Date.now(), // A pre-calculated timestamp
- nonce: '2334f34f', // A pre-generated nonce
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
- payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
- contentType: 'application/json', // Payload content-type (ignored if hash provided)
- hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
- app: '24s23423f34dx', // Oz application id
- dlg: '234sz34tww3sd' // Oz delegated-by application id
- }
-*/
-
-exports.header = function (uri, method, options) {
-
- var result = {
- field: '',
- artifacts: {}
- };
-
- // Validate inputs
-
- if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !method || typeof method !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
-
- result.err = 'Invalid argument type';
- return result;
- }
-
- // Application time
-
- var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
-
- result.err = 'Invalid credential object';
- return result;
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- result.err = 'Unknown algorithm';
- return result;
- }
-
- // Parse URI
-
- if (typeof uri === 'string') {
- uri = Url.parse(uri);
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || Cryptiles.randomString(6),
- method: method,
- resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
- host: uri.hostname,
- port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
- hash: options.hash,
- ext: options.ext,
- app: options.app,
- dlg: options.dlg
- };
-
- result.artifacts = artifacts;
-
- // Calculate payload hash
-
- if (!artifacts.hash && (options.payload || options.payload === '')) {
-
- artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- }
-
- var mac = Crypto.calculateMac('header', credentials, artifacts);
-
- // Construct header
-
- var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
- var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') + '", mac="' + mac + '"';
-
- if (artifacts.app) {
- header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
- }
-
- result.field = header;
-
- return result;
-};
-
-// Validate server response
-
-/*
- res: node's response object
- artifacts: object received from header().artifacts
- options: {
- payload: optional payload received
- required: specifies if a Server-Authorization header is required. Defaults to 'false'
- }
-*/
-
-exports.authenticate = function (res, credentials, artifacts, options) {
-
- artifacts = Hoek.clone(artifacts);
- options = options || {};
-
- if (res.headers['www-authenticate']) {
-
- // Parse HTTP WWW-Authenticate header
-
- var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
- if (wwwAttributes instanceof Error) {
- return false;
- }
-
- // Validate server timestamp (not used to update clock since it is done via the SNPT client)
-
- if (wwwAttributes.ts) {
- var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
- if (tsm !== wwwAttributes.tsm) {
- return false;
- }
- }
- }
-
- // Parse HTTP Server-Authorization header
-
- if (!res.headers['server-authorization'] && !options.required) {
-
- return true;
- }
-
- var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
- if (attributes instanceof Error) {
- return false;
- }
-
- artifacts.ext = attributes.ext;
- artifacts.hash = attributes.hash;
-
- var mac = Crypto.calculateMac('response', credentials, artifacts);
- if (mac !== attributes.mac) {
- return false;
- }
-
- if (!options.payload && options.payload !== '') {
-
- return true;
- }
-
- if (!attributes.hash) {
- return false;
- }
-
- var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
- return calculatedHash === attributes.hash;
-};
-
-// Generate a bewit value for a given URI
-
-/*
- uri: 'http://example.com/resource?a=b' or object from Url.parse()
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
- ttlSec: 60 * 60, // TTL in seconds
-
- // Optional
-
- ext: 'application-specific', // Application specific data sent via the ext attribute
- localtimeOffsetMsec: 400 // Time offset to sync with server time
- };
-*/
-
-exports.getBewit = function (uri, options) {
-
- // Validate inputs
-
- if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' || !options.ttlSec) {
-
- return '';
- }
-
- options.ext = options.ext === null || options.ext === undefined ? '' : options.ext; // Zero is valid value
-
- // Application time
-
- var now = Utils.now(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
-
- return '';
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return '';
- }
-
- // Parse URI
-
- if (typeof uri === 'string') {
- uri = Url.parse(uri);
- }
-
- // Calculate signature
-
- var exp = Math.floor(now / 1000) + options.ttlSec;
- var mac = Crypto.calculateMac('bewit', credentials, {
- ts: exp,
- nonce: '',
- method: 'GET',
- resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
- host: uri.hostname,
- port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
- ext: options.ext
- });
-
- // Construct bewit: id\exp\mac\ext
-
- var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
- return Hoek.base64urlEncode(bewit);
-};
-
-// Generate an authorization string for a message
-
-/*
- host: 'example.com',
- port: 8000,
- message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
-
- // Optional
-
- timestamp: Date.now(), // A pre-calculated timestamp
- nonce: '2334f34f', // A pre-generated nonce
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
- }
-*/
-
-exports.message = function (host, port, message, options) {
-
- // Validate inputs
-
- if (!host || typeof host !== 'string' || !port || typeof port !== 'number' || message === null || message === undefined || typeof message !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
-
- return null;
- }
-
- // Application time
-
- var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
-
- // Invalid credential object
- return null;
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return null;
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || Cryptiles.randomString(6),
- host: host,
- port: port,
- hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
- };
-
- // Construct authorization
-
- var result = {
- id: credentials.id,
- ts: artifacts.ts,
- nonce: artifacts.nonce,
- hash: artifacts.hash,
- mac: Crypto.calculateMac('message', credentials, artifacts)
- };
-
- return result;
-};
diff --git a/node_modules/hawk/example/usage.js b/node_modules/hawk/example/usage.js
deleted file mode 100755
index f55af03cd..000000000
--- a/node_modules/hawk/example/usage.js
+++ /dev/null
@@ -1,78 +0,0 @@
-// Load modules
-
-var Http = require('http');
-var Request = require('request');
-var Hawk = require('../lib');
-
-
-// Declare internals
-
-var internals = {
- credentials: {
- dh37fgj492je: {
- id: 'dh37fgj492je', // Required by Hawk.client.header
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'Steve'
- }
- }
-};
-
-
-// Credentials lookup function
-
-var credentialsFunc = function (id, callback) {
-
- return callback(null, internals.credentials[id]);
-};
-
-
-// Create HTTP server
-
-var handler = function (req, res) {
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
-
- var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');
- var headers = {
- 'Content-Type': 'text/plain',
- 'Server-Authorization': Hawk.server.header(credentials, artifacts, { payload: payload, contentType: 'text/plain' })
- };
-
- res.writeHead(!err ? 200 : 401, headers);
- res.end(payload);
- });
-};
-
-Http.createServer(handler).listen(8000, '127.0.0.1');
-
-
-// Send unauthenticated request
-
-Request('http://127.0.0.1:8000/resource/1?b=1&a=2', function (error, response, body) {
-
- console.log(response.statusCode + ': ' + body);
-});
-
-
-// Send authenticated request
-
-credentialsFunc('dh37fgj492je', function (err, credentials) {
-
- var header = Hawk.client.header('http://127.0.0.1:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'and welcome!' });
- var options = {
- uri: 'http://127.0.0.1:8000/resource/1?b=1&a=2',
- method: 'GET',
- headers: {
- authorization: header.field
- }
- };
-
- Request(options, function (error, response, body) {
-
- var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });
- console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));
- process.exit(0);
- });
-});
-
diff --git a/node_modules/hawk/images/hawk.png b/node_modules/hawk/images/hawk.png
deleted file mode 100755
index a0e15cda0..000000000
--- a/node_modules/hawk/images/hawk.png
+++ /dev/null
Binary files differ
diff --git a/node_modules/hawk/images/logo.png b/node_modules/hawk/images/logo.png
deleted file mode 100755
index b8ff59017..000000000
--- a/node_modules/hawk/images/logo.png
+++ /dev/null
Binary files differ
diff --git a/node_modules/hawk/lib/browser.js b/node_modules/hawk/lib/browser.js
deleted file mode 100755
index 3f6e85d07..000000000
--- a/node_modules/hawk/lib/browser.js
+++ /dev/null
@@ -1,637 +0,0 @@
-/*
- HTTP Hawk Authentication Scheme
- Copyright (c) 2012-2014, Eran Hammer <eran@hammer.io>
- BSD Licensed
-*/
-
-
-// Declare namespace
-
-var hawk = {
- internals: {}
-};
-
-
-hawk.client = {
-
- // Generate an Authorization header for a given request
-
- /*
- uri: 'http://example.com/resource?a=b' or object generated by hawk.utils.parseUri()
- method: HTTP verb (e.g. 'GET', 'POST')
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
-
- // Optional
-
- ext: 'application-specific', // Application specific data sent via the ext attribute
- timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds
- nonce: '2334f34f', // A pre-generated nonce
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
- payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
- contentType: 'application/json', // Payload content-type (ignored if hash provided)
- hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
- app: '24s23423f34dx', // Oz application id
- dlg: '234sz34tww3sd' // Oz delegated-by application id
- }
- */
-
- header: function (uri, method, options) {
-
- var result = {
- field: '',
- artifacts: {}
- };
-
- // Validate inputs
-
- if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') ||
- !method || typeof method !== 'string' ||
- !options || typeof options !== 'object') {
-
- result.err = 'Invalid argument type';
- return result;
- }
-
- // Application time
-
- var timestamp = options.timestamp || hawk.utils.now(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials ||
- !credentials.id ||
- !credentials.key ||
- !credentials.algorithm) {
-
- result.err = 'Invalid credentials object';
- return result;
- }
-
- if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- result.err = 'Unknown algorithm';
- return result;
- }
-
- // Parse URI
-
- if (typeof uri === 'string') {
- uri = hawk.utils.parseUri(uri);
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || hawk.utils.randomString(6),
- method: method,
- resource: uri.resource,
- host: uri.host,
- port: uri.port,
- hash: options.hash,
- ext: options.ext,
- app: options.app,
- dlg: options.dlg
- };
-
- result.artifacts = artifacts;
-
- // Calculate payload hash
-
- if (!artifacts.hash &&
- (options.payload || options.payload === '')) {
-
- artifacts.hash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- }
-
- var mac = hawk.crypto.calculateMac('header', credentials, artifacts);
-
- // Construct header
-
- var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
- var header = 'Hawk id="' + credentials.id +
- '", ts="' + artifacts.ts +
- '", nonce="' + artifacts.nonce +
- (artifacts.hash ? '", hash="' + artifacts.hash : '') +
- (hasExt ? '", ext="' + hawk.utils.escapeHeaderAttribute(artifacts.ext) : '') +
- '", mac="' + mac + '"';
-
- if (artifacts.app) {
- header += ', app="' + artifacts.app +
- (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
- }
-
- result.field = header;
-
- return result;
- },
-
- // Generate a bewit value for a given URI
-
- /*
- uri: 'http://example.com/resource?a=b'
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
- ttlSec: 60 * 60, // TTL in seconds
-
- // Optional
-
- ext: 'application-specific', // Application specific data sent via the ext attribute
- localtimeOffsetMsec: 400 // Time offset to sync with server time
- };
- */
-
- bewit: function (uri, options) {
-
- // Validate inputs
-
- if (!uri ||
- (typeof uri !== 'string') ||
- !options ||
- typeof options !== 'object' ||
- !options.ttlSec) {
-
- return '';
- }
-
- options.ext = (options.ext === null || options.ext === undefined ? '' : options.ext); // Zero is valid value
-
- // Application time
-
- var now = hawk.utils.now(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials ||
- !credentials.id ||
- !credentials.key ||
- !credentials.algorithm) {
-
- return '';
- }
-
- if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return '';
- }
-
- // Parse URI
-
- uri = hawk.utils.parseUri(uri);
-
- // Calculate signature
-
- var exp = now + options.ttlSec;
- var mac = hawk.crypto.calculateMac('bewit', credentials, {
- ts: exp,
- nonce: '',
- method: 'GET',
- resource: uri.resource, // Maintain trailing '?' and query params
- host: uri.host,
- port: uri.port,
- ext: options.ext
- });
-
- // Construct bewit: id\exp\mac\ext
-
- var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
- return hawk.utils.base64urlEncode(bewit);
- },
-
- // Validate server response
-
- /*
- request: object created via 'new XMLHttpRequest()' after response received
- artifacts: object received from header().artifacts
- options: {
- payload: optional payload received
- required: specifies if a Server-Authorization header is required. Defaults to 'false'
- }
- */
-
- authenticate: function (request, credentials, artifacts, options) {
-
- options = options || {};
-
- var getHeader = function (name) {
-
- return request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name);
- };
-
- var wwwAuthenticate = getHeader('www-authenticate');
- if (wwwAuthenticate) {
-
- // Parse HTTP WWW-Authenticate header
-
- var wwwAttributes = hawk.utils.parseAuthorizationHeader(wwwAuthenticate, ['ts', 'tsm', 'error']);
- if (!wwwAttributes) {
- return false;
- }
-
- if (wwwAttributes.ts) {
- var tsm = hawk.crypto.calculateTsMac(wwwAttributes.ts, credentials);
- if (tsm !== wwwAttributes.tsm) {
- return false;
- }
-
- hawk.utils.setNtpOffset(wwwAttributes.ts - Math.floor((new Date()).getTime() / 1000)); // Keep offset at 1 second precision
- }
- }
-
- // Parse HTTP Server-Authorization header
-
- var serverAuthorization = getHeader('server-authorization');
- if (!serverAuthorization &&
- !options.required) {
-
- return true;
- }
-
- var attributes = hawk.utils.parseAuthorizationHeader(serverAuthorization, ['mac', 'ext', 'hash']);
- if (!attributes) {
- return false;
- }
-
- var modArtifacts = {
- ts: artifacts.ts,
- nonce: artifacts.nonce,
- method: artifacts.method,
- resource: artifacts.resource,
- host: artifacts.host,
- port: artifacts.port,
- hash: attributes.hash,
- ext: attributes.ext,
- app: artifacts.app,
- dlg: artifacts.dlg
- };
-
- var mac = hawk.crypto.calculateMac('response', credentials, modArtifacts);
- if (mac !== attributes.mac) {
- return false;
- }
-
- if (!options.payload &&
- options.payload !== '') {
-
- return true;
- }
-
- if (!attributes.hash) {
- return false;
- }
-
- var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, getHeader('content-type'));
- return (calculatedHash === attributes.hash);
- },
-
- message: function (host, port, message, options) {
-
- // Validate inputs
-
- if (!host || typeof host !== 'string' ||
- !port || typeof port !== 'number' ||
- message === null || message === undefined || typeof message !== 'string' ||
- !options || typeof options !== 'object') {
-
- return null;
- }
-
- // Application time
-
- var timestamp = options.timestamp || hawk.utils.now(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials ||
- !credentials.id ||
- !credentials.key ||
- !credentials.algorithm) {
-
- // Invalid credential object
- return null;
- }
-
- if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return null;
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || hawk.utils.randomString(6),
- host: host,
- port: port,
- hash: hawk.crypto.calculatePayloadHash(message, credentials.algorithm)
- };
-
- // Construct authorization
-
- var result = {
- id: credentials.id,
- ts: artifacts.ts,
- nonce: artifacts.nonce,
- hash: artifacts.hash,
- mac: hawk.crypto.calculateMac('message', credentials, artifacts)
- };
-
- return result;
- },
-
- authenticateTimestamp: function (message, credentials, updateClock) { // updateClock defaults to true
-
- var tsm = hawk.crypto.calculateTsMac(message.ts, credentials);
- if (tsm !== message.tsm) {
- return false;
- }
-
- if (updateClock !== false) {
- hawk.utils.setNtpOffset(message.ts - Math.floor((new Date()).getTime() / 1000)); // Keep offset at 1 second precision
- }
-
- return true;
- }
-};
-
-
-hawk.crypto = {
-
- headerVersion: '1',
-
- algorithms: ['sha1', 'sha256'],
-
- calculateMac: function (type, credentials, options) {
-
- var normalized = hawk.crypto.generateNormalizedString(type, options);
-
- var hmac = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()](normalized, credentials.key);
- return hmac.toString(CryptoJS.enc.Base64);
- },
-
- generateNormalizedString: function (type, options) {
-
- var normalized = 'hawk.' + hawk.crypto.headerVersion + '.' + type + '\n' +
- options.ts + '\n' +
- options.nonce + '\n' +
- (options.method || '').toUpperCase() + '\n' +
- (options.resource || '') + '\n' +
- options.host.toLowerCase() + '\n' +
- options.port + '\n' +
- (options.hash || '') + '\n';
-
- if (options.ext) {
- normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n');
- }
-
- normalized += '\n';
-
- if (options.app) {
- normalized += options.app + '\n' +
- (options.dlg || '') + '\n';
- }
-
- return normalized;
- },
-
- calculatePayloadHash: function (payload, algorithm, contentType) {
-
- var hash = CryptoJS.algo[algorithm.toUpperCase()].create();
- hash.update('hawk.' + hawk.crypto.headerVersion + '.payload\n');
- hash.update(hawk.utils.parseContentType(contentType) + '\n');
- hash.update(payload);
- hash.update('\n');
- return hash.finalize().toString(CryptoJS.enc.Base64);
- },
-
- calculateTsMac: function (ts, credentials) {
-
- var hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key);
- return hash.toString(CryptoJS.enc.Base64);
- }
-};
-
-
-// localStorage compatible interface
-
-hawk.internals.LocalStorage = function () {
-
- this._cache = {};
- this.length = 0;
-
- this.getItem = function (key) {
-
- return this._cache.hasOwnProperty(key) ? String(this._cache[key]) : null;
- };
-
- this.setItem = function (key, value) {
-
- this._cache[key] = String(value);
- this.length = Object.keys(this._cache).length;
- };
-
- this.removeItem = function (key) {
-
- delete this._cache[key];
- this.length = Object.keys(this._cache).length;
- };
-
- this.clear = function () {
-
- this._cache = {};
- this.length = 0;
- };
-
- this.key = function (i) {
-
- return Object.keys(this._cache)[i || 0];
- };
-};
-
-
-hawk.utils = {
-
- storage: new hawk.internals.LocalStorage(),
-
- setStorage: function (storage) {
-
- var ntpOffset = hawk.utils.storage.getItem('hawk_ntp_offset');
- hawk.utils.storage = storage;
- if (ntpOffset) {
- hawk.utils.setNtpOffset(ntpOffset);
- }
- },
-
- setNtpOffset: function (offset) {
-
- try {
- hawk.utils.storage.setItem('hawk_ntp_offset', offset);
- }
- catch (err) {
- console.error('[hawk] could not write to storage.');
- console.error(err);
- }
- },
-
- getNtpOffset: function () {
-
- var offset = hawk.utils.storage.getItem('hawk_ntp_offset');
- if (!offset) {
- return 0;
- }
-
- return parseInt(offset, 10);
- },
-
- now: function (localtimeOffsetMsec) {
-
- return Math.floor(((new Date()).getTime() + (localtimeOffsetMsec || 0)) / 1000) + hawk.utils.getNtpOffset();
- },
-
- escapeHeaderAttribute: function (attribute) {
-
- return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"');
- },
-
- parseContentType: function (header) {
-
- if (!header) {
- return '';
- }
-
- return header.split(';')[0].replace(/^\s+|\s+$/g, '').toLowerCase();
- },
-
- parseAuthorizationHeader: function (header, keys) {
-
- if (!header) {
- return null;
- }
-
- var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something]
- if (!headerParts) {
- return null;
- }
-
- var scheme = headerParts[1];
- if (scheme.toLowerCase() !== 'hawk') {
- return null;
- }
-
- var attributesString = headerParts[2];
- if (!attributesString) {
- return null;
- }
-
- var attributes = {};
- var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) {
-
- // Check valid attribute names
-
- if (keys.indexOf($1) === -1) {
- return;
- }
-
- // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9
-
- if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) {
- return;
- }
-
- // Check for duplicates
-
- if (attributes.hasOwnProperty($1)) {
- return;
- }
-
- attributes[$1] = $2;
- return '';
- });
-
- if (verify !== '') {
- return null;
- }
-
- return attributes;
- },
-
- randomString: function (size) {
-
- var randomSource = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- var len = randomSource.length;
-
- var result = [];
- for (var i = 0; i < size; ++i) {
- result[i] = randomSource[Math.floor(Math.random() * len)];
- }
-
- return result.join('');
- },
-
- uriRegex: /^([^:]+)\:\/\/(?:[^@]*@)?([^\/:]+)(?:\:(\d+))?([^#]*)(?:#.*)?$/, // scheme://credentials@host:port/resource#fragment
- parseUri: function (input) {
-
- var parts = input.match(hawk.utils.uriRegex);
- if (!parts) {
- return { host: '', port: '', resource: '' };
- }
-
- var scheme = parts[1].toLowerCase();
- var uri = {
- host: parts[2],
- port: parts[3] || (scheme === 'http' ? '80' : (scheme === 'https' ? '443' : '')),
- resource: parts[4]
- };
-
- return uri;
- },
-
- base64urlEncode: function (value) {
-
- var wordArray = CryptoJS.enc.Utf8.parse(value);
- var encoded = CryptoJS.enc.Base64.stringify(wordArray);
- return encoded.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
- }
-};
-
-
-// $lab:coverage:off$
-/* eslint-disable */
-
-// Based on: Crypto-JS v3.1.2
-// Copyright (c) 2009-2013, Jeff Mott. All rights reserved.
-// http://code.google.com/p/crypto-js/
-// http://code.google.com/p/crypto-js/wiki/License
-
-var CryptoJS = CryptoJS || function (h, r) { var k = {}, l = k.lib = {}, n = function () { }, f = l.Base = { extend: function (a) { n.prototype = this; var b = new n; a && b.mixIn(a); b.hasOwnProperty("init") || (b.init = function () { b.$super.init.apply(this, arguments) }); b.init.prototype = b; b.$super = this; return b }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (var b in a) a.hasOwnProperty(b) && (this[b] = a[b]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, j = l.WordArray = f.extend({ init: function (a, b) { a = this.words = a || []; this.sigBytes = b != r ? b : 4 * a.length }, toString: function (a) { return (a || s).stringify(this) }, concat: function (a) { var b = this.words, d = a.words, c = this.sigBytes; a = a.sigBytes; this.clamp(); if (c % 4) for (var e = 0; e < a; e++) b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4); else if (65535 < d.length) for (e = 0; e < a; e += 4) b[c + e >>> 2] = d[e >>> 2]; else b.push.apply(b, d); this.sigBytes += a; return this }, clamp: function () { var a = this.words, b = this.sigBytes; a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4); a.length = h.ceil(b / 4) }, clone: function () { var a = f.clone.call(this); a.words = this.words.slice(0); return a }, random: function (a) { for (var b = [], d = 0; d < a; d += 4) b.push(4294967296 * h.random() | 0); return new j.init(b, a) } }), m = k.enc = {}, s = m.Hex = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) { var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255; d.push((e >>> 4).toString(16)); d.push((e & 15).toString(16)) } return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c += 2) d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8); return new j.init(d, b / 2) } }, p = m.Latin1 = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255)); return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c++) d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4); return new j.init(d, b) } }, t = m.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(p.stringify(a))) } catch (b) { throw Error("Malformed UTF-8 data"); } }, parse: function (a) { return p.parse(unescape(encodeURIComponent(a))) } }, q = l.BufferedBlockAlgorithm = f.extend({ reset: function () { this._data = new j.init; this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = t.parse(a)); this._data.concat(a); this._nDataBytes += a.sigBytes }, _process: function (a) { var b = this._data, d = b.words, c = b.sigBytes, e = this.blockSize, f = c / (4 * e), f = a ? h.ceil(f) : h.max((f | 0) - this._minBufferSize, 0); a = f * e; c = h.min(4 * a, c); if (a) { for (var g = 0; g < a; g += e) this._doProcessBlock(d, g); g = d.splice(0, a); b.sigBytes -= c } return new j.init(g, c) }, clone: function () { var a = f.clone.call(this); a._data = this._data.clone(); return a }, _minBufferSize: 0 }); l.Hasher = q.extend({ cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a); this.reset() }, reset: function () { q.reset.call(this); this._doReset() }, update: function (a) { this._append(a); this._process(); return this }, finalize: function (a) { a && this._append(a); return this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, d) { return (new a.init(d)).finalize(b) } }, _createHmacHelper: function (a) { return function (b, d) { return (new u.HMAC.init(a, d)).finalize(b) } } }); var u = k.algo = {}; return k }(Math);
-(function () { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })();
-(function (k) { for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function (q) { return 4294967296 * (q - (q | 0)) | 0 }, l = 2, b = 0; 64 > b;) { var d; a: { d = l; for (var w = k.sqrt(d), r = 2; r <= w; r++) if (!(d % r)) { d = !1; break a } d = !0 } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ } var n = [], h = h.SHA256 = j.extend({ _doReset: function () { this._hash = new v.init(s.slice(0)) }, _doProcessBlock: function (q, h) { for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) { if (16 > e) n[e] = q[h + e] | 0; else { var m = n[e - 15], p = n[e - 2]; n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16] } m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e]; p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b); l = j; j = g; g = f; f = k + m | 0; k = b; b = d; d = c; c = m + p | 0 } a[0] = a[0] + c | 0; a[1] = a[1] + d | 0; a[2] = a[2] + b | 0; a[3] = a[3] + k | 0; a[4] = a[4] + f | 0; a[5] = a[5] + g | 0; a[6] = a[6] + j | 0; a[7] = a[7] + l | 0 }, _doFinalize: function () { var d = this._data, b = d.words, a = 8 * this._nDataBytes, c = 8 * d.sigBytes; b[c >>> 5] |= 128 << 24 - c % 32; b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296); b[(c + 64 >>> 9 << 4) + 15] = a; d.sigBytes = 4 * b.length; this._process(); return this._hash }, clone: function () { var b = j.clone.call(this); b._hash = this._hash.clone(); return b } }); g.SHA256 = j._createHelper(h); g.HmacSHA256 = j._createHmacHelper(h) })(Math);
-(function () { var c = CryptoJS, k = c.enc.Utf8; c.algo.HMAC = c.lib.Base.extend({ init: function (a, b) { a = this._hasher = new a.init; "string" == typeof b && (b = k.parse(b)); var c = a.blockSize, e = 4 * c; b.sigBytes > e && (b = a.finalize(b)); b.clamp(); for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) h[d] ^= 1549556828, j[d] ^= 909522486; f.sigBytes = g.sigBytes = e; this.reset() }, reset: function () { var a = this._hasher; a.reset(); a.update(this._iKey) }, update: function (a) { this._hasher.update(a); return this }, finalize: function (a) { var b = this._hasher; a = b.finalize(a); b.reset(); return b.finalize(this._oKey.clone().concat(a)) } }) })();
-(function () { var h = CryptoJS, j = h.lib.WordArray; h.enc.Base64 = { stringify: function (b) { var e = b.words, f = b.sigBytes, c = this._map; b.clamp(); b = []; for (var a = 0; a < f; a += 3) for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) b.push(c.charAt(d >>> 6 * (3 - g) & 63)); if (e = c.charAt(64)) for (; b.length % 4;) b.push(e); return b.join("") }, parse: function (b) { var e = b.length, f = this._map, c = f.charAt(64); c && (c = b.indexOf(c), -1 != c && (e = c)); for (var c = [], a = 0, d = 0; d < e; d++) if (d % 4) { var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4), h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4); c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4); a++ } return j.create(c, a) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } })();
-
-hawk.crypto.internals = CryptoJS;
-
-
-// Export if used as a module
-
-if (typeof module !== 'undefined' && module.exports) {
- module.exports = hawk;
-}
-
-/* eslint-enable */
-// $lab:coverage:on$
diff --git a/node_modules/hawk/lib/client.js b/node_modules/hawk/lib/client.js
deleted file mode 100755
index 601f51ca1..000000000
--- a/node_modules/hawk/lib/client.js
+++ /dev/null
@@ -1,369 +0,0 @@
-// Load modules
-
-var Url = require('url');
-var Hoek = require('hoek');
-var Cryptiles = require('cryptiles');
-var Crypto = require('./crypto');
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Generate an Authorization header for a given request
-
-/*
- uri: 'http://example.com/resource?a=b' or object from Url.parse()
- method: HTTP verb (e.g. 'GET', 'POST')
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
-
- // Optional
-
- ext: 'application-specific', // Application specific data sent via the ext attribute
- timestamp: Date.now(), // A pre-calculated timestamp
- nonce: '2334f34f', // A pre-generated nonce
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
- payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
- contentType: 'application/json', // Payload content-type (ignored if hash provided)
- hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
- app: '24s23423f34dx', // Oz application id
- dlg: '234sz34tww3sd' // Oz delegated-by application id
- }
-*/
-
-exports.header = function (uri, method, options) {
-
- var result = {
- field: '',
- artifacts: {}
- };
-
- // Validate inputs
-
- if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') ||
- !method || typeof method !== 'string' ||
- !options || typeof options !== 'object') {
-
- result.err = 'Invalid argument type';
- return result;
- }
-
- // Application time
-
- var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials ||
- !credentials.id ||
- !credentials.key ||
- !credentials.algorithm) {
-
- result.err = 'Invalid credential object';
- return result;
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- result.err = 'Unknown algorithm';
- return result;
- }
-
- // Parse URI
-
- if (typeof uri === 'string') {
- uri = Url.parse(uri);
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || Cryptiles.randomString(6),
- method: method,
- resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
- host: uri.hostname,
- port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
- hash: options.hash,
- ext: options.ext,
- app: options.app,
- dlg: options.dlg
- };
-
- result.artifacts = artifacts;
-
- // Calculate payload hash
-
- if (!artifacts.hash &&
- (options.payload || options.payload === '')) {
-
- artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- }
-
- var mac = Crypto.calculateMac('header', credentials, artifacts);
-
- // Construct header
-
- var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
- var header = 'Hawk id="' + credentials.id +
- '", ts="' + artifacts.ts +
- '", nonce="' + artifacts.nonce +
- (artifacts.hash ? '", hash="' + artifacts.hash : '') +
- (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') +
- '", mac="' + mac + '"';
-
- if (artifacts.app) {
- header += ', app="' + artifacts.app +
- (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
- }
-
- result.field = header;
-
- return result;
-};
-
-
-// Validate server response
-
-/*
- res: node's response object
- artifacts: object received from header().artifacts
- options: {
- payload: optional payload received
- required: specifies if a Server-Authorization header is required. Defaults to 'false'
- }
-*/
-
-exports.authenticate = function (res, credentials, artifacts, options) {
-
- artifacts = Hoek.clone(artifacts);
- options = options || {};
-
- if (res.headers['www-authenticate']) {
-
- // Parse HTTP WWW-Authenticate header
-
- var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
- if (wwwAttributes instanceof Error) {
- return false;
- }
-
- // Validate server timestamp (not used to update clock since it is done via the SNPT client)
-
- if (wwwAttributes.ts) {
- var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
- if (tsm !== wwwAttributes.tsm) {
- return false;
- }
- }
- }
-
- // Parse HTTP Server-Authorization header
-
- if (!res.headers['server-authorization'] &&
- !options.required) {
-
- return true;
- }
-
- var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
- if (attributes instanceof Error) {
- return false;
- }
-
- artifacts.ext = attributes.ext;
- artifacts.hash = attributes.hash;
-
- var mac = Crypto.calculateMac('response', credentials, artifacts);
- if (mac !== attributes.mac) {
- return false;
- }
-
- if (!options.payload &&
- options.payload !== '') {
-
- return true;
- }
-
- if (!attributes.hash) {
- return false;
- }
-
- var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
- return (calculatedHash === attributes.hash);
-};
-
-
-// Generate a bewit value for a given URI
-
-/*
- uri: 'http://example.com/resource?a=b' or object from Url.parse()
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
- ttlSec: 60 * 60, // TTL in seconds
-
- // Optional
-
- ext: 'application-specific', // Application specific data sent via the ext attribute
- localtimeOffsetMsec: 400 // Time offset to sync with server time
- };
-*/
-
-exports.getBewit = function (uri, options) {
-
- // Validate inputs
-
- if (!uri ||
- (typeof uri !== 'string' && typeof uri !== 'object') ||
- !options ||
- typeof options !== 'object' ||
- !options.ttlSec) {
-
- return '';
- }
-
- options.ext = (options.ext === null || options.ext === undefined ? '' : options.ext); // Zero is valid value
-
- // Application time
-
- var now = Utils.now(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials ||
- !credentials.id ||
- !credentials.key ||
- !credentials.algorithm) {
-
- return '';
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return '';
- }
-
- // Parse URI
-
- if (typeof uri === 'string') {
- uri = Url.parse(uri);
- }
-
- // Calculate signature
-
- var exp = Math.floor(now / 1000) + options.ttlSec;
- var mac = Crypto.calculateMac('bewit', credentials, {
- ts: exp,
- nonce: '',
- method: 'GET',
- resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
- host: uri.hostname,
- port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
- ext: options.ext
- });
-
- // Construct bewit: id\exp\mac\ext
-
- var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
- return Hoek.base64urlEncode(bewit);
-};
-
-
-// Generate an authorization string for a message
-
-/*
- host: 'example.com',
- port: 8000,
- message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation
- options: {
-
- // Required
-
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
-
- // Optional
-
- timestamp: Date.now(), // A pre-calculated timestamp
- nonce: '2334f34f', // A pre-generated nonce
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
- }
-*/
-
-exports.message = function (host, port, message, options) {
-
- // Validate inputs
-
- if (!host || typeof host !== 'string' ||
- !port || typeof port !== 'number' ||
- message === null || message === undefined || typeof message !== 'string' ||
- !options || typeof options !== 'object') {
-
- return null;
- }
-
- // Application time
-
- var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials ||
- !credentials.id ||
- !credentials.key ||
- !credentials.algorithm) {
-
- // Invalid credential object
- return null;
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return null;
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || Cryptiles.randomString(6),
- host: host,
- port: port,
- hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
- };
-
- // Construct authorization
-
- var result = {
- id: credentials.id,
- ts: artifacts.ts,
- nonce: artifacts.nonce,
- hash: artifacts.hash,
- mac: Crypto.calculateMac('message', credentials, artifacts)
- };
-
- return result;
-};
-
-
-
diff --git a/node_modules/hawk/lib/crypto.js b/node_modules/hawk/lib/crypto.js
deleted file mode 100755
index 565ae496c..000000000
--- a/node_modules/hawk/lib/crypto.js
+++ /dev/null
@@ -1,126 +0,0 @@
-// Load modules
-
-var Crypto = require('crypto');
-var Url = require('url');
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// MAC normalization format version
-
-exports.headerVersion = '1'; // Prevent comparison of mac values generated with different normalized string formats
-
-
-// Supported HMAC algorithms
-
-exports.algorithms = ['sha1', 'sha256'];
-
-
-// Calculate the request MAC
-
-/*
- type: 'header', // 'header', 'bewit', 'response'
- credentials: {
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
- options: {
- method: 'GET',
- resource: '/resource?a=1&b=2',
- host: 'example.com',
- port: 8080,
- ts: 1357718381034,
- nonce: 'd3d345f',
- hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=',
- ext: 'app-specific-data',
- app: 'hf48hd83qwkj', // Application id (Oz)
- dlg: 'd8djwekds9cj' // Delegated by application id (Oz), requires options.app
- }
-*/
-
-exports.calculateMac = function (type, credentials, options) {
-
- var normalized = exports.generateNormalizedString(type, options);
-
- var hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized);
- var digest = hmac.digest('base64');
- return digest;
-};
-
-
-exports.generateNormalizedString = function (type, options) {
-
- var resource = options.resource || '';
- if (resource &&
- resource[0] !== '/') {
-
- var url = Url.parse(resource, false);
- resource = url.path; // Includes query
- }
-
- var normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' +
- options.ts + '\n' +
- options.nonce + '\n' +
- (options.method || '').toUpperCase() + '\n' +
- resource + '\n' +
- options.host.toLowerCase() + '\n' +
- options.port + '\n' +
- (options.hash || '') + '\n';
-
- if (options.ext) {
- normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n');
- }
-
- normalized += '\n';
-
- if (options.app) {
- normalized += options.app + '\n' +
- (options.dlg || '') + '\n';
- }
-
- return normalized;
-};
-
-
-exports.calculatePayloadHash = function (payload, algorithm, contentType) {
-
- var hash = exports.initializePayloadHash(algorithm, contentType);
- hash.update(payload || '');
- return exports.finalizePayloadHash(hash);
-};
-
-
-exports.initializePayloadHash = function (algorithm, contentType) {
-
- var hash = Crypto.createHash(algorithm);
- hash.update('hawk.' + exports.headerVersion + '.payload\n');
- hash.update(Utils.parseContentType(contentType) + '\n');
- return hash;
-};
-
-
-exports.finalizePayloadHash = function (hash) {
-
- hash.update('\n');
- return hash.digest('base64');
-};
-
-
-exports.calculateTsMac = function (ts, credentials) {
-
- var hmac = Crypto.createHmac(credentials.algorithm, credentials.key);
- hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n');
- return hmac.digest('base64');
-};
-
-
-exports.timestampMessage = function (credentials, localtimeOffsetMsec) {
-
- var now = Utils.nowSecs(localtimeOffsetMsec);
- var tsm = exports.calculateTsMac(now, credentials);
- return { ts: now, tsm: tsm };
-};
diff --git a/node_modules/hawk/lib/index.js b/node_modules/hawk/lib/index.js
deleted file mode 100755
index 58b5bc38e..000000000
--- a/node_modules/hawk/lib/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Export sub-modules
-
-exports.error = exports.Error = require('boom');
-exports.sntp = require('sntp');
-
-exports.server = require('./server');
-exports.client = require('./client');
-exports.crypto = require('./crypto');
-exports.utils = require('./utils');
-
-exports.uri = {
- authenticate: exports.server.authenticateBewit,
- getBewit: exports.client.getBewit
-};
-
diff --git a/node_modules/hawk/lib/server.js b/node_modules/hawk/lib/server.js
deleted file mode 100755
index 67e1a069b..000000000
--- a/node_modules/hawk/lib/server.js
+++ /dev/null
@@ -1,548 +0,0 @@
-// Load modules
-
-var Boom = require('boom');
-var Hoek = require('hoek');
-var Cryptiles = require('cryptiles');
-var Crypto = require('./crypto');
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Hawk authentication
-
-/*
- req: node's HTTP request object or an object as follows:
-
- var request = {
- method: 'GET',
- url: '/resource/4?a=1&b=2',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="'
- };
-
- credentialsFunc: required function to lookup the set of Hawk credentials based on the provided credentials id.
- The credentials include the MAC key, MAC algorithm, and other attributes (such as username)
- needed by the application. This function is the equivalent of verifying the username and
- password in Basic authentication.
-
- var credentialsFunc = function (id, callback) {
-
- // Lookup credentials in database
- db.lookup(id, function (err, item) {
-
- if (err || !item) {
- return callback(err);
- }
-
- var credentials = {
- // Required
- key: item.key,
- algorithm: item.algorithm,
- // Application specific
- user: item.user
- };
-
- return callback(null, credentials);
- });
- };
-
- options: {
-
- hostHeaderName: optional header field name, used to override the default 'Host' header when used
- behind a cache of a proxy. Apache2 changes the value of the 'Host' header while preserving
- the original (which is what the module must verify) in the 'x-forwarded-host' header field.
- Only used when passed a node Http.ServerRequest object.
-
- nonceFunc: optional nonce validation function. The function signature is function(key, nonce, ts, callback)
- where 'callback' must be called using the signature function(err).
-
- timestampSkewSec: optional number of seconds of permitted clock skew for incoming timestamps. Defaults to 60 seconds.
- Provides a +/- skew which means actual allowed window is double the number of seconds.
-
- localtimeOffsetMsec: optional local clock time offset express in a number of milliseconds (positive or negative).
- Defaults to 0.
-
- payload: optional payload for validation. The client calculates the hash value and includes it via the 'hash'
- header attribute. The server always ensures the value provided has been included in the request
- MAC. When this option is provided, it validates the hash value itself. Validation is done by calculating
- a hash value over the entire payload (assuming it has already be normalized to the same format and
- encoding used by the client to calculate the hash on request). If the payload is not available at the time
- of authentication, the authenticatePayload() method can be used by passing it the credentials and
- attributes.hash returned in the authenticate callback.
-
- host: optional host name override. Only used when passed a node request object.
- port: optional port override. Only used when passed a node request object.
- }
-
- callback: function (err, credentials, artifacts) { }
- */
-
-exports.authenticate = function (req, credentialsFunc, options, callback) {
-
- callback = Hoek.nextTick(callback);
-
- // Default options
-
- options.nonceFunc = options.nonceFunc || internals.nonceFunc;
- options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds
-
- // Application time
-
- var now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
-
- // Convert node Http request object to a request configuration object
-
- var request = Utils.parseRequest(req, options);
- if (request instanceof Error) {
- return callback(Boom.badRequest(request.message));
- }
-
- // Parse HTTP Authorization header
-
- var attributes = Utils.parseAuthorizationHeader(request.authorization);
- if (attributes instanceof Error) {
- return callback(attributes);
- }
-
- // Construct artifacts container
-
- var artifacts = {
- method: request.method,
- host: request.host,
- port: request.port,
- resource: request.url,
- ts: attributes.ts,
- nonce: attributes.nonce,
- hash: attributes.hash,
- ext: attributes.ext,
- app: attributes.app,
- dlg: attributes.dlg,
- mac: attributes.mac,
- id: attributes.id
- };
-
- // Verify required header attributes
-
- if (!attributes.id ||
- !attributes.ts ||
- !attributes.nonce ||
- !attributes.mac) {
-
- return callback(Boom.badRequest('Missing attributes'), null, artifacts);
- }
-
- // Fetch Hawk credentials
-
- credentialsFunc(attributes.id, function (err, credentials) {
-
- if (err) {
- return callback(err, credentials || null, artifacts);
- }
-
- if (!credentials) {
- return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, artifacts);
- }
-
- if (!credentials.key ||
- !credentials.algorithm) {
-
- return callback(Boom.internal('Invalid credentials'), credentials, artifacts);
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return callback(Boom.internal('Unknown algorithm'), credentials, artifacts);
- }
-
- // Calculate MAC
-
- var mac = Crypto.calculateMac('header', credentials, artifacts);
- if (!Cryptiles.fixedTimeComparison(mac, attributes.mac)) {
- return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, artifacts);
- }
-
- // Check payload hash
-
- if (options.payload ||
- options.payload === '') {
-
- if (!attributes.hash) {
- return callback(Boom.unauthorized('Missing required payload hash', 'Hawk'), credentials, artifacts);
- }
-
- var hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType);
- if (!Cryptiles.fixedTimeComparison(hash, attributes.hash)) {
- return callback(Boom.unauthorized('Bad payload hash', 'Hawk'), credentials, artifacts);
- }
- }
-
- // Check nonce
-
- options.nonceFunc(credentials.key, attributes.nonce, attributes.ts, function (err) {
-
- if (err) {
- return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials, artifacts);
- }
-
- // Check timestamp staleness
-
- if (Math.abs((attributes.ts * 1000) - now) > (options.timestampSkewSec * 1000)) {
- var tsm = Crypto.timestampMessage(credentials, options.localtimeOffsetMsec);
- return callback(Boom.unauthorized('Stale timestamp', 'Hawk', tsm), credentials, artifacts);
- }
-
- // Successful authentication
-
- return callback(null, credentials, artifacts);
- });
- });
-};
-
-
-// Authenticate payload hash - used when payload cannot be provided during authenticate()
-
-/*
- payload: raw request payload
- credentials: from authenticate callback
- artifacts: from authenticate callback
- contentType: req.headers['content-type']
-*/
-
-exports.authenticatePayload = function (payload, credentials, artifacts, contentType) {
-
- var calculatedHash = Crypto.calculatePayloadHash(payload, credentials.algorithm, contentType);
- return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash);
-};
-
-
-// Authenticate payload hash - used when payload cannot be provided during authenticate()
-
-/*
- calculatedHash: the payload hash calculated using Crypto.calculatePayloadHash()
- artifacts: from authenticate callback
-*/
-
-exports.authenticatePayloadHash = function (calculatedHash, artifacts) {
-
- return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash);
-};
-
-
-// Generate a Server-Authorization header for a given response
-
-/*
- credentials: {}, // Object received from authenticate()
- artifacts: {} // Object received from authenticate(); 'mac', 'hash', and 'ext' - ignored
- options: {
- ext: 'application-specific', // Application specific data sent via the ext attribute
- payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
- contentType: 'application/json', // Payload content-type (ignored if hash provided)
- hash: 'U4MKKSmiVxk37JCCrAVIjV=' // Pre-calculated payload hash
- }
-*/
-
-exports.header = function (credentials, artifacts, options) {
-
- // Prepare inputs
-
- options = options || {};
-
- if (!artifacts ||
- typeof artifacts !== 'object' ||
- typeof options !== 'object') {
-
- return '';
- }
-
- artifacts = Hoek.clone(artifacts);
- delete artifacts.mac;
- artifacts.hash = options.hash;
- artifacts.ext = options.ext;
-
- // Validate credentials
-
- if (!credentials ||
- !credentials.key ||
- !credentials.algorithm) {
-
- // Invalid credential object
- return '';
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return '';
- }
-
- // Calculate payload hash
-
- if (!artifacts.hash &&
- (options.payload || options.payload === '')) {
-
- artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- }
-
- var mac = Crypto.calculateMac('response', credentials, artifacts);
-
- // Construct header
-
- var header = 'Hawk mac="' + mac + '"' +
- (artifacts.hash ? ', hash="' + artifacts.hash + '"' : '');
-
- if (artifacts.ext !== null &&
- artifacts.ext !== undefined &&
- artifacts.ext !== '') { // Other falsey values allowed
-
- header += ', ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) + '"';
- }
-
- return header;
-};
-
-
-/*
- * Arguments and options are the same as authenticate() with the exception that the only supported options are:
- * 'hostHeaderName', 'localtimeOffsetMsec', 'host', 'port'
- */
-
-
-// 1 2 3 4
-internals.bewitRegex = /^(\/.*)([\?&])bewit\=([^&$]*)(?:&(.+))?$/;
-
-
-exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
-
- callback = Hoek.nextTick(callback);
-
- // Application time
-
- var now = Utils.now(options.localtimeOffsetMsec);
-
- // Convert node Http request object to a request configuration object
-
- var request = Utils.parseRequest(req, options);
- if (request instanceof Error) {
- return callback(Boom.badRequest(request.message));
- }
-
- // Extract bewit
-
- if (request.url.length > Utils.limits.maxMatchLength) {
- return callback(Boom.badRequest('Resource path exceeds max length'));
- }
-
- var resource = request.url.match(internals.bewitRegex);
- if (!resource) {
- return callback(Boom.unauthorized(null, 'Hawk'));
- }
-
- // Bewit not empty
-
- if (!resource[3]) {
- return callback(Boom.unauthorized('Empty bewit', 'Hawk'));
- }
-
- // Verify method is GET
-
- if (request.method !== 'GET' &&
- request.method !== 'HEAD') {
-
- return callback(Boom.unauthorized('Invalid method', 'Hawk'));
- }
-
- // No other authentication
-
- if (request.authorization) {
- return callback(Boom.badRequest('Multiple authentications'));
- }
-
- // Parse bewit
-
- var bewitString = Hoek.base64urlDecode(resource[3]);
- if (bewitString instanceof Error) {
- return callback(Boom.badRequest('Invalid bewit encoding'));
- }
-
- // Bewit format: id\exp\mac\ext ('\' is used because it is a reserved header attribute character)
-
- var bewitParts = bewitString.split('\\');
- if (bewitParts.length !== 4) {
- return callback(Boom.badRequest('Invalid bewit structure'));
- }
-
- var bewit = {
- id: bewitParts[0],
- exp: parseInt(bewitParts[1], 10),
- mac: bewitParts[2],
- ext: bewitParts[3] || ''
- };
-
- if (!bewit.id ||
- !bewit.exp ||
- !bewit.mac) {
-
- return callback(Boom.badRequest('Missing bewit attributes'));
- }
-
- // Construct URL without bewit
-
- var url = resource[1];
- if (resource[4]) {
- url += resource[2] + resource[4];
- }
-
- // Check expiration
-
- if (bewit.exp * 1000 <= now) {
- return callback(Boom.unauthorized('Access expired', 'Hawk'), null, bewit);
- }
-
- // Fetch Hawk credentials
-
- credentialsFunc(bewit.id, function (err, credentials) {
-
- if (err) {
- return callback(err, credentials || null, bewit.ext);
- }
-
- if (!credentials) {
- return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, bewit);
- }
-
- if (!credentials.key ||
- !credentials.algorithm) {
-
- return callback(Boom.internal('Invalid credentials'), credentials, bewit);
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return callback(Boom.internal('Unknown algorithm'), credentials, bewit);
- }
-
- // Calculate MAC
-
- var mac = Crypto.calculateMac('bewit', credentials, {
- ts: bewit.exp,
- nonce: '',
- method: 'GET',
- resource: url,
- host: request.host,
- port: request.port,
- ext: bewit.ext
- });
-
- if (!Cryptiles.fixedTimeComparison(mac, bewit.mac)) {
- return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, bewit);
- }
-
- // Successful authentication
-
- return callback(null, credentials, bewit);
- });
-};
-
-
-/*
- * options are the same as authenticate() with the exception that the only supported options are:
- * 'nonceFunc', 'timestampSkewSec', 'localtimeOffsetMsec'
- */
-
-exports.authenticateMessage = function (host, port, message, authorization, credentialsFunc, options, callback) {
-
- callback = Hoek.nextTick(callback);
-
- // Default options
-
- options.nonceFunc = options.nonceFunc || internals.nonceFunc;
- options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds
-
- // Application time
-
- var now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
-
- // Validate authorization
-
- if (!authorization.id ||
- !authorization.ts ||
- !authorization.nonce ||
- !authorization.hash ||
- !authorization.mac) {
-
- return callback(Boom.badRequest('Invalid authorization'));
- }
-
- // Fetch Hawk credentials
-
- credentialsFunc(authorization.id, function (err, credentials) {
-
- if (err) {
- return callback(err, credentials || null);
- }
-
- if (!credentials) {
- return callback(Boom.unauthorized('Unknown credentials', 'Hawk'));
- }
-
- if (!credentials.key ||
- !credentials.algorithm) {
-
- return callback(Boom.internal('Invalid credentials'), credentials);
- }
-
- if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return callback(Boom.internal('Unknown algorithm'), credentials);
- }
-
- // Construct artifacts container
-
- var artifacts = {
- ts: authorization.ts,
- nonce: authorization.nonce,
- host: host,
- port: port,
- hash: authorization.hash
- };
-
- // Calculate MAC
-
- var mac = Crypto.calculateMac('message', credentials, artifacts);
- if (!Cryptiles.fixedTimeComparison(mac, authorization.mac)) {
- return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials);
- }
-
- // Check payload hash
-
- var hash = Crypto.calculatePayloadHash(message, credentials.algorithm);
- if (!Cryptiles.fixedTimeComparison(hash, authorization.hash)) {
- return callback(Boom.unauthorized('Bad message hash', 'Hawk'), credentials);
- }
-
- // Check nonce
-
- options.nonceFunc(credentials.key, authorization.nonce, authorization.ts, function (err) {
-
- if (err) {
- return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials);
- }
-
- // Check timestamp staleness
-
- if (Math.abs((authorization.ts * 1000) - now) > (options.timestampSkewSec * 1000)) {
- return callback(Boom.unauthorized('Stale timestamp'), credentials);
- }
-
- // Successful authentication
-
- return callback(null, credentials);
- });
- });
-};
-
-
-internals.nonceFunc = function (key, nonce, ts, nonceCallback) {
-
- return nonceCallback(); // No validation
-};
diff --git a/node_modules/hawk/lib/utils.js b/node_modules/hawk/lib/utils.js
deleted file mode 100755
index 1df97c0e0..000000000
--- a/node_modules/hawk/lib/utils.js
+++ /dev/null
@@ -1,184 +0,0 @@
-// Load modules
-
-var Sntp = require('sntp');
-var Boom = require('boom');
-
-
-// Declare internals
-
-var internals = {};
-
-
-exports.version = function () {
-
- return require('../package.json').version;
-};
-
-
-exports.limits = {
- maxMatchLength: 4096 // Limit the length of uris and headers to avoid a DoS attack on string matching
-};
-
-
-// Extract host and port from request
-
-// $1 $2
-internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+))?(?:(?:\r\n)?\s)*$/; // (IPv4, hostname)|(IPv6)
-
-
-exports.parseHost = function (req, hostHeaderName) {
-
- hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host');
- var hostHeader = req.headers[hostHeaderName];
- if (!hostHeader) {
- return null;
- }
-
- if (hostHeader.length > exports.limits.maxMatchLength) {
- return null;
- }
-
- var hostParts = hostHeader.match(internals.hostHeaderRegex);
- if (!hostParts) {
- return null;
- }
-
- return {
- name: hostParts[1],
- port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80))
- };
-};
-
-
-// Parse Content-Type header content
-
-exports.parseContentType = function (header) {
-
- if (!header) {
- return '';
- }
-
- return header.split(';')[0].trim().toLowerCase();
-};
-
-
-// Convert node's to request configuration object
-
-exports.parseRequest = function (req, options) {
-
- if (!req.headers) {
- return req;
- }
-
- // Obtain host and port information
-
- var host;
- if (!options.host ||
- !options.port) {
-
- host = exports.parseHost(req, options.hostHeaderName);
- if (!host) {
- return new Error('Invalid Host header');
- }
- }
-
- var request = {
- method: req.method,
- url: req.url,
- host: options.host || host.name,
- port: options.port || host.port,
- authorization: req.headers.authorization,
- contentType: req.headers['content-type'] || ''
- };
-
- return request;
-};
-
-
-exports.now = function (localtimeOffsetMsec) {
-
- return Sntp.now() + (localtimeOffsetMsec || 0);
-};
-
-
-exports.nowSecs = function (localtimeOffsetMsec) {
-
- return Math.floor(exports.now(localtimeOffsetMsec) / 1000);
-};
-
-
-internals.authHeaderRegex = /^(\w+)(?:\s+(.*))?$/; // Header: scheme[ something]
-internals.attributeRegex = /^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/; // !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9
-
-
-// Parse Hawk HTTP Authorization header
-
-exports.parseAuthorizationHeader = function (header, keys) {
-
- keys = keys || ['id', 'ts', 'nonce', 'hash', 'ext', 'mac', 'app', 'dlg'];
-
- if (!header) {
- return Boom.unauthorized(null, 'Hawk');
- }
-
- if (header.length > exports.limits.maxMatchLength) {
- return Boom.badRequest('Header length too long');
- }
-
- var headerParts = header.match(internals.authHeaderRegex);
- if (!headerParts) {
- return Boom.badRequest('Invalid header syntax');
- }
-
- var scheme = headerParts[1];
- if (scheme.toLowerCase() !== 'hawk') {
- return Boom.unauthorized(null, 'Hawk');
- }
-
- var attributesString = headerParts[2];
- if (!attributesString) {
- return Boom.badRequest('Invalid header syntax');
- }
-
- var attributes = {};
- var errorMessage = '';
- var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) {
-
- // Check valid attribute names
-
- if (keys.indexOf($1) === -1) {
- errorMessage = 'Unknown attribute: ' + $1;
- return;
- }
-
- // Allowed attribute value characters
-
- if ($2.match(internals.attributeRegex) === null) {
- errorMessage = 'Bad attribute value: ' + $1;
- return;
- }
-
- // Check for duplicates
-
- if (attributes.hasOwnProperty($1)) {
- errorMessage = 'Duplicate attribute: ' + $1;
- return;
- }
-
- attributes[$1] = $2;
- return '';
- });
-
- if (verify !== '') {
- return Boom.badRequest(errorMessage || 'Bad header format');
- }
-
- return attributes;
-};
-
-
-exports.unauthorized = function (message, attributes) {
-
- return Boom.unauthorized(message, 'Hawk', attributes);
-};
-
diff --git a/node_modules/hawk/package.json b/node_modules/hawk/package.json
deleted file mode 100755
index b4f3718d0..000000000
--- a/node_modules/hawk/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "_from": "hawk@~3.1.3",
- "_id": "hawk@3.1.3",
- "_inBundle": false,
- "_integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
- "_location": "/hawk",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "hawk@~3.1.3",
- "name": "hawk",
- "escapedName": "hawk",
- "rawSpec": "~3.1.3",
- "saveSpec": null,
- "fetchSpec": "~3.1.3"
- },
- "_requiredBy": [
- "/request"
- ],
- "_resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
- "_shasum": "078444bd7c1640b0fe540d2c9b73d59678e8e1c4",
- "_spec": "hawk@~3.1.3",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
- "author": {
- "name": "Eran Hammer",
- "email": "eran@hammer.io",
- "url": "http://hueniverse.com"
- },
- "browser": "./lib/browser.js",
- "bugs": {
- "url": "https://github.com/hueniverse/hawk/issues"
- },
- "bundleDependencies": false,
- "contributors": [],
- "dependencies": {
- "boom": "2.x.x",
- "cryptiles": "2.x.x",
- "hoek": "2.x.x",
- "sntp": "1.x.x"
- },
- "deprecated": false,
- "description": "HTTP Hawk Authentication Scheme",
- "devDependencies": {
- "code": "1.x.x",
- "lab": "5.x.x"
- },
- "engines": {
- "node": ">=0.10.32"
- },
- "homepage": "https://github.com/hueniverse/hawk#readme",
- "keywords": [
- "http",
- "authentication",
- "scheme",
- "hawk"
- ],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
- "name": "hawk",
- "repository": {
- "type": "git",
- "url": "git://github.com/hueniverse/hawk.git"
- },
- "scripts": {
- "test": "lab -a code -t 100 -L",
- "test-cov-html": "lab -a code -r html -o coverage.html"
- },
- "version": "3.1.3"
-}
diff --git a/node_modules/hawk/test/browser.js b/node_modules/hawk/test/browser.js
deleted file mode 100755
index e18edf78a..000000000
--- a/node_modules/hawk/test/browser.js
+++ /dev/null
@@ -1,1492 +0,0 @@
-// Load modules
-
-var Url = require('url');
-var Code = require('code');
-var Hawk = require('../lib');
-var Hoek = require('hoek');
-var Lab = require('lab');
-var Browser = require('../lib/browser');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('Browser', function () {
-
- var credentialsFunc = function (id, callback) {
-
- var credentials = {
- id: id,
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: (id === '1' ? 'sha1' : 'sha256'),
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- it('should generate a bewit then successfully authenticate it', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?a=1&b=2',
- host: 'example.com',
- port: 80
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' });
- req.url += '&bewit=' + bewit;
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(attributes.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('should generate a bewit then successfully authenticate it (no ext)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?a=1&b=2',
- host: 'example.com',
- port: 80
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100 });
- req.url += '&bewit=' + bewit;
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- done();
- });
- });
- });
-
- describe('bewit()', function () {
-
- it('returns a valid bewit value', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
- done();
- });
-
- it('returns a valid bewit value (explicit HTTP port)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('http://example.com:8080/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcaFpiSjNQMmNLRW80a3kwQzhqa1pBa1J5Q1p1ZWc0V1NOYnhWN3ZxM3hIVT1ceGFuZHlhbmR6');
- done();
- });
-
- it('returns a valid bewit value (explicit HTTPS port)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('https://example.com:8043/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcL2t4UjhwK0xSaTdvQTRnUXc3cWlxa3BiVHRKYkR4OEtRMC9HRUwvVytTUT1ceGFuZHlhbmR6');
- done();
- });
-
- it('returns a valid bewit value (null ext)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: null });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcSUdZbUxnSXFMckNlOEN4dktQczRKbFdJQStValdKSm91d2dBUmlWaENBZz1c');
- done();
- });
-
- it('errors on invalid options', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', 4);
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on missing uri', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid uri', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit(5, { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid credentials (id)', function (done) {
-
- var credentials = {
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on missing credentials', function (done) {
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { ttlSec: 3000, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid credentials (key)', function (done) {
-
- var credentials = {
- id: '123456',
- algorithm: 'sha256'
- };
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid algorithm', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'hmac-sha-0'
- };
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on missing options', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'hmac-sha-0'
- };
-
- var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow');
- expect(bewit).to.equal('');
- done();
- });
- });
-
- it('generates a header then successfully parse it (configuration)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist();
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (node request)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (browserify)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- },
- getHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (time offset)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', localtimeOffsetMsec: 100000 }).field;
- expect(req.authorization).to.exist();
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (no server header options)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Browser.client.authenticate(res, credentials2, artifacts)).to.equal(true);
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (no server header)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- expect(Browser.client.authenticate(res, credentials2, artifacts)).to.equal(true);
- done();
- });
- });
- });
-
- it('generates a header with stale ts and successfully authenticate on second call', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- Browser.utils.setNtpOffset(60 * 60 * 1000);
- var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' });
- req.authorization = header.field;
- expect(req.authorization).to.exist();
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Stale timestamp');
-
- var res = {
- headers: {
- 'www-authenticate': err.output.headers['WWW-Authenticate']
- },
- getResponseHeader: function (lookup) {
-
- return res.headers[lookup.toLowerCase()];
- }
- };
-
- expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000);
- expect(Browser.client.authenticate(res, credentials2, header.artifacts)).to.equal(true);
- expect(Browser.utils.getNtpOffset()).to.equal(0);
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials2, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist();
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials3, artifacts3) {
-
- expect(err).to.not.exist();
- expect(credentials3.user).to.equal('steve');
- expect(artifacts3.ext).to.equal('some-app-data');
- done();
- });
- });
- });
- });
-
- it('generates a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var localStorage = new Browser.internals.LocalStorage();
-
- Browser.utils.setStorage(localStorage);
-
- Browser.utils.setNtpOffset(60 * 60 * 1000);
- var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' });
- req.authorization = header.field;
- expect(req.authorization).to.exist();
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Stale timestamp');
-
- var res = {
- headers: {
- 'www-authenticate': err.output.headers['WWW-Authenticate']
- },
- getResponseHeader: function (lookup) {
-
- return res.headers[lookup.toLowerCase()];
- }
- };
-
- expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000);
- expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000);
- expect(Browser.client.authenticate(res, credentials2, header.artifacts)).to.equal(true);
- expect(Browser.utils.getNtpOffset()).to.equal(0);
- expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(0);
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials2, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist();
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials3, artifacts3) {
-
- expect(err).to.not.exist();
- expect(credentials3.user).to.equal('steve');
- expect(artifacts3.ext).to.equal('some-app-data');
- done();
- });
- });
- });
- });
-
- it('generates a header then fails to parse it (missing server header hash)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(false);
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (with hash)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it then validate payload', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload('hola!', credentials2, artifacts)).to.be.true();
- expect(Hawk.server.authenticatePayload('hello!', credentials2, artifacts)).to.be.false();
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (app)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(artifacts.app).to.equal('asd23ased');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (app, dlg)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(artifacts.app).to.equal('asd23ased');
- expect(artifacts.dlg).to.equal('23434szr3q4d');
- done();
- });
- });
- });
-
- it('generates a header then fail authentication due to bad hash', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
- Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials2, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Bad payload hash');
- done();
- });
- });
- });
-
- it('generates a header for one resource then fail to authenticate another', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
- req.url = '/something/else';
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.exist();
- expect(credentials2).to.exist();
- done();
- });
- });
- });
-
- describe('client', function () {
-
- describe('header()', function () {
-
- it('returns a valid authorization header (sha1)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="');
- done();
- });
-
- it('returns a valid authorization header (sha256)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
- done();
- });
-
- it('returns a valid authorization header (empty payload)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: '' }).field;
- expect(header).to.equal('Hawk id=\"123456\", ts=\"1353809207\", nonce=\"Ygvqdz\", hash=\"404ghL7K+hfyhByKKejFBRGgTjU=\", ext=\"Bazinga!\", mac=\"Bh1sj1DOfFRWOdi3ww52nLCJdBE=\"');
- done();
- });
-
- it('returns a valid authorization header (no ext)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
- done();
- });
-
- it('returns a valid authorization header (null ext)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain', ext: null }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
- done();
- });
-
- it('returns a valid authorization header (uri object)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var uri = Browser.utils.parseUri('https://example.net/somewhere/over/the/rainbow');
- var header = Browser.client.header(uri, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
- done();
- });
-
- it('errors on missing options', function (done) {
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST');
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on empty uri', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on invalid uri', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header(4, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on missing method', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', '', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on invalid method', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 5, { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on missing credentials', function (done) {
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid credentials object');
- done();
- });
-
- it('errors on invalid credentials (id)', function (done) {
-
- var credentials = {
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid credentials object');
- done();
- });
-
- it('errors on invalid credentials (key)', function (done) {
-
- var credentials = {
- id: '123456',
- algorithm: 'sha256'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid credentials object');
- done();
- });
-
- it('errors on invalid algorithm', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'hmac-sha-0'
- };
-
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Unknown algorithm');
- done();
- });
-
- it('uses a pre-calculated payload hash', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var options = { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' };
- options.hash = Browser.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', options).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
- done();
- });
- });
-
- describe('authenticate()', function () {
-
- it('skips tsm validation when missing ts', function (done) {
-
- var res = {
- headers: {
- 'www-authenticate': 'Hawk error="Stale timestamp"'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var artifacts = {
- ts: 1402135580,
- nonce: 'iBRB6t',
- method: 'GET',
- resource: '/resource/4?filter=a',
- host: 'example.com',
- port: '8080',
- ext: 'some-app-data'
- };
-
- expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
- done();
- });
-
- it('returns false on invalid header', function (done) {
-
- var res = {
- headers: {
- 'server-authorization': 'Hawk mac="abc", bad="xyz"'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- expect(Browser.client.authenticate(res, {})).to.equal(false);
- done();
- });
-
- it('returns false on invalid mac', function (done) {
-
- var res = {
- headers: {
- 'content-type': 'text/plain',
- 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1362336900',
- nonce: 'eb5S_L',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- app: undefined,
- dlg: undefined,
- mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
- id: '123456'
- };
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(false);
- done();
- });
-
- it('returns true on ignoring hash', function (done) {
-
- var res = {
- headers: {
- 'content-type': 'text/plain',
- 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1362336900',
- nonce: 'eb5S_L',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- app: undefined,
- dlg: undefined,
- mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
- id: '123456'
- };
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
- done();
- });
-
- it('errors on invalid WWW-Authenticate header format', function (done) {
-
- var res = {
- headers: {
- 'www-authenticate': 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- expect(Browser.client.authenticate(res, {})).to.equal(false);
- done();
- });
-
- it('errors on invalid WWW-Authenticate header format', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var res = {
- headers: {
- 'www-authenticate': 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"'
- },
- getResponseHeader: function (header) {
-
- return res.headers[header.toLowerCase()];
- }
- };
-
- expect(Browser.client.authenticate(res, credentials)).to.equal(false);
- done();
- });
- });
-
- describe('message()', function () {
-
- it('generates an authorization then successfully parse it', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- done();
- });
- });
- });
-
- it('generates an authorization using custom nonce/timestamp', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials, nonce: 'abc123', timestamp: 1398536270957 });
- expect(auth).to.exist();
- expect(auth.nonce).to.equal('abc123');
- expect(auth.ts).to.equal(1398536270957);
- done();
- });
- });
-
- it('errors on missing host', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message(null, 8080, 'some message', { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on invalid host', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message(5, 8080, 'some message', { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on missing port', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message('example.com', 0, 'some message', { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on invalid port', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message('example.com', 'a', 'some message', { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on missing message', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message('example.com', 8080, undefined, { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on null message', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message('example.com', 8080, null, { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on invalid message', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Browser.client.message('example.com', 8080, 5, { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on missing credentials', function (done) {
-
- var auth = Browser.client.message('example.com', 8080, 'some message', {});
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on missing options', function (done) {
-
- var auth = Browser.client.message('example.com', 8080, 'some message');
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on invalid credentials (id)', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var creds = Hoek.clone(credentials);
- delete creds.id;
- var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on invalid credentials (key)', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var creds = Hoek.clone(credentials);
- delete creds.key;
- var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('errors on invalid algorithm', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var creds = Hoek.clone(credentials);
- creds.algorithm = 'blah';
- var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
- expect(auth).to.not.exist();
- done();
- });
- });
- });
-
- describe('authenticateTimestamp()', function (done) {
-
- it('validates a timestamp', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var tsm = Hawk.crypto.timestampMessage(credentials);
- expect(Browser.client.authenticateTimestamp(tsm, credentials)).to.equal(true);
- done();
- });
- });
-
- it('validates a timestamp without updating local time', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var offset = Browser.utils.getNtpOffset();
- var tsm = Hawk.crypto.timestampMessage(credentials, 10000);
- expect(Browser.client.authenticateTimestamp(tsm, credentials, false)).to.equal(true);
- expect(offset).to.equal(Browser.utils.getNtpOffset());
- done();
- });
- });
-
- it('detects a bad timestamp', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var tsm = Hawk.crypto.timestampMessage(credentials);
- tsm.ts = 4;
- expect(Browser.client.authenticateTimestamp(tsm, credentials)).to.equal(false);
- done();
- });
- });
- });
- });
-
- describe('internals', function () {
-
- describe('LocalStorage', function () {
-
- it('goes through the full lifecycle', function (done) {
-
- var storage = new Browser.internals.LocalStorage();
- expect(storage.length).to.equal(0);
- expect(storage.getItem('a')).to.equal(null);
- storage.setItem('a', 5);
- expect(storage.length).to.equal(1);
- expect(storage.key()).to.equal('a');
- expect(storage.key(0)).to.equal('a');
- expect(storage.getItem('a')).to.equal('5');
- storage.setItem('b', 'test');
- expect(storage.key()).to.equal('a');
- expect(storage.key(0)).to.equal('a');
- expect(storage.key(1)).to.equal('b');
- expect(storage.length).to.equal(2);
- expect(storage.getItem('b')).to.equal('test');
- storage.removeItem('a');
- expect(storage.length).to.equal(1);
- expect(storage.getItem('a')).to.equal(null);
- expect(storage.getItem('b')).to.equal('test');
- storage.clear();
- expect(storage.length).to.equal(0);
- expect(storage.getItem('a')).to.equal(null);
- expect(storage.getItem('b')).to.equal(null);
- done();
- });
- });
- });
-
- describe('utils', function () {
-
- describe('setStorage()', function () {
-
- it('sets storage for the first time', function (done) {
-
- Browser.utils.storage = new Browser.internals.LocalStorage(); // Reset state
-
- expect(Browser.utils.storage.getItem('hawk_ntp_offset')).to.not.exist();
- Browser.utils.storage.setItem('test', '1');
- Browser.utils.setStorage(new Browser.internals.LocalStorage());
- expect(Browser.utils.storage.getItem('test')).to.not.exist();
- Browser.utils.storage.setItem('test', '2');
- expect(Browser.utils.storage.getItem('test')).to.equal('2');
- done();
- });
- });
-
- describe('setNtpOffset()', function (done) {
-
- it('catches localStorage errors', { parallel: false }, function (done) {
-
- var orig = Browser.utils.storage.setItem;
- var consoleOrig = console.error;
- var count = 0;
- console.error = function () {
-
- if (count++ === 2) {
-
- console.error = consoleOrig;
- }
- };
-
- Browser.utils.storage.setItem = function () {
-
- Browser.utils.storage.setItem = orig;
- throw new Error();
- };
-
- expect(function () {
-
- Browser.utils.setNtpOffset(100);
- }).not.to.throw();
-
- done();
- });
- });
-
- describe('parseAuthorizationHeader()', function (done) {
-
- it('returns null on missing header', function (done) {
-
- expect(Browser.utils.parseAuthorizationHeader()).to.equal(null);
- done();
- });
-
- it('returns null on bad header syntax (structure)', function (done) {
-
- expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null);
- done();
- });
-
- it('returns null on bad header syntax (parts)', function (done) {
-
- expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null);
- done();
- });
-
- it('returns null on bad scheme name', function (done) {
-
- expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null);
- done();
- });
-
- it('returns null on bad attribute value', function (done) {
-
- expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null);
- done();
- });
-
- it('returns null on duplicated attribute', function (done) {
-
- expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null);
- done();
- });
- });
-
- describe('parseUri()', function () {
-
- it('returns empty object on invalid', function (done) {
-
- var uri = Browser.utils.parseUri('ftp');
- expect(uri).to.deep.equal({ host: '', port: '', resource: '' });
- done();
- });
-
- it('returns empty port when unknown scheme', function (done) {
-
- var uri = Browser.utils.parseUri('ftp://example.com');
- expect(uri.port).to.equal('');
- done();
- });
-
- it('returns default port when missing', function (done) {
-
- var uri = Browser.utils.parseUri('http://example.com');
- expect(uri.port).to.equal('80');
- done();
- });
-
- it('handles unusual characters correctly', function (done) {
-
- var parts = {
- protocol: 'http+vnd.my-extension',
- user: 'user!$&\'()*+,;=%40my-domain.com',
- password: 'pass!$&\'()*+,;=%40:word',
- hostname: 'foo-bar.com',
- port: '99',
- pathname: '/path/%40/!$&\'()*+,;=:@/',
- query: 'query%40/!$&\'()*+,;=:@/?',
- fragment: 'fragm%40/!$&\'()*+,;=:@/?'
- };
-
- parts.userInfo = parts.user + ':' + parts.password;
- parts.authority = parts.userInfo + '@' + parts.hostname + ':' + parts.port;
- parts.relative = parts.pathname + '?' + parts.query;
- parts.resource = parts.relative + '#' + parts.fragment;
- parts.source = parts.protocol + '://' + parts.authority + parts.resource;
-
- var uri = Browser.utils.parseUri(parts.source);
- expect(uri.host).to.equal('foo-bar.com');
- expect(uri.port).to.equal('99');
- expect(uri.resource).to.equal(parts.pathname + '?' + parts.query);
- done();
- });
- });
-
- var str = 'https://www.google.ca/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=url';
- var base64str = 'aHR0cHM6Ly93d3cuZ29vZ2xlLmNhL3dlYmhwP3NvdXJjZWlkPWNocm9tZS1pbnN0YW50Jmlvbj0xJmVzcHY9MiZpZT1VVEYtOCNxPXVybA';
-
- describe('base64urlEncode()', function () {
-
- it('should base64 URL-safe decode a string', function (done) {
-
- expect(Browser.utils.base64urlEncode(str)).to.equal(base64str);
- done();
- });
- });
- });
-});
diff --git a/node_modules/hawk/test/client.js b/node_modules/hawk/test/client.js
deleted file mode 100755
index d5ed1c609..000000000
--- a/node_modules/hawk/test/client.js
+++ /dev/null
@@ -1,440 +0,0 @@
-// Load modules
-
-var Url = require('url');
-var Code = require('code');
-var Hawk = require('../lib');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('Client', function () {
-
- describe('header()', function () {
-
- it('returns a valid authorization header (sha1)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var header = Hawk.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="');
- done();
- });
-
- it('returns a valid authorization header (sha256)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
- done();
- });
-
- it('returns a valid authorization header (no ext)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
- done();
- });
-
- it('returns a valid authorization header (null ext)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain', ext: null }).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
- done();
- });
-
- it('returns a valid authorization header (empty payload)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: '', contentType: 'text/plain' }).field;
- expect(header).to.equal('Hawk id=\"123456\", ts=\"1353809207\", nonce=\"Ygvqdz\", hash=\"q/t+NNAkQZNlq/aAD6PlexImwQTxwgT2MahfTa9XRLA=\", mac=\"U5k16YEzn3UnBHKeBzsDXn067Gu3R4YaY6xOt9PYRZM=\"');
- done();
- });
-
- it('returns a valid authorization header (pre hashed payload)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var options = { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' };
- options.hash = Hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', options).field;
- expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
- done();
- });
-
- it('errors on missing uri', function (done) {
-
- var header = Hawk.client.header('', 'POST');
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on invalid uri', function (done) {
-
- var header = Hawk.client.header(4, 'POST');
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on missing method', function (done) {
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', '');
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on invalid method', function (done) {
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 5);
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on missing options', function (done) {
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST');
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid argument type');
- done();
- });
-
- it('errors on invalid credentials (id)', function (done) {
-
- var credentials = {
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid credential object');
- done();
- });
-
- it('errors on missing credentials', function (done) {
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid credential object');
- done();
- });
-
- it('errors on invalid credentials', function (done) {
-
- var credentials = {
- id: '123456',
- algorithm: 'sha256'
- };
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Invalid credential object');
- done();
- });
-
- it('errors on invalid algorithm', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'hmac-sha-0'
- };
-
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 });
- expect(header.field).to.equal('');
- expect(header.err).to.equal('Unknown algorithm');
- done();
- });
- });
-
- describe('authenticate()', function () {
-
- it('returns false on invalid header', function (done) {
-
- var res = {
- headers: {
- 'server-authorization': 'Hawk mac="abc", bad="xyz"'
- }
- };
-
- expect(Hawk.client.authenticate(res, {})).to.equal(false);
- done();
- });
-
- it('returns false on invalid mac', function (done) {
-
- var res = {
- headers: {
- 'content-type': 'text/plain',
- 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
- }
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1362336900',
- nonce: 'eb5S_L',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- app: undefined,
- dlg: undefined,
- mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
- id: '123456'
- };
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(false);
- done();
- });
-
- it('returns true on ignoring hash', function (done) {
-
- var res = {
- headers: {
- 'content-type': 'text/plain',
- 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
- }
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1362336900',
- nonce: 'eb5S_L',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- app: undefined,
- dlg: undefined,
- mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
- id: '123456'
- };
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true);
- done();
- });
-
- it('fails on invalid WWW-Authenticate header format', function (done) {
-
- var header = 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"';
- expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(false);
- done();
- });
-
- it('fails on invalid WWW-Authenticate header format', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var header = 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"';
- expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, credentials)).to.equal(false);
- done();
- });
-
- it('skips tsm validation when missing ts', function (done) {
-
- var header = 'Hawk error="Stale timestamp"';
- expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(true);
- done();
- });
- });
-
- describe('message()', function () {
-
- it('generates authorization', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.exist();
- expect(auth.ts).to.equal(1353809207);
- expect(auth.nonce).to.equal('abc123');
- done();
- });
-
- it('errors on invalid host', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message(5, 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on invalid port', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', '80', 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on missing host', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 0, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on null message', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 80, null, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on missing message', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 80, undefined, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on invalid message', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 80, 5, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on missing options', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 80, 'I am the boodyman');
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on invalid credentials (id)', function (done) {
-
- var credentials = {
- key: '2983d45yun89q',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
-
- it('errors on invalid credentials (key)', function (done) {
-
- var credentials = {
- id: '123456',
- algorithm: 'sha1'
- };
-
- var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
- expect(auth).to.not.exist();
- done();
- });
- });
-});
diff --git a/node_modules/hawk/test/crypto.js b/node_modules/hawk/test/crypto.js
deleted file mode 100755
index a43753b24..000000000
--- a/node_modules/hawk/test/crypto.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// Load modules
-
-var Code = require('code');
-var Hawk = require('../lib');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('Crypto', function () {
-
- describe('generateNormalizedString()', function () {
-
- it('should return a valid normalized string', function (done) {
-
- expect(Hawk.crypto.generateNormalizedString('header', {
- ts: 1357747017,
- nonce: 'k3k4j5',
- method: 'GET',
- resource: '/resource/something',
- host: 'example.com',
- port: 8080
- })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\n\n');
-
- done();
- });
-
- it('should return a valid normalized string (ext)', function (done) {
-
- expect(Hawk.crypto.generateNormalizedString('header', {
- ts: 1357747017,
- nonce: 'k3k4j5',
- method: 'GET',
- resource: '/resource/something',
- host: 'example.com',
- port: 8080,
- ext: 'this is some app data'
- })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\nthis is some app data\n');
-
- done();
- });
-
- it('should return a valid normalized string (payload + ext)', function (done) {
-
- expect(Hawk.crypto.generateNormalizedString('header', {
- ts: 1357747017,
- nonce: 'k3k4j5',
- method: 'GET',
- resource: '/resource/something',
- host: 'example.com',
- port: 8080,
- hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=',
- ext: 'this is some app data'
- })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\nU4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=\nthis is some app data\n');
-
- done();
- });
- });
-});
diff --git a/node_modules/hawk/test/index.js b/node_modules/hawk/test/index.js
deleted file mode 100755
index 7d1f91969..000000000
--- a/node_modules/hawk/test/index.js
+++ /dev/null
@@ -1,378 +0,0 @@
-// Load modules
-
-var Url = require('url');
-var Code = require('code');
-var Hawk = require('../lib');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('Hawk', function () {
-
- var credentialsFunc = function (id, callback) {
-
- var credentials = {
- id: id,
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: (id === '1' ? 'sha1' : 'sha256'),
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- it('generates a header then successfully parse it (configuration)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header(Url.parse('http://example.com:8080/resource/4?filter=a'), req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist();
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (node request)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (absolute request uri)', function (done) {
-
- var req = {
- method: 'POST',
- url: 'http://example.com:8080/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (no server header options)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Hawk.client.authenticate(res, credentials2, artifacts)).to.equal(true);
- done();
- });
- });
- });
-
- it('generates a header then fails to parse it (missing server header hash)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:8080',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- var payload = 'some not so random text';
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
- req.headers.authorization = reqHeader.field;
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
-
- var res = {
- headers: {
- 'content-type': 'text/plain'
- }
- };
-
- res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
- expect(res.headers['server-authorization']).to.exist();
-
- expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(false);
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (with hash)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it then validate payload', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload('hola!', credentials2, artifacts)).to.be.true();
- expect(Hawk.server.authenticatePayload('hello!', credentials2, artifacts)).to.be.false();
- done();
- });
- });
- });
-
- it('generates a header then successfully parses and validates payload', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
- Hawk.server.authenticate(req, credentialsFunc, { payload: 'hola!' }, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (app)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(artifacts.app).to.equal('asd23ased');
- done();
- });
- });
- });
-
- it('generates a header then successfully parse it (app, dlg)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(artifacts.ext).to.equal('some-app-data');
- expect(artifacts.app).to.equal('asd23ased');
- expect(artifacts.dlg).to.equal('23434szr3q4d');
- done();
- });
- });
- });
-
- it('generates a header then fail authentication due to bad hash', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
- Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials2, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Bad payload hash');
- done();
- });
- });
- });
-
- it('generates a header for one resource then fail to authenticate another', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
- req.url = '/something/else';
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
-
- expect(err).to.exist();
- expect(credentials2).to.exist();
- done();
- });
- });
- });
-});
diff --git a/node_modules/hawk/test/readme.js b/node_modules/hawk/test/readme.js
deleted file mode 100755
index abc162445..000000000
--- a/node_modules/hawk/test/readme.js
+++ /dev/null
@@ -1,95 +0,0 @@
-// Load modules
-
-var Code = require('code');
-var Hawk = require('../lib');
-var Hoek = require('hoek');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('README', function () {
-
- describe('core', function () {
-
- var credentials = {
- id: 'dh37fgj492je',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256'
- };
-
- var options = {
- credentials: credentials,
- timestamp: 1353832234,
- nonce: 'j4h3g2',
- ext: 'some-app-ext-data'
- };
-
- it('should generate a header protocol example', function (done) {
-
- var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', options).field;
-
- expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="');
- done();
- });
-
- it('should generate a normalized string protocol example', function (done) {
-
- var normalized = Hawk.crypto.generateNormalizedString('header', {
- credentials: credentials,
- ts: options.timestamp,
- nonce: options.nonce,
- method: 'GET',
- resource: '/resource?a=1&b=2',
- host: 'example.com',
- port: 8000,
- ext: options.ext
- });
-
- expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nGET\n/resource?a=1&b=2\nexample.com\n8000\n\nsome-app-ext-data\n');
- done();
- });
-
- var payloadOptions = Hoek.clone(options);
- payloadOptions.payload = 'Thank you for flying Hawk';
- payloadOptions.contentType = 'text/plain';
-
- it('should generate a header protocol example (with payload)', function (done) {
-
- var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'POST', payloadOptions).field;
-
- expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="');
- done();
- });
-
- it('should generate a normalized string protocol example (with payload)', function (done) {
-
- var normalized = Hawk.crypto.generateNormalizedString('header', {
- credentials: credentials,
- ts: options.timestamp,
- nonce: options.nonce,
- method: 'POST',
- resource: '/resource?a=1&b=2',
- host: 'example.com',
- port: 8000,
- hash: Hawk.crypto.calculatePayloadHash(payloadOptions.payload, credentials.algorithm, payloadOptions.contentType),
- ext: options.ext
- });
-
- expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n');
- done();
- });
- });
-});
-
diff --git a/node_modules/hawk/test/server.js b/node_modules/hawk/test/server.js
deleted file mode 100755
index 8c54f0e30..000000000
--- a/node_modules/hawk/test/server.js
+++ /dev/null
@@ -1,1329 +0,0 @@
-// Load modules
-
-var Url = require('url');
-var Code = require('code');
-var Hawk = require('../lib');
-var Hoek = require('hoek');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('Server', function () {
-
- var credentialsFunc = function (id, callback) {
-
- var credentials = {
- id: id,
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: (id === '1' ? 'sha1' : 'sha256'),
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- describe('authenticate()', function () {
-
- it('parses a valid authentication header (sha1)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- done();
- });
- });
-
- it('parses a valid authentication header (sha256)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/1?b=1&a=2',
- host: 'example.com',
- port: 8000,
- authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- done();
- });
- });
-
- it('parses a valid authentication header (host override)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example1.com:8080',
- authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
- }
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- done();
- });
- });
-
- it('parses a valid authentication header (host port override)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example1.com:80',
- authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
- }
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', port: 8080, localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- done();
- });
- });
-
- it('parses a valid authentication header (POST with payload)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123456", ts="1357926341", nonce="1AwuJD", hash="qAiXIVv+yjDATneWxZP2YCTa9aHRgQdnH9b3Wc+o3dg=", ext="some-app-data", mac="UeYcj5UoTVaAWXNvJfLVia7kU3VabxCqrccXP8sUGC4="'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1357926341000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- done();
- });
- });
-
- it('errors on missing hash', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/1?b=1&a=2',
- host: 'example.com',
- port: 8000,
- authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { payload: 'body', localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Missing required payload hash');
- done();
- });
- });
-
- it('errors on a stale timestamp', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123456", ts="1362337299", nonce="UzmxSs", ext="some-app-data", mac="wnNUxchvvryMH2RxckTdZ/gY3ijzvccx4keVvELC61w="'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Stale timestamp');
- var header = err.output.headers['WWW-Authenticate'];
- var ts = header.match(/^Hawk ts\=\"(\d+)\"\, tsm\=\"([^\"]+)\"\, error=\"Stale timestamp\"$/);
- var now = Hawk.utils.now();
- expect(parseInt(ts[1], 10) * 1000).to.be.within(now - 1000, now + 1000);
-
- var res = {
- headers: {
- 'www-authenticate': header
- }
- };
-
- expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true);
- done();
- });
- });
-
- it('errors on a replay', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="bXx7a7p1h9QYQNZ8x7QhvDQym8ACgab4m3lVSFn4DBw=", ext="hello"'
- };
-
- var memoryCache = {};
- var options = {
- localtimeOffsetMsec: 1353788437000 - Hawk.utils.now(),
- nonceFunc: function (key, nonce, ts, callback) {
-
- if (memoryCache[key + nonce]) {
- return callback(new Error());
- }
-
- memoryCache[key + nonce] = true;
- return callback();
- }
- };
-
- Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials1, artifacts1) {
-
- expect(err).to.not.exist();
- expect(credentials1.user).to.equal('steve');
-
- Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials2, artifacts2) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid nonce');
- done();
- });
- });
- });
-
- it('does not error on nonce collision if keys differ', function (done) {
-
- var reqSteve = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="bXx7a7p1h9QYQNZ8x7QhvDQym8ACgab4m3lVSFn4DBw=", ext="hello"'
- };
-
- var reqBob = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="456", ts="1353788437", nonce="k3j4h2", mac="LXfmTnRzrLd9TD7yfH+4se46Bx6AHyhpM94hLCiNia4=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- var credentials = {
- '123': {
- id: id,
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: (id === '1' ? 'sha1' : 'sha256'),
- user: 'steve'
- },
- '456': {
- id: id,
- key: 'xrunpaw3489ruxnpa98w4rxnwerxhqb98rpaxn39848',
- algorithm: (id === '1' ? 'sha1' : 'sha256'),
- user: 'bob'
- }
- };
-
- return callback(null, credentials[id]);
- };
-
- var memoryCache = {};
- var options = {
- localtimeOffsetMsec: 1353788437000 - Hawk.utils.now(),
- nonceFunc: function (key, nonce, ts, callback) {
-
- if (memoryCache[key + nonce]) {
- return callback(new Error());
- }
-
- memoryCache[key + nonce] = true;
- return callback();
- }
- };
-
- Hawk.server.authenticate(reqSteve, credentialsFuncion, options, function (err, credentials1, artifacts1) {
-
- expect(err).to.not.exist();
- expect(credentials1.user).to.equal('steve');
-
- Hawk.server.authenticate(reqBob, credentialsFuncion, options, function (err, credentials2, artifacts2) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('bob');
- done();
- });
- });
- });
-
- it('errors on an invalid authentication header: wrong scheme', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Basic asdasdasdasd'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.not.exist();
- done();
- });
- });
-
- it('errors on an invalid authentication header: no scheme', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: '!@#'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid header syntax');
- done();
- });
- });
-
- it('errors on an missing authorization header', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.isMissing).to.equal(true);
- done();
- });
- });
-
- it('errors on an missing host header', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- headers: {
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- }
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid Host header');
- done();
- });
- });
-
- it('errors on an missing authorization attribute (id)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Missing attributes');
- done();
- });
- });
-
- it('errors on an missing authorization attribute (ts)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Missing attributes');
- done();
- });
- });
-
- it('errors on an missing authorization attribute (nonce)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Missing attributes');
- done();
- });
- });
-
- it('errors on an missing authorization attribute (mac)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Missing attributes');
- done();
- });
- });
-
- it('errors on an unknown authorization attribute', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", x="3", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Unknown attribute: x');
- done();
- });
- });
-
- it('errors on an bad authorization header format', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123\\", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Bad header format');
- done();
- });
- });
-
- it('errors on an bad authorization attribute value', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="\t", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Bad attribute value: id');
- done();
- });
- });
-
- it('errors on an empty authorization attribute value', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Bad attribute value: id');
- done();
- });
- });
-
- it('errors on duplicated authorization attribute key', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", id="456", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Duplicate attribute: id');
- done();
- });
- });
-
- it('errors on an invalid authorization header format', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk'
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid header syntax');
- done();
- });
- });
-
- it('errors on an bad host header (missing host)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- headers: {
- host: ':8080',
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- }
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid Host header');
- done();
- });
- });
-
- it('errors on an bad host header (pad port)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com:something',
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- }
- };
-
- Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid Host header');
- done();
- });
- });
-
- it('errors on credentialsFunc error', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- return callback(new Error('Unknown user'));
- };
-
- Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown user');
- done();
- });
- });
-
- it('errors on credentialsFunc error (with credentials)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- return callback(new Error('Unknown user'), { some: 'value' });
- };
-
- Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown user');
- expect(credentials.some).to.equal('value');
- done();
- });
- });
-
- it('errors on missing credentials', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- return callback(null, null);
- };
-
- Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Unknown credentials');
- done();
- });
- });
-
- it('errors on invalid credentials (id)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- var credentials = {
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid credentials');
- expect(err.output.payload.message).to.equal('An internal server error occurred');
- done();
- });
- });
-
- it('errors on invalid credentials (key)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- var credentials = {
- id: '23434d3q4d5345d',
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid credentials');
- expect(err.output.payload.message).to.equal('An internal server error occurred');
- done();
- });
- });
-
- it('errors on unknown credentials algorithm', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- var credentials = {
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'hmac-sha-0',
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown algorithm');
- expect(err.output.payload.message).to.equal('An internal server error occurred');
- done();
- });
- });
-
- it('errors on unknown bad mac', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcU4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
- };
-
- var credentialsFuncion = function (id, callback) {
-
- var credentials = {
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Bad mac');
- done();
- });
- });
- });
-
- describe('header()', function () {
-
- it('generates header', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1398546787',
- nonce: 'xUwusx',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
- id: '123456'
- };
-
- var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(header).to.equal('Hawk mac=\"n14wVJK4cOxAytPUMc5bPezQzuJGl5n7MYXhFQgEKsE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"');
- done();
- });
-
- it('generates header (empty payload)', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1398546787',
- nonce: 'xUwusx',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
- id: '123456'
- };
-
- var header = Hawk.server.header(credentials, artifacts, { payload: '', contentType: 'text/plain', ext: 'response-specific' });
- expect(header).to.equal('Hawk mac=\"i8/kUBDx0QF+PpCtW860kkV/fa9dbwEoe/FpGUXowf0=\", hash=\"q/t+NNAkQZNlq/aAD6PlexImwQTxwgT2MahfTa9XRLA=\", ext=\"response-specific\"');
- done();
- });
-
- it('generates header (pre calculated hash)', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1398546787',
- nonce: 'xUwusx',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
- id: '123456'
- };
-
- var options = { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' };
- options.hash = Hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- var header = Hawk.server.header(credentials, artifacts, options);
- expect(header).to.equal('Hawk mac=\"n14wVJK4cOxAytPUMc5bPezQzuJGl5n7MYXhFQgEKsE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"');
- done();
- });
-
- it('generates header (null ext)', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1398546787',
- nonce: 'xUwusx',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
- id: '123456'
- };
-
- var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: null });
- expect(header).to.equal('Hawk mac=\"6PrybJTJs20jsgBw5eilXpcytD8kUbaIKNYXL+6g0ns=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\"');
- done();
- });
-
- it('errors on missing artifacts', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var header = Hawk.server.header(credentials, null, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(header).to.equal('');
- done();
- });
-
- it('errors on invalid artifacts', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var header = Hawk.server.header(credentials, 5, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(header).to.equal('');
- done();
- });
-
- it('errors on missing credentials', function (done) {
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1398546787',
- nonce: 'xUwusx',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
- id: '123456'
- };
-
- var header = Hawk.server.header(null, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(header).to.equal('');
- done();
- });
-
- it('errors on invalid credentials (key)', function (done) {
-
- var credentials = {
- id: '123456',
- algorithm: 'sha256',
- user: 'steve'
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1398546787',
- nonce: 'xUwusx',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
- id: '123456'
- };
-
- var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(header).to.equal('');
- done();
- });
-
- it('errors on invalid algorithm', function (done) {
-
- var credentials = {
- id: '123456',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'x',
- user: 'steve'
- };
-
- var artifacts = {
- method: 'POST',
- host: 'example.com',
- port: '8080',
- resource: '/resource/4?filter=a',
- ts: '1398546787',
- nonce: 'xUwusx',
- hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
- ext: 'some-app-data',
- mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
- id: '123456'
- };
-
- var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(header).to.equal('');
- done();
- });
- });
-
- describe('authenticateBewit()', function () {
-
- it('errors on uri too long', function (done) {
-
- var long = '/';
- for (var i = 0; i < 5000; ++i) {
- long += 'x';
- }
-
- var req = {
- method: 'GET',
- url: long,
- host: 'example.com',
- port: 8080,
- authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
- };
-
- Hawk.server.authenticateBewit(req, credentialsFunc, {}, function (err, credentials, bewit) {
-
- expect(err).to.exist();
- expect(err.output.statusCode).to.equal(400);
- expect(err.message).to.equal('Resource path exceeds max length');
- done();
- });
- });
- });
-
- describe('authenticateMessage()', function () {
-
- it('errors on invalid authorization (ts)', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- delete auth.ts;
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid authorization');
- done();
- });
- });
- });
-
- it('errors on invalid authorization (nonce)', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- delete auth.nonce;
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid authorization');
- done();
- });
- });
- });
-
- it('errors on invalid authorization (hash)', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- delete auth.hash;
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid authorization');
- done();
- });
- });
- });
-
- it('errors with credentials', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, function (id, callback) {
-
- callback(new Error('something'), { some: 'value' });
- }, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('something');
- expect(credentials2.some).to.equal('value');
- done();
- });
- });
- });
-
- it('errors on nonce collision', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {
- nonceFunc: function (key, nonce, ts, nonceCallback) {
-
- nonceCallback(true);
- }
- }, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid nonce');
- done();
- });
- });
- });
-
- it('should generate an authorization then successfully parse it', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- done();
- });
- });
- });
-
- it('should fail authorization on mismatching host', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Bad mac');
- done();
- });
- });
- });
-
- it('should fail authorization on stale timestamp', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Stale timestamp');
- done();
- });
- });
- });
-
- it('overrides timestampSkewSec', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1, localtimeOffsetMsec: 100000 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { timestampSkewSec: 500 }, function (err, credentials2) {
-
- expect(err).to.not.exist();
- done();
- });
- });
- });
-
- it('should fail authorization on invalid authorization', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
- delete auth.id;
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid authorization');
- done();
- });
- });
- });
-
- it('should fail authorization on bad hash', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Bad message hash');
- done();
- });
- });
- });
-
- it('should fail authorization on nonce error', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {
- nonceFunc: function (key, nonce, ts, callback) {
-
- callback(new Error('kaboom'));
- }
- }, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid nonce');
- done();
- });
- });
- });
-
- it('should fail authorization on credentials error', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback(new Error('kablooey'));
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('kablooey');
- done();
- });
- });
- });
-
- it('should fail authorization on missing credentials', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback();
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown credentials');
- done();
- });
- });
- });
-
- it('should fail authorization on invalid credentials', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback(null, {});
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid credentials');
- done();
- });
- });
- });
-
- it('should fail authorization on invalid credentials algorithm', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback(null, { key: '123', algorithm: '456' });
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown algorithm');
- done();
- });
- });
- });
-
- it('should fail on missing host', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('should fail on missing credentials', function (done) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', {});
- expect(auth).to.not.exist();
- done();
- });
-
- it('should fail on invalid algorithm', function (done) {
-
- credentialsFunc('123456', function (err, credentials) {
-
- var creds = Hoek.clone(credentials);
- creds.algorithm = 'blah';
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds });
- expect(auth).to.not.exist();
- done();
- });
- });
- });
-
- describe('authenticatePayloadHash()', function () {
-
- it('checks payload hash', function (done) {
-
- expect(Hawk.server.authenticatePayloadHash('abcdefg', { hash: 'abcdefg' })).to.equal(true);
- expect(Hawk.server.authenticatePayloadHash('1234567', { hash: 'abcdefg' })).to.equal(false);
- done();
- });
- });
-});
-
diff --git a/node_modules/hawk/test/uri.js b/node_modules/hawk/test/uri.js
deleted file mode 100755
index dee7c6432..000000000
--- a/node_modules/hawk/test/uri.js
+++ /dev/null
@@ -1,838 +0,0 @@
-// Load modules
-
-var Http = require('http');
-var Url = require('url');
-var Code = require('code');
-var Hawk = require('../lib');
-var Hoek = require('hoek');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('Uri', function () {
-
- var credentialsFunc = function (id, callback) {
-
- var credentials = {
- id: id,
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: (id === '1' ? 'sha1' : 'sha256'),
- user: 'steve'
- };
-
- return callback(null, credentials);
- };
-
- it('should generate a bewit then successfully authenticate it', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?a=1&b=2',
- host: 'example.com',
- port: 80
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' });
- req.url += '&bewit=' + bewit;
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- expect(attributes.ext).to.equal('some-app-data');
- done();
- });
- });
- });
-
- it('should generate a bewit then successfully authenticate it (no ext)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?a=1&b=2',
- host: 'example.com',
- port: 80
- };
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100 });
- req.url += '&bewit=' + bewit;
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- done();
- });
- });
- });
-
- it('should successfully authenticate a request (last param)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- expect(attributes.ext).to.equal('some-app-data');
- done();
- });
- });
-
- it('should successfully authenticate a request (first param)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ&a=1&b=2',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- expect(attributes.ext).to.equal('some-app-data');
- done();
- });
- });
-
- it('should successfully authenticate a request (only param)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.not.exist();
- expect(credentials.user).to.equal('steve');
- expect(attributes.ext).to.equal('some-app-data');
- done();
- });
- });
-
- it('should fail on multiple authentication', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080,
- authorization: 'Basic asdasdasdasd'
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Multiple authentications');
- done();
- });
- });
-
- it('should fail on method other than GET', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- host: 'example.com',
- port: 8080
- };
-
- var exp = Math.floor(Hawk.utils.now() / 1000) + 60;
- var ext = 'some-app-data';
- var mac = Hawk.crypto.calculateMac('bewit', credentials1, {
- timestamp: exp,
- nonce: '',
- method: req.method,
- resource: req.url,
- host: req.host,
- port: req.port,
- ext: ext
- });
-
- var bewit = credentials1.id + '\\' + exp + '\\' + mac + '\\' + ext;
-
- req.url += '&bewit=' + Hoek.base64urlEncode(bewit);
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid method');
- done();
- });
- });
- });
-
- it('should fail on invalid host header', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
- headers: {
- host: 'example.com:something'
- }
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid Host header');
- done();
- });
- });
-
- it('should fail on empty bewit', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Empty bewit');
- expect(err.isMissing).to.not.exist();
- done();
- });
- });
-
- it('should fail on invalid bewit', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=*',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid bewit encoding');
- expect(err.isMissing).to.not.exist();
- done();
- });
- });
-
- it('should fail on missing bewit', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.not.exist();
- expect(err.isMissing).to.equal(true);
- done();
- });
- });
-
- it('should fail on invalid bewit structure', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=abc',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Invalid bewit structure');
- done();
- });
- });
-
- it('should fail on empty bewit attribute', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=YVxcY1xk',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Missing bewit attributes');
- done();
- });
- });
-
- it('should fail on missing bewit id attribute', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=XDQ1NTIxNDc2MjJcK0JFbFhQMXhuWjcvd1Nrbm1ldGhlZm5vUTNHVjZNSlFVRHk4NWpTZVJ4VT1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Missing bewit attributes');
- done();
- });
- });
-
- it('should fail on expired access', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDEzNTY0MTg1ODNcWk1wZlMwWU5KNHV0WHpOMmRucTRydEk3NXNXTjFjeWVITTcrL0tNZFdVQT1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Access expired');
- done();
- });
- });
-
- it('should fail on credentials function error', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, function (id, callback) {
-
- callback(Hawk.error.badRequest('Boom'));
- }, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Boom');
- done();
- });
- });
-
- it('should fail on credentials function error with credentials', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, function (id, callback) {
-
- callback(Hawk.error.badRequest('Boom'), { some: 'value' });
- }, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Boom');
- expect(credentials.some).to.equal('value');
- done();
- });
- });
-
- it('should fail on null credentials function response', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, function (id, callback) {
-
- callback(null, null);
- }, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Unknown credentials');
- done();
- });
- });
-
- it('should fail on invalid credentials function response', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, function (id, callback) {
-
- callback(null, {});
- }, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid credentials');
- done();
- });
- });
-
- it('should fail on invalid credentials function response (unknown algorithm)', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, function (id, callback) {
-
- callback(null, { key: 'xxx', algorithm: 'xxx' });
- }, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown algorithm');
- done();
- });
- });
-
- it('should fail on expired access', function (done) {
-
- var req = {
- method: 'GET',
- url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
- host: 'example.com',
- port: 8080
- };
-
- Hawk.uri.authenticate(req, function (id, callback) {
-
- callback(null, { key: 'xxx', algorithm: 'sha256' });
- }, {}, function (err, credentials, attributes) {
-
- expect(err).to.exist();
- expect(err.output.payload.message).to.equal('Bad mac');
- done();
- });
- });
-
- describe('getBewit()', function () {
-
- it('returns a valid bewit value', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
- done();
- });
-
- it('returns a valid bewit value (explicit port)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com:8080/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcaFpiSjNQMmNLRW80a3kwQzhqa1pBa1J5Q1p1ZWc0V1NOYnhWN3ZxM3hIVT1ceGFuZHlhbmR6');
- done();
- });
-
- it('returns a valid bewit value (null ext)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: null });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcSUdZbUxnSXFMckNlOEN4dktQczRKbFdJQStValdKSm91d2dBUmlWaENBZz1c');
- done();
- });
-
- it('returns a valid bewit value (parsed uri)', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit(Url.parse('https://example.com/somewhere/over/the/rainbow'), { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
- done();
- });
-
- it('errors on invalid options', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', 4);
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on missing uri', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit('', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid uri', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit(5, { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid credentials (id)', function (done) {
-
- var credentials = {
- key: '2983d45yun89q',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on missing credentials', function (done) {
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { ttlSec: 3000, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid credentials (key)', function (done) {
-
- var credentials = {
- id: '123456',
- algorithm: 'sha256'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on invalid algorithm', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'hmac-sha-0'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' });
- expect(bewit).to.equal('');
- done();
- });
-
- it('errors on missing options', function (done) {
-
- var credentials = {
- id: '123456',
- key: '2983d45yun89q',
- algorithm: 'hmac-sha-0'
- };
-
- var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow');
- expect(bewit).to.equal('');
- done();
- });
- });
-
- describe('authenticateMessage()', function () {
-
- it('should generate an authorization then successfully parse it', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.not.exist();
- expect(credentials2.user).to.equal('steve');
- done();
- });
- });
- });
-
- it('should fail authorization on mismatching host', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Bad mac');
- done();
- });
- });
- });
-
- it('should fail authorization on stale timestamp', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Stale timestamp');
- done();
- });
- });
- });
-
- it('overrides timestampSkewSec', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1, localtimeOffsetMsec: 100000 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { timestampSkewSec: 500 }, function (err, credentials2) {
-
- expect(err).to.not.exist();
- done();
- });
- });
- });
-
- it('should fail authorization on invalid authorization', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
- delete auth.id;
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid authorization');
- done();
- });
- });
- });
-
- it('should fail authorization on bad hash', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Bad message hash');
- done();
- });
- });
- });
-
- it('should fail authorization on nonce error', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {
- nonceFunc: function (key, nonce, ts, callback) {
-
- callback(new Error('kaboom'));
- }
- }, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid nonce');
- done();
- });
- });
- });
-
- it('should fail authorization on credentials error', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback(new Error('kablooey'));
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('kablooey');
- done();
- });
- });
- });
-
- it('should fail authorization on missing credentials', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback();
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown credentials');
- done();
- });
- });
- });
-
- it('should fail authorization on invalid credentials', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback(null, {});
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Invalid credentials');
- done();
- });
- });
- });
-
- it('should fail authorization on invalid credentials algorithm', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.exist();
-
- var errFunc = function (id, callback) {
-
- callback(null, { key: '123', algorithm: '456' });
- };
-
- Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
-
- expect(err).to.exist();
- expect(err.message).to.equal('Unknown algorithm');
- done();
- });
- });
- });
-
- it('should fail on missing host', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials1 });
- expect(auth).to.not.exist();
- done();
- });
- });
-
- it('should fail on missing credentials', function (done) {
-
- var auth = Hawk.client.message('example.com', 8080, 'some message', {});
- expect(auth).to.not.exist();
- done();
- });
-
- it('should fail on invalid algorithm', function (done) {
-
- credentialsFunc('123456', function (err, credentials1) {
-
- var creds = Hoek.clone(credentials1);
- creds.algorithm = 'blah';
- var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds });
- expect(auth).to.not.exist();
- done();
- });
- });
- });
-});
-
diff --git a/node_modules/hawk/test/utils.js b/node_modules/hawk/test/utils.js
deleted file mode 100755
index ccfcd412a..000000000
--- a/node_modules/hawk/test/utils.js
+++ /dev/null
@@ -1,149 +0,0 @@
-// Load modules
-
-var Code = require('code');
-var Hawk = require('../lib');
-var Lab = require('lab');
-var Package = require('../package.json');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('Utils', function () {
-
- describe('parseHost()', function () {
-
- it('returns port 80 for non tls node request', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com',
- 'content-type': 'text/plain;x=y'
- }
- };
-
- expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(80);
- done();
- });
-
- it('returns port 443 for non tls node request', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: 'example.com',
- 'content-type': 'text/plain;x=y'
- },
- connection: {
- encrypted: true
- }
- };
-
- expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443);
- done();
- });
-
- it('returns port 443 for non tls node request (IPv6)', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: '[123:123:123]',
- 'content-type': 'text/plain;x=y'
- },
- connection: {
- encrypted: true
- }
- };
-
- expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443);
- done();
- });
-
- it('parses IPv6 headers', function (done) {
-
- var req = {
- method: 'POST',
- url: '/resource/4?filter=a',
- headers: {
- host: '[123:123:123]:8000',
- 'content-type': 'text/plain;x=y'
- },
- connection: {
- encrypted: true
- }
- };
-
- var host = Hawk.utils.parseHost(req, 'Host');
- expect(host.port).to.equal('8000');
- expect(host.name).to.equal('[123:123:123]');
- done();
- });
-
- it('errors on header too long', function (done) {
-
- var long = '';
- for (var i = 0; i < 5000; ++i) {
- long += 'x';
- }
-
- expect(Hawk.utils.parseHost({ headers: { host: long } })).to.be.null();
- done();
- });
- });
-
- describe('parseAuthorizationHeader()', function () {
-
- it('errors on header too long', function (done) {
-
- var long = 'Scheme a="';
- for (var i = 0; i < 5000; ++i) {
- long += 'x';
- }
- long += '"';
-
- var err = Hawk.utils.parseAuthorizationHeader(long, ['a']);
- expect(err).to.be.instanceof(Error);
- expect(err.message).to.equal('Header length too long');
- done();
- });
- });
-
- describe('version()', function () {
-
- it('returns the correct package version number', function (done) {
-
- expect(Hawk.utils.version()).to.equal(Package.version);
- done();
- });
- });
-
- describe('unauthorized()', function () {
-
- it('returns a hawk 401', function (done) {
-
- expect(Hawk.utils.unauthorized('kaboom').output.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"');
- done();
- });
-
- it('supports attributes', function (done) {
-
- expect(Hawk.utils.unauthorized('kaboom', { a: 'b' }).output.headers['WWW-Authenticate']).to.equal('Hawk a="b", error="kaboom"');
- done();
- });
- });
-});
diff --git a/node_modules/hoek/.npmignore b/node_modules/hoek/.npmignore
deleted file mode 100644
index 7e1574dc5..000000000
--- a/node_modules/hoek/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-complexity.md
diff --git a/node_modules/hoek/.travis.yml b/node_modules/hoek/.travis.yml
deleted file mode 100644
index 7a64dd221..000000000
--- a/node_modules/hoek/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
- - 4.0
-
-sudo: false
diff --git a/node_modules/hoek/CONTRIBUTING.md b/node_modules/hoek/CONTRIBUTING.md
deleted file mode 100644
index 892836159..000000000
--- a/node_modules/hoek/CONTRIBUTING.md
+++ /dev/null
@@ -1 +0,0 @@
-Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/node_modules/hoek/LICENSE b/node_modules/hoek/LICENSE
deleted file mode 100644
index 553090425..000000000
--- a/node_modules/hoek/LICENSE
+++ /dev/null
@@ -1,31 +0,0 @@
-Copyright (c) 2011-2014, Walmart and other contributors.
-Copyright (c) 2011, Yahoo Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hapijs/hapi/graphs/contributors
-Portions of this project were initially based on the Yahoo! Inc. Postmile project,
-published at https://github.com/yahoo/postmile.
diff --git a/node_modules/hoek/README.md b/node_modules/hoek/README.md
deleted file mode 100644
index 92c4912c7..000000000
--- a/node_modules/hoek/README.md
+++ /dev/null
@@ -1,584 +0,0 @@
-![hoek Logo](https://raw.github.com/hapijs/hoek/master/images/hoek.png)
-
-Utility methods for the hapi ecosystem. This module is not intended to solve every problem for everyone, but rather as a central place to store hapi-specific methods. If you're looking for a general purpose utility module, check out [lodash](https://github.com/lodash/lodash) or [underscore](https://github.com/jashkenas/underscore).
-
-[![Build Status](https://secure.travis-ci.org/hapijs/hoek.svg)](http://travis-ci.org/hapijs/hoek)
-
-Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
-
-# Table of Contents
-
-* [Introduction](#introduction "Introduction")
-* [Object](#object "Object")
- * [clone](#cloneobj "clone")
- * [cloneWithShallow](#clonewithshallowobj-keys "cloneWithShallow")
- * [merge](#mergetarget-source-isnulloverride-ismergearrays "merge")
- * [applyToDefaults](#applytodefaultsdefaults-options-isnulloverride "applyToDefaults")
- * [applyToDefaultsWithShallow](#applytodefaultswithshallowdefaults-options-keys "applyToDefaultsWithShallow")
- * [deepEqual](#deepequala-b "deepEqual")
- * [unique](#uniquearray-key "unique")
- * [mapToObject](#maptoobjectarray-key "mapToObject")
- * [intersect](#intersectarray1-array2 "intersect")
- * [contain](#containref-values-options "contain")
- * [flatten](#flattenarray-target "flatten")
- * [reach](#reachobj-chain-options "reach")
- * [reachTemplate](#reachtemplateobj-template-options "reachTemplate")
- * [transform](#transformobj-transform-options "transform")
- * [shallow](#shallowobj "shallow")
- * [stringify](#stringifyobj "stringify")
-* [Timer](#timer "Timer")
-* [Bench](#bench "Bench")
-* [Binary Encoding/Decoding](#binary-encodingdecoding "Binary Encoding/Decoding")
- * [base64urlEncode](#base64urlencodevalue "binary64urlEncode")
- * [base64urlDecode](#base64urldecodevalue "binary64urlDecode")
-* [Escaping Characters](#escaping-characters "Escaping Characters")
- * [escapeHtml](#escapehtmlstring "escapeHtml")
- * [escapeHeaderAttribute](#escapeheaderattributeattribute "escapeHeaderAttribute")
- * [escapeRegex](#escaperegexstring "escapeRegex")
-* [Errors](#errors "Errors")
- * [assert](#assertcondition-message "assert")
- * [abort](#abortmessage "abort")
- * [displayStack](#displaystackslice "displayStack")
- * [callStack](#callstackslice "callStack")
-* [Function](#function "Function")
- * [nextTick](#nexttickfn "nextTick")
- * [once](#oncefn "once")
- * [ignore](#ignore "ignore")
-* [Miscellaneous](#miscellaneous "Miscellaneous")
- * [uniqueFilename](#uniquefilenamepath-extension "uniqueFilename")
- * [isAbsolutePath](#isabsolutepathpath-platform "isAbsolutePath")
- * [isInteger](#isintegervalue "isInteger")
-
-
-
-# Introduction
-
-The *Hoek* library contains some common functions used within the hapi ecosystem. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more.
-
-For example, to use Hoek to set configuration with default options:
-```javascript
-var Hoek = require('hoek');
-
-var default = {url : "www.github.com", port : "8000", debug : true};
-
-var config = Hoek.applyToDefaults(default, {port : "3000", admin : true});
-
-// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }
-```
-
-Under each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the `var Hoek = require('hoek');` is omitted for brevity.
-
-## Object
-
-Hoek provides several helpful methods for objects and arrays.
-
-### clone(obj)
-
-This method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects, as well as non-enumerable properties).
-
-```javascript
-
-var nestedObj = {
- w: /^something$/ig,
- x: {
- a: [1, 2, 3],
- b: 123456,
- c: new Date()
- },
- y: 'y',
- z: new Date()
- };
-
-var copy = Hoek.clone(nestedObj);
-
-copy.x.b = 100;
-
-console.log(copy.y); // results in 'y'
-console.log(nestedObj.x.b); // results in 123456
-console.log(copy.x.b); // results in 100
-```
-
-### cloneWithShallow(obj, keys)
-keys is an array of key names to shallow copy
-
-This method is also used to clone an object or array, however any keys listed in the `keys` array are shallow copied while those not listed are deep copied.
-
-```javascript
-
-var nestedObj = {
- w: /^something$/ig,
- x: {
- a: [1, 2, 3],
- b: 123456,
- c: new Date()
- },
- y: 'y',
- z: new Date()
- };
-
-var copy = Hoek.cloneWithShallow(nestedObj, ['x']);
-
-copy.x.b = 100;
-
-console.log(copy.y); // results in 'y'
-console.log(nestedObj.x.b); // results in 100
-console.log(copy.x.b); // results in 100
-```
-
-### merge(target, source, isNullOverride, isMergeArrays)
-isNullOverride, isMergeArrays default to true
-
-Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied.
-Merge is destructive where the target is modified. For non destructive merge, use `applyToDefaults`.
-
-
-```javascript
-
-var target = {a: 1, b : 2};
-var source = {a: 0, c: 5};
-var source2 = {a: null, c: 5};
-
-Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}
-Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}
-Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}
-
-var targetArray = [1, 2, 3];
-var sourceArray = [4, 5];
-
-Hoek.merge(targetArray, sourceArray); // results in [1, 2, 3, 4, 5]
-Hoek.merge(targetArray, sourceArray, true, false); // results in [4, 5]
-```
-
-### applyToDefaults(defaults, options, isNullOverride)
-isNullOverride defaults to false
-
-Apply options to a copy of the defaults
-
-```javascript
-
-var defaults = { host: "localhost", port: 8000 };
-var options = { port: 8080 };
-
-var config = Hoek.applyToDefaults(defaults, options); // results in { host: "localhost", port: 8080 }
-```
-
-Apply options with a null value to a copy of the defaults
-
-```javascript
-
-var defaults = { host: "localhost", port: 8000 };
-var options = { host: null, port: 8080 };
-
-var config = Hoek.applyToDefaults(defaults, options, true); // results in { host: null, port: 8080 }
-```
-
-### applyToDefaultsWithShallow(defaults, options, keys)
-keys is an array of key names to shallow copy
-
-Apply options to a copy of the defaults. Keys specified in the last parameter are shallow copied from options instead of merged.
-
-```javascript
-
-var defaults = {
- server: {
- host: "localhost",
- port: 8000
- },
- name: 'example'
- };
-
-var options = { server: { port: 8080 } };
-
-var config = Hoek.applyToDefaultsWithShallow(defaults, options, ['server']); // results in { server: { port: 8080 }, name: 'example' }
-```
-
-### deepEqual(b, a, [options])
-
-Performs a deep comparison of the two values including support for circular dependencies, prototype, and properties. To skip prototype comparisons, use `options.prototype = false`
-
-```javascript
-Hoek.deepEqual({ a: [1, 2], b: 'string', c: { d: true } }, { a: [1, 2], b: 'string', c: { d: true } }); //results in true
-Hoek.deepEqual(Object.create(null), {}, { prototype: false }); //results in true
-Hoek.deepEqual(Object.create(null), {}); //results in false
-```
-
-### unique(array, key)
-
-Remove duplicate items from Array
-
-```javascript
-
-var array = [1, 2, 2, 3, 3, 4, 5, 6];
-
-var newArray = Hoek.unique(array); // results in [1,2,3,4,5,6]
-
-array = [{id: 1}, {id: 1}, {id: 2}];
-
-newArray = Hoek.unique(array, "id"); // results in [{id: 1}, {id: 2}]
-```
-
-### mapToObject(array, key)
-
-Convert an Array into an Object
-
-```javascript
-
-var array = [1,2,3];
-var newObject = Hoek.mapToObject(array); // results in [{"1": true}, {"2": true}, {"3": true}]
-
-array = [{id: 1}, {id: 2}];
-newObject = Hoek.mapToObject(array, "id"); // results in [{"id": 1}, {"id": 2}]
-```
-
-### intersect(array1, array2)
-
-Find the common unique items in two arrays
-
-```javascript
-
-var array1 = [1, 2, 3];
-var array2 = [1, 4, 5];
-
-var newArray = Hoek.intersect(array1, array2); // results in [1]
-```
-
-### contain(ref, values, [options])
-
-Tests if the reference value contains the provided values where:
-- `ref` - the reference string, array, or object.
-- `values` - a single or array of values to find within the `ref` value. If `ref` is an object, `values` can be a key name,
- an array of key names, or an object with key-value pairs to compare.
-- `options` - an optional object with the following optional settings:
- - `deep` - if `true`, performed a deep comparison of the values.
- - `once` - if `true`, allows only one occurrence of each value.
- - `only` - if `true`, does not allow values not explicitly listed.
- - `part` - if `true`, allows partial match of the values (at least one must always match).
-
-Note: comparing a string to overlapping values will result in failed comparison (e.g. `contain('abc', ['ab', 'bc'])`).
-Also, if an object key's value does not match the provided value, `false` is returned even when `part` is specified.
-
-```javascript
-Hoek.contain('aaa', 'a', { only: true }); // true
-Hoek.contain([{ a: 1 }], [{ a: 1 }], { deep: true }); // true
-Hoek.contain([1, 2, 2], [1, 2], { once: true }); // false
-Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 }, { part: true }); // true
-```
-
-### flatten(array, [target])
-
-Flatten an array
-
-```javascript
-
-var array = [1, [2, 3]];
-
-var flattenedArray = Hoek.flatten(array); // results in [1, 2, 3]
-
-array = [1, [2, 3]];
-target = [4, [5]];
-
-flattenedArray = Hoek.flatten(array, target); // results in [4, [5], 1, 2, 3]
-```
-
-### reach(obj, chain, [options])
-
-Converts an object key chain string to reference
-
-- `options` - optional settings
- - `separator` - string to split chain path on, defaults to '.'
- - `default` - value to return if the path or value is not present, default is `undefined`
- - `strict` - if `true`, will throw an error on missing member, default is `false`
- - `functions` - if `true` allow traversing functions for properties. `false` will throw an error if a function is part of the chain.
-
-A chain including negative numbers will work like negative indices on an
-array.
-
-If chain is `null`, `undefined` or `false`, the object itself will be returned.
-
-```javascript
-
-var chain = 'a.b.c';
-var obj = {a : {b : { c : 1}}};
-
-Hoek.reach(obj, chain); // returns 1
-
-var chain = 'a.b.-1';
-var obj = {a : {b : [2,3,6]}};
-
-Hoek.reach(obj, chain); // returns 6
-```
-
-### reachTemplate(obj, template, [options])
-
-Replaces string parameters (`{name}`) with their corresponding object key values by applying the
-(`reach()`)[#reachobj-chain-options] method where:
-
-- `obj` - the context object used for key lookup.
-- `template` - a string containing `{}` parameters.
-- `options` - optional (`reach()`)[#reachobj-chain-options] options.
-
-```javascript
-
-var chain = 'a.b.c';
-var obj = {a : {b : { c : 1}}};
-
-Hoek.reachTemplate(obj, '1+{a.b.c}=2'); // returns '1+1=2'
-```
-
-### transform(obj, transform, [options])
-
-Transforms an existing object into a new one based on the supplied `obj` and `transform` map. `options` are the same as the `reach` options. The first argument can also be an array of objects. In that case the method will return an array of transformed objects.
-
-```javascript
-var source = {
- address: {
- one: '123 main street',
- two: 'PO Box 1234'
- },
- title: 'Warehouse',
- state: 'CA'
-};
-
-var result = Hoek.transform(source, {
- 'person.address.lineOne': 'address.one',
- 'person.address.lineTwo': 'address.two',
- 'title': 'title',
- 'person.address.region': 'state'
-});
-// Results in
-// {
-// person: {
-// address: {
-// lineOne: '123 main street',
-// lineTwo: 'PO Box 1234',
-// region: 'CA'
-// }
-// },
-// title: 'Warehouse'
-// }
-```
-
-### shallow(obj)
-
-Performs a shallow copy by copying the references of all the top level children where:
-- `obj` - the object to be copied.
-
-```javascript
-var shallow = Hoek.shallow({ a: { b: 1 } });
-```
-
-### stringify(obj)
-
-Converts an object to string using the built-in `JSON.stringify()` method with the difference that any errors are caught
-and reported back in the form of the returned string. Used as a shortcut for displaying information to the console (e.g. in
-error message) without the need to worry about invalid conversion.
-
-```javascript
-var a = {};
-a.b = a;
-Hoek.stringify(a); // Returns '[Cannot display object: Converting circular structure to JSON]'
-```
-
-# Timer
-
-A Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
-
-```javascript
-
-var timerObj = new Hoek.Timer();
-console.log("Time is now: " + timerObj.ts);
-console.log("Elapsed time from initialization: " + timerObj.elapsed() + 'milliseconds');
-```
-
-
-# Bench
-
-Same as Timer with the exception that `ts` stores the internal node clock which is not related to `Date.now()` and cannot be used to display
-human-readable timestamps. More accurate for benchmarking or internal timers.
-
-# Binary Encoding/Decoding
-
-### base64urlEncode(value)
-
-Encodes value in Base64 or URL encoding
-
-### base64urlDecode(value)
-
-Decodes data in Base64 or URL encoding.
-# Escaping Characters
-
-Hoek provides convenient methods for escaping html characters. The escaped characters are as followed:
-
-```javascript
-
-internals.htmlEscaped = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#x27;',
- '`': '&#x60;'
-};
-```
-
-### escapeHtml(string)
-
-```javascript
-
-var string = '<html> hey </html>';
-var escapedString = Hoek.escapeHtml(string); // returns &lt;html&gt; hey &lt;/html&gt;
-```
-
-### escapeHeaderAttribute(attribute)
-
-Escape attribute value for use in HTTP header
-
-```javascript
-
-var a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); //returns I said \"go w\\o me\"
-```
-
-
-### escapeRegex(string)
-
-Escape string for Regex construction
-
-```javascript
-
-var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\,
-```
-
-# Errors
-
-### assert(condition, message)
-
-```javascript
-
-var a = 1, b = 2;
-
-Hoek.assert(a === b, 'a should equal b'); // Throws 'a should equal b'
-```
-
-Note that you may also pass an already created Error object as the second parameter, and `assert` will throw that object.
-
-```javascript
-
-var a = 1, b = 2;
-
-Hoek.assert(a === b, new Error('a should equal b')); // Throws the given error object
-```
-
-### abort(message)
-
-First checks if `process.env.NODE_ENV === 'test'`, and if so, throws error message. Otherwise,
-displays most recent stack and then exits process.
-
-
-
-### displayStack(slice)
-
-Displays the trace stack
-
-```javascript
-
-var stack = Hoek.displayStack();
-console.log(stack); // returns something like:
-
-[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',
- 'Module._compile (module.js:449:26)',
- 'Module._extensions..js (module.js:467:10)',
- 'Module.load (module.js:356:32)',
- 'Module._load (module.js:312:12)',
- 'Module.runMain (module.js:492:10)',
- 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]
-```
-
-### callStack(slice)
-
-Returns a trace stack array.
-
-```javascript
-
-var stack = Hoek.callStack();
-console.log(stack); // returns something like:
-
-[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],
- [ 'module.js', 449, 26, 'Module._compile', false ],
- [ 'module.js', 467, 10, 'Module._extensions..js', false ],
- [ 'module.js', 356, 32, 'Module.load', false ],
- [ 'module.js', 312, 12, 'Module._load', false ],
- [ 'module.js', 492, 10, 'Module.runMain', false ],
- [ 'node.js',
- 244,
- 9,
- 'startup.processNextTick.process._tickCallback',
- false ] ]
-```
-
-## Function
-
-### nextTick(fn)
-
-Returns a new function that wraps `fn` in `process.nextTick`.
-
-```javascript
-
-var myFn = function () {
- console.log('Do this later');
-};
-
-var nextFn = Hoek.nextTick(myFn);
-
-nextFn();
-console.log('Do this first');
-
-// Results in:
-//
-// Do this first
-// Do this later
-```
-
-### once(fn)
-
-Returns a new function that can be run multiple times, but makes sure `fn` is only run once.
-
-```javascript
-
-var myFn = function () {
- console.log('Ran myFn');
-};
-
-var onceFn = Hoek.once(myFn);
-onceFn(); // results in "Ran myFn"
-onceFn(); // results in undefined
-```
-
-### ignore
-
-A simple no-op function. It does nothing at all.
-
-## Miscellaneous
-
-### uniqueFilename(path, extension)
-`path` to prepend with the randomly generated file name. `extension` is the optional file extension, defaults to `''`.
-
-Returns a randomly generated file name at the specified `path`. The result is a fully resolved path to a file.
-
-```javascript
-var result = Hoek.uniqueFilename('./test/modules', 'txt'); // results in "full/path/test/modules/{random}.txt"
-```
-
-### isAbsolutePath(path, [platform])
-
-Determines whether `path` is an absolute path. Returns `true` or `false`.
-
-- `path` - A file path to test for whether it is absolute or not.
-- `platform` - An optional parameter used for specifying the platform. Defaults to `process.platform`.
-
-### isInteger(value)
-
-Check `value` to see if it is an integer. Returns true/false.
-
-```javascript
-var result = Hoek.isInteger('23')
-```
diff --git a/node_modules/hoek/images/hoek.png b/node_modules/hoek/images/hoek.png
deleted file mode 100644
index 6ccfcb12b..000000000
--- a/node_modules/hoek/images/hoek.png
+++ /dev/null
Binary files differ
diff --git a/node_modules/hoek/lib/escape.js b/node_modules/hoek/lib/escape.js
deleted file mode 100644
index 9ecde6666..000000000
--- a/node_modules/hoek/lib/escape.js
+++ /dev/null
@@ -1,132 +0,0 @@
-// Declare internals
-
-var internals = {};
-
-
-exports.escapeJavaScript = function (input) {
-
- if (!input) {
- return '';
- }
-
- var escaped = '';
-
- for (var i = 0, il = input.length; i < il; ++i) {
-
- var charCode = input.charCodeAt(i);
-
- if (internals.isSafe(charCode)) {
- escaped += input[i];
- }
- else {
- escaped += internals.escapeJavaScriptChar(charCode);
- }
- }
-
- return escaped;
-};
-
-
-exports.escapeHtml = function (input) {
-
- if (!input) {
- return '';
- }
-
- var escaped = '';
-
- for (var i = 0, il = input.length; i < il; ++i) {
-
- var charCode = input.charCodeAt(i);
-
- if (internals.isSafe(charCode)) {
- escaped += input[i];
- }
- else {
- escaped += internals.escapeHtmlChar(charCode);
- }
- }
-
- return escaped;
-};
-
-
-internals.escapeJavaScriptChar = function (charCode) {
-
- if (charCode >= 256) {
- return '\\u' + internals.padLeft('' + charCode, 4);
- }
-
- var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
- return '\\x' + internals.padLeft(hexValue, 2);
-};
-
-
-internals.escapeHtmlChar = function (charCode) {
-
- var namedEscape = internals.namedHtml[charCode];
- if (typeof namedEscape !== 'undefined') {
- return namedEscape;
- }
-
- if (charCode >= 256) {
- return '&#' + charCode + ';';
- }
-
- var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
- return '&#x' + internals.padLeft(hexValue, 2) + ';';
-};
-
-
-internals.padLeft = function (str, len) {
-
- while (str.length < len) {
- str = '0' + str;
- }
-
- return str;
-};
-
-
-internals.isSafe = function (charCode) {
-
- return (typeof internals.safeCharCodes[charCode] !== 'undefined');
-};
-
-
-internals.namedHtml = {
- '38': '&amp;',
- '60': '&lt;',
- '62': '&gt;',
- '34': '&quot;',
- '160': '&nbsp;',
- '162': '&cent;',
- '163': '&pound;',
- '164': '&curren;',
- '169': '&copy;',
- '174': '&reg;'
-};
-
-
-internals.safeCharCodes = (function () {
-
- var safe = {};
-
- for (var i = 32; i < 123; ++i) {
-
- if ((i >= 97) || // a-z
- (i >= 65 && i <= 90) || // A-Z
- (i >= 48 && i <= 57) || // 0-9
- i === 32 || // space
- i === 46 || // .
- i === 44 || // ,
- i === 45 || // -
- i === 58 || // :
- i === 95) { // _
-
- safe[i] = null;
- }
- }
-
- return safe;
-}());
diff --git a/node_modules/hoek/lib/index.js b/node_modules/hoek/lib/index.js
deleted file mode 100644
index 9a5ffe18f..000000000
--- a/node_modules/hoek/lib/index.js
+++ /dev/null
@@ -1,993 +0,0 @@
-// Load modules
-
-var Crypto = require('crypto');
-var Path = require('path');
-var Util = require('util');
-var Escape = require('./escape');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Clone object or array
-
-exports.clone = function (obj, seen) {
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return obj;
- }
-
- seen = seen || { orig: [], copy: [] };
-
- var lookup = seen.orig.indexOf(obj);
- if (lookup !== -1) {
- return seen.copy[lookup];
- }
-
- var newObj;
- var cloneDeep = false;
-
- if (!Array.isArray(obj)) {
- if (Buffer.isBuffer(obj)) {
- newObj = new Buffer(obj);
- }
- else if (obj instanceof Date) {
- newObj = new Date(obj.getTime());
- }
- else if (obj instanceof RegExp) {
- newObj = new RegExp(obj);
- }
- else {
- var proto = Object.getPrototypeOf(obj);
- if (proto &&
- proto.isImmutable) {
-
- newObj = obj;
- }
- else {
- newObj = Object.create(proto);
- cloneDeep = true;
- }
- }
- }
- else {
- newObj = [];
- cloneDeep = true;
- }
-
- seen.orig.push(obj);
- seen.copy.push(newObj);
-
- if (cloneDeep) {
- var keys = Object.getOwnPropertyNames(obj);
- for (var i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- var descriptor = Object.getOwnPropertyDescriptor(obj, key);
- if (descriptor &&
- (descriptor.get ||
- descriptor.set)) {
-
- Object.defineProperty(newObj, key, descriptor);
- }
- else {
- newObj[key] = exports.clone(obj[key], seen);
- }
- }
- }
-
- return newObj;
-};
-
-
-// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied
-/*eslint-disable */
-exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {
-/*eslint-enable */
- exports.assert(target && typeof target === 'object', 'Invalid target value: must be an object');
- exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object');
-
- if (!source) {
- return target;
- }
-
- if (Array.isArray(source)) {
- exports.assert(Array.isArray(target), 'Cannot merge array onto an object');
- if (isMergeArrays === false) { // isMergeArrays defaults to true
- target.length = 0; // Must not change target assignment
- }
-
- for (var i = 0, il = source.length; i < il; ++i) {
- target.push(exports.clone(source[i]));
- }
-
- return target;
- }
-
- var keys = Object.keys(source);
- for (var k = 0, kl = keys.length; k < kl; ++k) {
- var key = keys[k];
- var value = source[key];
- if (value &&
- typeof value === 'object') {
-
- if (!target[key] ||
- typeof target[key] !== 'object' ||
- (Array.isArray(target[key]) ^ Array.isArray(value)) ||
- value instanceof Date ||
- Buffer.isBuffer(value) ||
- value instanceof RegExp) {
-
- target[key] = exports.clone(value);
- }
- else {
- exports.merge(target[key], value, isNullOverride, isMergeArrays);
- }
- }
- else {
- if (value !== null &&
- value !== undefined) { // Explicit to preserve empty strings
-
- target[key] = value;
- }
- else if (isNullOverride !== false) { // Defaults to true
- target[key] = value;
- }
- }
- }
-
- return target;
-};
-
-
-// Apply options to a copy of the defaults
-
-exports.applyToDefaults = function (defaults, options, isNullOverride) {
-
- exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object');
- exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object');
-
- if (!options) { // If no options, return null
- return null;
- }
-
- var copy = exports.clone(defaults);
-
- if (options === true) { // If options is set to true, use defaults
- return copy;
- }
-
- return exports.merge(copy, options, isNullOverride === true, false);
-};
-
-
-// Clone an object except for the listed keys which are shallow copied
-
-exports.cloneWithShallow = function (source, keys) {
-
- if (!source ||
- typeof source !== 'object') {
-
- return source;
- }
-
- var storage = internals.store(source, keys); // Move shallow copy items to storage
- var copy = exports.clone(source); // Deep copy the rest
- internals.restore(copy, source, storage); // Shallow copy the stored items and restore
- return copy;
-};
-
-
-internals.store = function (source, keys) {
-
- var storage = {};
- for (var i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- var value = exports.reach(source, key);
- if (value !== undefined) {
- storage[key] = value;
- internals.reachSet(source, key, undefined);
- }
- }
-
- return storage;
-};
-
-
-internals.restore = function (copy, source, storage) {
-
- var keys = Object.keys(storage);
- for (var i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- internals.reachSet(copy, key, storage[key]);
- internals.reachSet(source, key, storage[key]);
- }
-};
-
-
-internals.reachSet = function (obj, key, value) {
-
- var path = key.split('.');
- var ref = obj;
- for (var i = 0, il = path.length; i < il; ++i) {
- var segment = path[i];
- if (i + 1 === il) {
- ref[segment] = value;
- }
-
- ref = ref[segment];
- }
-};
-
-
-// Apply options to defaults except for the listed keys which are shallow copied from option without merging
-
-exports.applyToDefaultsWithShallow = function (defaults, options, keys) {
-
- exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object');
- exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object');
- exports.assert(keys && Array.isArray(keys), 'Invalid keys');
-
- if (!options) { // If no options, return null
- return null;
- }
-
- var copy = exports.cloneWithShallow(defaults, keys);
-
- if (options === true) { // If options is set to true, use defaults
- return copy;
- }
-
- var storage = internals.store(options, keys); // Move shallow copy items to storage
- exports.merge(copy, options, false, false); // Deep copy the rest
- internals.restore(copy, options, storage); // Shallow copy the stored items and restore
- return copy;
-};
-
-
-// Deep object or array comparison
-
-exports.deepEqual = function (obj, ref, options, seen) {
-
- options = options || { prototype: true };
-
- var type = typeof obj;
-
- if (type !== typeof ref) {
- return false;
- }
-
- if (type !== 'object' ||
- obj === null ||
- ref === null) {
-
- if (obj === ref) { // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql
- return obj !== 0 || 1 / obj === 1 / ref; // -0 / +0
- }
-
- return obj !== obj && ref !== ref; // NaN
- }
-
- seen = seen || [];
- if (seen.indexOf(obj) !== -1) {
- return true; // If previous comparison failed, it would have stopped execution
- }
-
- seen.push(obj);
-
- if (Array.isArray(obj)) {
- if (!Array.isArray(ref)) {
- return false;
- }
-
- if (!options.part && obj.length !== ref.length) {
- return false;
- }
-
- for (var i = 0, il = obj.length; i < il; ++i) {
- if (options.part) {
- var found = false;
- for (var r = 0, rl = ref.length; r < rl; ++r) {
- if (exports.deepEqual(obj[i], ref[r], options, seen)) {
- found = true;
- break;
- }
- }
-
- return found;
- }
-
- if (!exports.deepEqual(obj[i], ref[i], options, seen)) {
- return false;
- }
- }
-
- return true;
- }
-
- if (Buffer.isBuffer(obj)) {
- if (!Buffer.isBuffer(ref)) {
- return false;
- }
-
- if (obj.length !== ref.length) {
- return false;
- }
-
- for (var j = 0, jl = obj.length; j < jl; ++j) {
- if (obj[j] !== ref[j]) {
- return false;
- }
- }
-
- return true;
- }
-
- if (obj instanceof Date) {
- return (ref instanceof Date && obj.getTime() === ref.getTime());
- }
-
- if (obj instanceof RegExp) {
- return (ref instanceof RegExp && obj.toString() === ref.toString());
- }
-
- if (options.prototype) {
- if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) {
- return false;
- }
- }
-
- var keys = Object.getOwnPropertyNames(obj);
-
- if (!options.part && keys.length !== Object.getOwnPropertyNames(ref).length) {
- return false;
- }
-
- for (var k = 0, kl = keys.length; k < kl; ++k) {
- var key = keys[k];
- var descriptor = Object.getOwnPropertyDescriptor(obj, key);
- if (descriptor.get) {
- if (!exports.deepEqual(descriptor, Object.getOwnPropertyDescriptor(ref, key), options, seen)) {
- return false;
- }
- }
- else if (!exports.deepEqual(obj[key], ref[key], options, seen)) {
- return false;
- }
- }
-
- return true;
-};
-
-
-// Remove duplicate items from array
-
-exports.unique = function (array, key) {
-
- var index = {};
- var result = [];
-
- for (var i = 0, il = array.length; i < il; ++i) {
- var id = (key ? array[i][key] : array[i]);
- if (index[id] !== true) {
-
- result.push(array[i]);
- index[id] = true;
- }
- }
-
- return result;
-};
-
-
-// Convert array into object
-
-exports.mapToObject = function (array, key) {
-
- if (!array) {
- return null;
- }
-
- var obj = {};
- for (var i = 0, il = array.length; i < il; ++i) {
- if (key) {
- if (array[i][key]) {
- obj[array[i][key]] = true;
- }
- }
- else {
- obj[array[i]] = true;
- }
- }
-
- return obj;
-};
-
-
-// Find the common unique items in two arrays
-
-exports.intersect = function (array1, array2, justFirst) {
-
- if (!array1 || !array2) {
- return [];
- }
-
- var common = [];
- var hash = (Array.isArray(array1) ? exports.mapToObject(array1) : array1);
- var found = {};
- for (var i = 0, il = array2.length; i < il; ++i) {
- if (hash[array2[i]] && !found[array2[i]]) {
- if (justFirst) {
- return array2[i];
- }
-
- common.push(array2[i]);
- found[array2[i]] = true;
- }
- }
-
- return (justFirst ? null : common);
-};
-
-
-// Test if the reference contains the values
-
-exports.contain = function (ref, values, options) {
-
- /*
- string -> string(s)
- array -> item(s)
- object -> key(s)
- object -> object (key:value)
- */
-
- var valuePairs = null;
- if (typeof ref === 'object' &&
- typeof values === 'object' &&
- !Array.isArray(ref) &&
- !Array.isArray(values)) {
-
- valuePairs = values;
- values = Object.keys(values);
- }
- else {
- values = [].concat(values);
- }
-
- options = options || {}; // deep, once, only, part
-
- exports.assert(arguments.length >= 2, 'Insufficient arguments');
- exports.assert(typeof ref === 'string' || typeof ref === 'object', 'Reference must be string or an object');
- exports.assert(values.length, 'Values array cannot be empty');
-
- var compare, compareFlags;
- if (options.deep) {
- compare = exports.deepEqual;
-
- var hasOnly = options.hasOwnProperty('only'), hasPart = options.hasOwnProperty('part');
-
- compareFlags = {
- prototype: hasOnly ? options.only : hasPart ? !options.part : false,
- part: hasOnly ? !options.only : hasPart ? options.part : true
- };
- }
- else {
- compare = function (a, b) {
-
- return a === b;
- };
- }
-
- var misses = false;
- var matches = new Array(values.length);
- for (var i = 0, il = matches.length; i < il; ++i) {
- matches[i] = 0;
- }
-
- if (typeof ref === 'string') {
- var pattern = '(';
- for (i = 0, il = values.length; i < il; ++i) {
- var value = values[i];
- exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value');
- pattern += (i ? '|' : '') + exports.escapeRegex(value);
- }
-
- var regex = new RegExp(pattern + ')', 'g');
- var leftovers = ref.replace(regex, function ($0, $1) {
-
- var index = values.indexOf($1);
- ++matches[index];
- return ''; // Remove from string
- });
-
- misses = !!leftovers;
- }
- else if (Array.isArray(ref)) {
- for (i = 0, il = ref.length; i < il; ++i) {
- for (var j = 0, jl = values.length, matched = false; j < jl && matched === false; ++j) {
- matched = compare(values[j], ref[i], compareFlags) && j;
- }
-
- if (matched !== false) {
- ++matches[matched];
- }
- else {
- misses = true;
- }
- }
- }
- else {
- var keys = Object.keys(ref);
- for (i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- var pos = values.indexOf(key);
- if (pos !== -1) {
- if (valuePairs &&
- !compare(valuePairs[key], ref[key], compareFlags)) {
-
- return false;
- }
-
- ++matches[pos];
- }
- else {
- misses = true;
- }
- }
- }
-
- var result = false;
- for (i = 0, il = matches.length; i < il; ++i) {
- result = result || !!matches[i];
- if ((options.once && matches[i] > 1) ||
- (!options.part && !matches[i])) {
-
- return false;
- }
- }
-
- if (options.only &&
- misses) {
-
- return false;
- }
-
- return result;
-};
-
-
-// Flatten array
-
-exports.flatten = function (array, target) {
-
- var result = target || [];
-
- for (var i = 0, il = array.length; i < il; ++i) {
- if (Array.isArray(array[i])) {
- exports.flatten(array[i], result);
- }
- else {
- result.push(array[i]);
- }
- }
-
- return result;
-};
-
-
-// Convert an object key chain string ('a.b.c') to reference (object[a][b][c])
-
-exports.reach = function (obj, chain, options) {
-
- if (chain === false ||
- chain === null ||
- typeof chain === 'undefined') {
-
- return obj;
- }
-
- options = options || {};
- if (typeof options === 'string') {
- options = { separator: options };
- }
-
- var path = chain.split(options.separator || '.');
- var ref = obj;
- for (var i = 0, il = path.length; i < il; ++i) {
- var key = path[i];
- if (key[0] === '-' && Array.isArray(ref)) {
- key = key.slice(1, key.length);
- key = ref.length - key;
- }
-
- if (!ref ||
- !ref.hasOwnProperty(key) ||
- (typeof ref !== 'object' && options.functions === false)) { // Only object and function can have properties
-
- exports.assert(!options.strict || i + 1 === il, 'Missing segment', key, 'in reach path ', chain);
- exports.assert(typeof ref === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain);
- ref = options.default;
- break;
- }
-
- ref = ref[key];
- }
-
- return ref;
-};
-
-
-exports.reachTemplate = function (obj, template, options) {
-
- return template.replace(/{([^}]+)}/g, function ($0, chain) {
-
- var value = exports.reach(obj, chain, options);
- return (value === undefined || value === null ? '' : value);
- });
-};
-
-
-exports.formatStack = function (stack) {
-
- var trace = [];
- for (var i = 0, il = stack.length; i < il; ++i) {
- var item = stack[i];
- trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]);
- }
-
- return trace;
-};
-
-
-exports.formatTrace = function (trace) {
-
- var display = [];
-
- for (var i = 0, il = trace.length; i < il; ++i) {
- var row = trace[i];
- display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')');
- }
-
- return display;
-};
-
-
-exports.callStack = function (slice) {
-
- // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
-
- var v8 = Error.prepareStackTrace;
- Error.prepareStackTrace = function (err, stack) {
-
- return stack;
- };
-
- var capture = {};
- Error.captureStackTrace(capture, arguments.callee); /*eslint no-caller:0 */
- var stack = capture.stack;
-
- Error.prepareStackTrace = v8;
-
- var trace = exports.formatStack(stack);
-
- if (slice) {
- return trace.slice(slice);
- }
-
- return trace;
-};
-
-
-exports.displayStack = function (slice) {
-
- var trace = exports.callStack(slice === undefined ? 1 : slice + 1);
-
- return exports.formatTrace(trace);
-};
-
-
-exports.abortThrow = false;
-
-
-exports.abort = function (message, hideStack) {
-
- if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) {
- throw new Error(message || 'Unknown error');
- }
-
- var stack = '';
- if (!hideStack) {
- stack = exports.displayStack(1).join('\n\t');
- }
- console.log('ABORT: ' + message + '\n\t' + stack);
- process.exit(1);
-};
-
-
-exports.assert = function (condition /*, msg1, msg2, msg3 */) {
-
- if (condition) {
- return;
- }
-
- if (arguments.length === 2 && arguments[1] instanceof Error) {
- throw arguments[1];
- }
-
- var msgs = [];
- for (var i = 1, il = arguments.length; i < il; ++i) {
- if (arguments[i] !== '') {
- msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations
- }
- }
-
- msgs = msgs.map(function (msg) {
-
- return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg);
- });
- throw new Error(msgs.join(' ') || 'Unknown error');
-};
-
-
-exports.Timer = function () {
-
- this.ts = 0;
- this.reset();
-};
-
-
-exports.Timer.prototype.reset = function () {
-
- this.ts = Date.now();
-};
-
-
-exports.Timer.prototype.elapsed = function () {
-
- return Date.now() - this.ts;
-};
-
-
-exports.Bench = function () {
-
- this.ts = 0;
- this.reset();
-};
-
-
-exports.Bench.prototype.reset = function () {
-
- this.ts = exports.Bench.now();
-};
-
-
-exports.Bench.prototype.elapsed = function () {
-
- return exports.Bench.now() - this.ts;
-};
-
-
-exports.Bench.now = function () {
-
- var ts = process.hrtime();
- return (ts[0] * 1e3) + (ts[1] / 1e6);
-};
-
-
-// Escape string for Regex construction
-
-exports.escapeRegex = function (string) {
-
- // Escape ^$.*+-?=!:|\/()[]{},
- return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
-};
-
-
-// Base64url (RFC 4648) encode
-
-exports.base64urlEncode = function (value, encoding) {
-
- var buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary'));
- return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
-};
-
-
-// Base64url (RFC 4648) decode
-
-exports.base64urlDecode = function (value, encoding) {
-
- if (value &&
- !/^[\w\-]*$/.test(value)) {
-
- return new Error('Invalid character');
- }
-
- try {
- var buf = new Buffer(value, 'base64');
- return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary'));
- }
- catch (err) {
- return err;
- }
-};
-
-
-// Escape attribute value for use in HTTP header
-
-exports.escapeHeaderAttribute = function (attribute) {
-
- // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, "
-
- exports.assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')');
-
- return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash
-};
-
-
-exports.escapeHtml = function (string) {
-
- return Escape.escapeHtml(string);
-};
-
-
-exports.escapeJavaScript = function (string) {
-
- return Escape.escapeJavaScript(string);
-};
-
-
-exports.nextTick = function (callback) {
-
- return function () {
-
- var args = arguments;
- process.nextTick(function () {
-
- callback.apply(null, args);
- });
- };
-};
-
-
-exports.once = function (method) {
-
- if (method._hoekOnce) {
- return method;
- }
-
- var once = false;
- var wrapped = function () {
-
- if (!once) {
- once = true;
- method.apply(null, arguments);
- }
- };
-
- wrapped._hoekOnce = true;
-
- return wrapped;
-};
-
-
-exports.isAbsolutePath = function (path, platform) {
-
- if (!path) {
- return false;
- }
-
- if (Path.isAbsolute) { // node >= 0.11
- return Path.isAbsolute(path);
- }
-
- platform = platform || process.platform;
-
- // Unix
-
- if (platform !== 'win32') {
- return path[0] === '/';
- }
-
- // Windows
-
- return !!/^(?:[a-zA-Z]:[\\\/])|(?:[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/])/.test(path); // C:\ or \\something\something
-};
-
-
-exports.isInteger = function (value) {
-
- return (typeof value === 'number' &&
- parseFloat(value) === parseInt(value, 10) &&
- !isNaN(value));
-};
-
-
-exports.ignore = function () { };
-
-
-exports.inherits = Util.inherits;
-
-
-exports.format = Util.format;
-
-
-exports.transform = function (source, transform, options) {
-
- exports.assert(source === null || source === undefined || typeof source === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array');
-
- if (Array.isArray(source)) {
- var results = [];
- for (var i = 0, il = source.length; i < il; ++i) {
- results.push(exports.transform(source[i], transform, options));
- }
- return results;
- }
-
- var result = {};
- var keys = Object.keys(transform);
-
- for (var k = 0, kl = keys.length; k < kl; ++k) {
- var key = keys[k];
- var path = key.split('.');
- var sourcePath = transform[key];
-
- exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
-
- var segment;
- var res = result;
-
- while (path.length > 1) {
- segment = path.shift();
- if (!res[segment]) {
- res[segment] = {};
- }
- res = res[segment];
- }
- segment = path.shift();
- res[segment] = exports.reach(source, sourcePath, options);
- }
-
- return result;
-};
-
-
-exports.uniqueFilename = function (path, extension) {
-
- if (extension) {
- extension = extension[0] !== '.' ? '.' + extension : extension;
- }
- else {
- extension = '';
- }
-
- path = Path.resolve(path);
- var name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;
- return Path.join(path, name);
-};
-
-
-exports.stringify = function () {
-
- try {
- return JSON.stringify.apply(null, arguments);
- }
- catch (err) {
- return '[Cannot display object: ' + err.message + ']';
- }
-};
-
-
-exports.shallow = function (source) {
-
- var target = {};
- var keys = Object.keys(source);
- for (var i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- target[key] = source[key];
- }
-
- return target;
-};
diff --git a/node_modules/hoek/package.json b/node_modules/hoek/package.json
deleted file mode 100644
index 8b5248e4e..000000000
--- a/node_modules/hoek/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "_from": "hoek@2.x.x",
- "_id": "hoek@2.16.3",
- "_inBundle": false,
- "_integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
- "_location": "/hoek",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "hoek@2.x.x",
- "name": "hoek",
- "escapedName": "hoek",
- "rawSpec": "2.x.x",
- "saveSpec": null,
- "fetchSpec": "2.x.x"
- },
- "_requiredBy": [
- "/boom",
- "/hawk",
- "/sntp"
- ],
- "_resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
- "_shasum": "20bb7403d3cea398e91dc4710a8ff1b8274a25ed",
- "_spec": "hoek@2.x.x",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
- "bugs": {
- "url": "https://github.com/hapijs/hoek/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "General purpose node utilities",
- "devDependencies": {
- "code": "1.x.x",
- "lab": "5.x.x"
- },
- "engines": {
- "node": ">=0.10.40"
- },
- "homepage": "https://github.com/hapijs/hoek#readme",
- "keywords": [
- "utilities"
- ],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
- "name": "hoek",
- "repository": {
- "type": "git",
- "url": "git://github.com/hapijs/hoek.git"
- },
- "scripts": {
- "test": "lab -a code -t 100 -L",
- "test-cov-html": "lab -a code -t 100 -L -r html -o coverage.html"
- },
- "version": "2.16.3"
-}
diff --git a/node_modules/hoek/test/escaper.js b/node_modules/hoek/test/escaper.js
deleted file mode 100644
index a5d048f7b..000000000
--- a/node_modules/hoek/test/escaper.js
+++ /dev/null
@@ -1,88 +0,0 @@
-// Load modules
-
-var Code = require('code');
-var Hoek = require('../lib');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-describe('escapeJavaScript()', function () {
-
- it('encodes / characters', function (done) {
-
- var encoded = Hoek.escapeJavaScript('<script>alert(1)</script>');
- expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e');
- done();
- });
-
- it('encodes \' characters', function (done) {
-
- var encoded = Hoek.escapeJavaScript('something(\'param\')');
- expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29');
- done();
- });
-
- it('encodes large unicode characters with the correct padding', function (done) {
-
- var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000));
- expect(encoded).to.equal('\\u0500\\u1000');
- done();
- });
-
- it('doesn\'t throw an exception when passed null', function (done) {
-
- var encoded = Hoek.escapeJavaScript(null);
- expect(encoded).to.equal('');
- done();
- });
-});
-
-describe('escapeHtml()', function () {
-
- it('encodes / characters', function (done) {
-
- var encoded = Hoek.escapeHtml('<script>alert(1)</script>');
- expect(encoded).to.equal('&lt;script&gt;alert&#x28;1&#x29;&lt;&#x2f;script&gt;');
- done();
- });
-
- it('encodes < and > as named characters', function (done) {
-
- var encoded = Hoek.escapeHtml('<script><>');
- expect(encoded).to.equal('&lt;script&gt;&lt;&gt;');
- done();
- });
-
- it('encodes large unicode characters', function (done) {
-
- var encoded = Hoek.escapeHtml(String.fromCharCode(500) + String.fromCharCode(1000));
- expect(encoded).to.equal('&#500;&#1000;');
- done();
- });
-
- it('doesn\'t throw an exception when passed null', function (done) {
-
- var encoded = Hoek.escapeHtml(null);
- expect(encoded).to.equal('');
- done();
- });
-
- it('encodes {} characters', function (done) {
-
- var encoded = Hoek.escapeHtml('{}');
- expect(encoded).to.equal('&#x7b;&#x7d;');
- done();
- });
-});
diff --git a/node_modules/hoek/test/index.js b/node_modules/hoek/test/index.js
deleted file mode 100644
index 1e8ef620f..000000000
--- a/node_modules/hoek/test/index.js
+++ /dev/null
@@ -1,2513 +0,0 @@
-// Load modules
-
-var Fs = require('fs');
-var Path = require('path');
-var Code = require('code');
-var Hoek = require('../lib');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Code.expect;
-
-
-var nestedObj = {
- v: [7, 8, 9],
- w: /^something$/igm,
- x: {
- a: [1, 2, 3],
- b: 123456,
- c: new Date(),
- d: /hi/igm,
- e: /hello/
- },
- y: 'y',
- z: new Date(1378775452757)
-};
-
-var dupsArray = [nestedObj, { z: 'z' }, nestedObj];
-var reducedDupsArray = [nestedObj, { z: 'z' }];
-
-describe('clone()', function () {
-
- it('clones a nested object', function (done) {
-
- var a = nestedObj;
- var b = Hoek.clone(a);
-
- expect(a).to.deep.equal(b);
- expect(a.z.getTime()).to.equal(b.z.getTime());
- done();
- });
-
- it('clones a null object', function (done) {
-
- var b = Hoek.clone(null);
-
- expect(b).to.equal(null);
- done();
- });
-
- it('should not convert undefined properties to null', function (done) {
-
- var obj = { something: undefined };
- var b = Hoek.clone(obj);
-
- expect(typeof b.something).to.equal('undefined');
- done();
- });
-
- it('should not throw on circular reference', function (done) {
-
- var a = {};
- a.x = a;
-
- var test = function () {
-
- var b = Hoek.clone(a);
- };
-
- expect(test).to.not.throw();
- done();
- });
-
- it('clones circular reference', function (done) {
-
- var x = {
- 'z': new Date()
- };
- x.y = x;
-
- var b = Hoek.clone(x);
- expect(Object.keys(b.y)).to.deep.equal(Object.keys(x));
- expect(b.z).to.not.equal(x.z);
- expect(b.y).to.not.equal(x.y);
- expect(b.y.z).to.not.equal(x.y.z);
- expect(b.y).to.equal(b);
- expect(b.y.y.y.y).to.equal(b);
- done();
- });
-
- it('clones an object with a null prototype', function (done) {
-
- var obj = Object.create(null);
- var b = Hoek.clone(obj);
-
- expect(b).to.deep.equal(obj);
- done();
- });
-
- it('clones deeply nested object', function (done) {
-
- var a = {
- x: {
- y: {
- a: [1, 2, 3],
- b: 123456,
- c: new Date(),
- d: /hi/igm,
- e: /hello/
- }
- }
- };
-
- var b = Hoek.clone(a);
-
- expect(a).to.deep.equal(b);
- expect(a.x.y.c.getTime()).to.equal(b.x.y.c.getTime());
- done();
- });
-
- it('clones arrays', function (done) {
-
- var a = [1, 2, 3];
-
- var b = Hoek.clone(a);
-
- expect(a).to.deep.equal(b);
- done();
- });
-
- it('performs actual copy for shallow keys (no pass by reference)', function (done) {
-
- var x = Hoek.clone(nestedObj);
- var y = Hoek.clone(nestedObj);
-
- // Date
- expect(x.z).to.not.equal(nestedObj.z);
- expect(x.z).to.not.equal(y.z);
-
- // Regex
- expect(x.w).to.not.equal(nestedObj.w);
- expect(x.w).to.not.equal(y.w);
-
- // Array
- expect(x.v).to.not.equal(nestedObj.v);
- expect(x.v).to.not.equal(y.v);
-
- // Immutable(s)
- x.y = 5;
- expect(x.y).to.not.equal(nestedObj.y);
- expect(x.y).to.not.equal(y.y);
-
- done();
- });
-
- it('performs actual copy for deep keys (no pass by reference)', function (done) {
-
- var x = Hoek.clone(nestedObj);
- var y = Hoek.clone(nestedObj);
-
- expect(x.x.c).to.not.equal(nestedObj.x.c);
- expect(x.x.c).to.not.equal(y.x.c);
-
- expect(x.x.c.getTime()).to.equal(nestedObj.x.c.getTime());
- expect(x.x.c.getTime()).to.equal(y.x.c.getTime());
- done();
- });
-
- it('copies functions with properties', function (done) {
-
- var a = {
- x: function () {
-
- return 1;
- },
- y: {}
- };
- a.x.z = 'string in function';
- a.x.v = function () {
-
- return 2;
- };
- a.y.u = a.x;
-
- var b = Hoek.clone(a);
- expect(b.x()).to.equal(1);
- expect(b.x.v()).to.equal(2);
- expect(b.y.u).to.equal(b.x);
- expect(b.x.z).to.equal('string in function');
- done();
- });
-
- it('should copy a buffer', function (done) {
-
- var tls = {
- key: new Buffer([1, 2, 3, 4, 5]),
- cert: new Buffer([1, 2, 3, 4, 5, 6, 10])
- };
-
- var copiedTls = Hoek.clone(tls);
- expect(Buffer.isBuffer(copiedTls.key)).to.equal(true);
- expect(JSON.stringify(copiedTls.key)).to.equal(JSON.stringify(tls.key));
- expect(Buffer.isBuffer(copiedTls.cert)).to.equal(true);
- expect(JSON.stringify(copiedTls.cert)).to.equal(JSON.stringify(tls.cert));
- done();
- });
-
- it('clones an object with a prototype', function (done) {
-
- var Obj = function () {
-
- this.a = 5;
- };
-
- Obj.prototype.b = function () {
-
- return 'c';
- };
-
- var a = new Obj();
- var b = Hoek.clone(a);
-
- expect(b.a).to.equal(5);
- expect(b.b()).to.equal('c');
- expect(a).to.deep.equal(b);
- done();
- });
-
- it('reuses cloned Date object', function (done) {
-
- var obj = {
- a: new Date()
- };
-
- obj.b = obj.a;
-
- var copy = Hoek.clone(obj);
- expect(copy.a).to.equal(copy.b);
- done();
- });
-
- it('shallow copies an object with a prototype and isImmutable flag', function (done) {
-
- var Obj = function () {
-
- this.value = 5;
- };
-
- Obj.prototype.b = function () {
-
- return 'c';
- };
-
- Obj.prototype.isImmutable = true;
-
- var obj = {
- a: new Obj()
- };
-
- var copy = Hoek.clone(obj);
-
- expect(obj.a.value).to.equal(5);
- expect(copy.a.value).to.equal(5);
- expect(copy.a.b()).to.equal('c');
- expect(obj.a).to.equal(copy.a);
- done();
- });
-
- it('clones an object with property getter without executing it', function (done) {
-
- var obj = {};
- var value = 1;
- var execCount = 0;
-
- Object.defineProperty(obj, 'test', {
- enumerable: true,
- configurable: true,
- get: function () {
-
- ++execCount;
- return value;
- }
- });
-
- var copy = Hoek.clone(obj);
- expect(execCount).to.equal(0);
- expect(copy.test).to.equal(1);
- expect(execCount).to.equal(1);
- done();
- });
-
- it('clones an object with property getter and setter', function (done) {
-
- var obj = {
- _test: 0
- };
-
- Object.defineProperty(obj, 'test', {
- enumerable: true,
- configurable: true,
- get: function () {
-
- return this._test;
- },
- set: function (value) {
-
- this._test = value - 1;
- }
- });
-
- var copy = Hoek.clone(obj);
- expect(copy.test).to.equal(0);
- copy.test = 5;
- expect(copy.test).to.equal(4);
- done();
- });
-
- it('clones an object with only property setter', function (done) {
-
- var obj = {
- _test: 0
- };
-
- Object.defineProperty(obj, 'test', {
- enumerable: true,
- configurable: true,
- set: function (value) {
-
- this._test = value - 1;
- }
- });
-
- var copy = Hoek.clone(obj);
- expect(copy._test).to.equal(0);
- copy.test = 5;
- expect(copy._test).to.equal(4);
- done();
- });
-
- it('clones an object with non-enumerable properties', function (done) {
-
- var obj = {
- _test: 0
- };
-
- Object.defineProperty(obj, 'test', {
- enumerable: false,
- configurable: true,
- set: function (value) {
-
- this._test = value - 1;
- }
- });
-
- var copy = Hoek.clone(obj);
- expect(copy._test).to.equal(0);
- copy.test = 5;
- expect(copy._test).to.equal(4);
- done();
- });
-
- it('clones an object where getOwnPropertyDescriptor returns undefined', function (done) {
-
- var oldGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- var obj = { a: 'b' };
- Object.getOwnPropertyDescriptor = function () {
-
- return undefined;
- };
-
- var copy = Hoek.clone(obj);
- Object.getOwnPropertyDescriptor = oldGetOwnPropertyDescriptor;
- expect(copy).to.deep.equal(obj);
- done();
- });
-});
-
-describe('merge()', function () {
-
- it('deep copies source items', function (done) {
-
- var target = {
- b: 3,
- d: []
- };
-
- var source = {
- c: {
- d: 1
- },
- d: [{ e: 1 }]
- };
-
- Hoek.merge(target, source);
- expect(target.c).to.not.equal(source.c);
- expect(target.c).to.deep.equal(source.c);
- expect(target.d).to.not.equal(source.d);
- expect(target.d[0]).to.not.equal(source.d[0]);
- expect(target.d).to.deep.equal(source.d);
- done();
- });
-
- it('merges array over an object', function (done) {
-
- var a = {
- x: ['n', 'm']
- };
-
- var b = {
- x: {
- n: '1',
- m: '2'
- }
- };
-
- Hoek.merge(b, a);
- expect(a.x[0]).to.equal('n');
- expect(a.x.n).to.not.exist();
- done();
- });
-
- it('merges object over an array', function (done) {
-
- var a = {
- x: ['n', 'm']
- };
-
- var b = {
- x: {
- n: '1',
- m: '2'
- }
- };
-
- Hoek.merge(a, b);
- expect(a.x.n).to.equal('1');
- expect(a.x[0]).to.not.exist();
- done();
- });
-
- it('does not throw if source is null', function (done) {
-
- var a = {};
- var b = null;
- var c = null;
-
- expect(function () {
-
- c = Hoek.merge(a, b);
- }).to.not.throw();
-
- expect(c).to.equal(a);
- done();
- });
-
- it('does not throw if source is undefined', function (done) {
-
- var a = {};
- var b;
- var c = null;
-
- expect(function () {
-
- c = Hoek.merge(a, b);
- }).to.not.throw();
-
- expect(c).to.equal(a);
- done();
- });
-
- it('throws if source is not an object', function (done) {
-
- expect(function () {
-
- var a = {};
- var b = 0;
-
- Hoek.merge(a, b);
- }).to.throw('Invalid source value: must be null, undefined, or an object');
- done();
- });
-
- it('throws if target is not an object', function (done) {
-
- expect(function () {
-
- var a = 0;
- var b = {};
-
- Hoek.merge(a, b);
- }).to.throw('Invalid target value: must be an object');
- done();
- });
-
- it('throws if target is not an array and source is', function (done) {
-
- expect(function () {
-
- var a = {};
- var b = [1, 2];
-
- Hoek.merge(a, b);
- }).to.throw('Cannot merge array onto an object');
- done();
- });
-
- it('returns the same object when merging arrays', function (done) {
-
- var a = [];
- var b = [1, 2];
-
- expect(Hoek.merge(a, b)).to.equal(a);
- done();
- });
-
- it('combines an empty object with a non-empty object', function (done) {
-
- var a = {};
- var b = nestedObj;
-
- var c = Hoek.merge(a, b);
- expect(a).to.deep.equal(b);
- expect(c).to.deep.equal(b);
- done();
- });
-
- it('overrides values in target', function (done) {
-
- var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
- var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
-
- var c = Hoek.merge(a, b);
- expect(c.x).to.equal(null);
- expect(c.y).to.equal(2);
- expect(c.z).to.equal(4);
- expect(c.v).to.equal(0);
- expect(c.m).to.equal('123');
- expect(c.t).to.deep.equal({ u: 6 });
- done();
- });
-
- it('overrides values in target (flip)', function (done) {
-
- var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
- var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
-
- var d = Hoek.merge(b, a);
- expect(d.x).to.equal(1);
- expect(d.y).to.equal(2);
- expect(d.z).to.equal(3);
- expect(d.v).to.equal(5);
- expect(d.m).to.equal('abc');
- expect(d.t).to.deep.equal('test');
- done();
- });
-
- it('retains Date properties', function (done) {
-
- var a = { x: new Date(1378776452757) };
-
- var b = Hoek.merge({}, a);
- expect(a.x.getTime()).to.equal(b.x.getTime());
- done();
- });
-
- it('retains Date properties when merging keys', function (done) {
-
- var a = { x: new Date(1378776452757) };
-
- var b = Hoek.merge({ x: {} }, a);
- expect(a.x.getTime()).to.equal(b.x.getTime());
- done();
- });
-
- it('overrides Buffer', function (done) {
-
- var a = { x: new Buffer('abc') };
-
- var b = Hoek.merge({ x: {} }, a);
- expect(a.x.toString()).to.equal('abc');
- done();
- });
-});
-
-describe('applyToDefaults()', function () {
-
- var defaults = {
- a: 1,
- b: 2,
- c: {
- d: 3,
- e: [5, 6]
- },
- f: 6,
- g: 'test'
- };
-
- it('throws when target is null', function (done) {
-
- expect(function () {
-
- Hoek.applyToDefaults(null, {});
- }).to.throw('Invalid defaults value: must be an object');
- done();
- });
-
- it('returns null if options is false', function (done) {
-
- var result = Hoek.applyToDefaults(defaults, false);
- expect(result).to.equal(null);
- done();
- });
-
- it('returns null if options is null', function (done) {
-
- var result = Hoek.applyToDefaults(defaults, null);
- expect(result).to.equal(null);
- done();
- });
-
- it('returns null if options is undefined', function (done) {
-
- var result = Hoek.applyToDefaults(defaults, undefined);
- expect(result).to.equal(null);
- done();
- });
-
- it('returns a copy of defaults if options is true', function (done) {
-
- var result = Hoek.applyToDefaults(defaults, true);
- expect(result).to.deep.equal(defaults);
- done();
- });
-
- it('applies object to defaults', function (done) {
-
- var obj = {
- a: null,
- c: {
- e: [4]
- },
- f: 0,
- g: {
- h: 5
- }
- };
-
- var result = Hoek.applyToDefaults(defaults, obj);
- expect(result.c.e).to.deep.equal([4]);
- expect(result.a).to.equal(1);
- expect(result.b).to.equal(2);
- expect(result.f).to.equal(0);
- expect(result.g).to.deep.equal({ h: 5 });
- done();
- });
-
- it('applies object to defaults with null', function (done) {
-
- var obj = {
- a: null,
- c: {
- e: [4]
- },
- f: 0,
- g: {
- h: 5
- }
- };
-
- var result = Hoek.applyToDefaults(defaults, obj, true);
- expect(result.c.e).to.deep.equal([4]);
- expect(result.a).to.equal(null);
- expect(result.b).to.equal(2);
- expect(result.f).to.equal(0);
- expect(result.g).to.deep.equal({ h: 5 });
- done();
- });
-});
-
-describe('cloneWithShallow()', function () {
-
- it('deep clones except for listed keys', function (done) {
-
- var source = {
- a: {
- b: 5
- },
- c: {
- d: 6
- }
- };
-
- var copy = Hoek.cloneWithShallow(source, ['c']);
- expect(copy).to.deep.equal(source);
- expect(copy).to.not.equal(source);
- expect(copy.a).to.not.equal(source.a);
- expect(copy.b).to.equal(source.b);
- done();
- });
-
- it('returns immutable value', function (done) {
-
- expect(Hoek.cloneWithShallow(5)).to.equal(5);
- done();
- });
-
- it('returns null value', function (done) {
-
- expect(Hoek.cloneWithShallow(null)).to.equal(null);
- done();
- });
-
- it('returns undefined value', function (done) {
-
- expect(Hoek.cloneWithShallow(undefined)).to.equal(undefined);
- done();
- });
-
- it('deep clones except for listed keys (including missing keys)', function (done) {
-
- var source = {
- a: {
- b: 5
- },
- c: {
- d: 6
- }
- };
-
- var copy = Hoek.cloneWithShallow(source, ['c', 'v']);
- expect(copy).to.deep.equal(source);
- expect(copy).to.not.equal(source);
- expect(copy.a).to.not.equal(source.a);
- expect(copy.b).to.equal(source.b);
- done();
- });
-});
-
-describe('applyToDefaultsWithShallow()', function () {
-
- it('shallow copies the listed keys from options without merging', function (done) {
-
- var defaults = {
- a: {
- b: 5,
- e: 3
- },
- c: {
- d: 7,
- g: 1
- }
- };
-
- var options = {
- a: {
- b: 4
- },
- c: {
- d: 6,
- f: 7
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['a']);
- expect(merged).to.deep.equal({ a: { b: 4 }, c: { d: 6, g: 1, f: 7 } });
- expect(merged.a).to.equal(options.a);
- expect(merged.a).to.not.equal(defaults.a);
- expect(merged.c).to.not.equal(options.c);
- expect(merged.c).to.not.equal(defaults.c);
- done();
- });
-
- it('shallow copies the nested keys (override)', function (done) {
-
- var defaults = {
- a: {
- b: 5
- },
- c: {
- d: 7,
- g: 1
- }
- };
-
- var options = {
- a: {
- b: 4
- },
- c: {
- d: 6,
- g: {
- h: 8
- }
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
- expect(merged).to.deep.equal({ a: { b: 4 }, c: { d: 6, g: { h: 8 } } });
- expect(merged.c.g).to.equal(options.c.g);
- done();
- });
-
- it('shallow copies the nested keys (missing)', function (done) {
-
- var defaults = {
- a: {
- b: 5
- }
- };
-
- var options = {
- a: {
- b: 4
- },
- c: {
- g: {
- h: 8
- }
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
- expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { h: 8 } } });
- expect(merged.c.g).to.equal(options.c.g);
- done();
- });
-
- it('shallow copies the nested keys (override)', function (done) {
-
- var defaults = {
- a: {
- b: 5
- },
- c: {
- g: {
- d: 7
- }
- }
- };
-
- var options = {
- a: {
- b: 4
- },
- c: {
- g: {
- h: 8
- }
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
- expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { h: 8 } } });
- expect(merged.c.g).to.equal(options.c.g);
- done();
- });
-
- it('shallow copies the nested keys (deeper)', function (done) {
-
- var defaults = {
- a: {
- b: 5
- }
- };
-
- var options = {
- a: {
- b: 4
- },
- c: {
- g: {
- r: {
- h: 8
- }
- }
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g.r']);
- expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { r: { h: 8 } } } });
- expect(merged.c.g.r).to.equal(options.c.g.r);
- done();
- });
-
- it('shallow copies the nested keys (not present)', function (done) {
-
- var defaults = {
- a: {
- b: 5
- }
- };
-
- var options = {
- a: {
- b: 4
- },
- c: {
- g: {
- r: {
- h: 8
- }
- }
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['x.y']);
- expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { r: { h: 8 } } } });
- done();
- });
-
- it('shallow copies the listed keys in the defaults', function (done) {
-
- var defaults = {
- a: {
- b: 1
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, {}, ['a']);
- expect(merged.a).to.equal(defaults.a);
- done();
- });
-
- it('shallow copies the listed keys in the defaults (true)', function (done) {
-
- var defaults = {
- a: {
- b: 1
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, true, ['a']);
- expect(merged.a).to.equal(defaults.a);
- done();
- });
-
- it('returns null on false', function (done) {
-
- var defaults = {
- a: {
- b: 1
- }
- };
-
- var merged = Hoek.applyToDefaultsWithShallow(defaults, false, ['a']);
- expect(merged).to.equal(null);
- done();
- });
-
- it('throws on missing defaults', function (done) {
-
- expect(function () {
-
- Hoek.applyToDefaultsWithShallow(null, {}, ['a']);
- }).to.throw('Invalid defaults value: must be an object');
- done();
- });
-
- it('throws on invalid defaults', function (done) {
-
- expect(function () {
-
- Hoek.applyToDefaultsWithShallow('abc', {}, ['a']);
- }).to.throw('Invalid defaults value: must be an object');
- done();
- });
-
- it('throws on invalid options', function (done) {
-
- expect(function () {
-
- Hoek.applyToDefaultsWithShallow({}, 'abc', ['a']);
- }).to.throw('Invalid options value: must be true, falsy or an object');
- done();
- });
-
- it('throws on missing keys', function (done) {
-
- expect(function () {
-
- Hoek.applyToDefaultsWithShallow({}, true);
- }).to.throw('Invalid keys');
- done();
- });
-
- it('throws on invalid keys', function (done) {
-
- expect(function () {
-
- Hoek.applyToDefaultsWithShallow({}, true, 'a');
- }).to.throw('Invalid keys');
- done();
- });
-});
-
-describe('deepEqual()', function () {
-
- it('compares simple values', function (done) {
-
- expect(Hoek.deepEqual('x', 'x')).to.be.true();
- expect(Hoek.deepEqual('x', 'y')).to.be.false();
- expect(Hoek.deepEqual('x1', 'x')).to.be.false();
- expect(Hoek.deepEqual(-0, +0)).to.be.false();
- expect(Hoek.deepEqual(-0, -0)).to.be.true();
- expect(Hoek.deepEqual(+0, +0)).to.be.true();
- expect(Hoek.deepEqual(+0, -0)).to.be.false();
- expect(Hoek.deepEqual(1, 1)).to.be.true();
- expect(Hoek.deepEqual(0, 0)).to.be.true();
- expect(Hoek.deepEqual(-1, 1)).to.be.false();
- expect(Hoek.deepEqual(NaN, 0)).to.be.false();
- expect(Hoek.deepEqual(NaN, NaN)).to.be.true();
- done();
- });
-
- it('compares different types', function (done) {
-
- expect(Hoek.deepEqual([], 5)).to.be.false();
- expect(Hoek.deepEqual(5, [])).to.be.false();
- expect(Hoek.deepEqual({}, null)).to.be.false();
- expect(Hoek.deepEqual(null, {})).to.be.false();
- expect(Hoek.deepEqual('abc', {})).to.be.false();
- expect(Hoek.deepEqual({}, 'abc')).to.be.false();
- done();
- });
-
- it('compares empty structures', function (done) {
-
- expect(Hoek.deepEqual([], [])).to.be.true();
- expect(Hoek.deepEqual({}, {})).to.be.true();
- expect(Hoek.deepEqual([], {})).to.be.false();
- done();
- });
-
- it('compares empty arguments object', function (done) {
-
- var compare = function () {
-
- expect(Hoek.deepEqual([], arguments)).to.be.false();
- };
-
- compare();
- done();
- });
-
- it('compares empty arguments objects', function (done) {
-
- var compare = function () {
-
- var arg1 = arguments;
-
- var inner = function () {
-
- expect(Hoek.deepEqual(arg1, arguments)).to.be.false(); // callee is not the same
- };
-
- inner();
- };
-
- compare();
- done();
- });
-
- it('compares dates', function (done) {
-
- expect(Hoek.deepEqual(new Date(2015, 1, 1), new Date(2015, 1, 1))).to.be.true();
- expect(Hoek.deepEqual(new Date(100), new Date(101))).to.be.false();
- expect(Hoek.deepEqual(new Date(), {})).to.be.false();
- done();
- });
-
- it('compares regular expressions', function (done) {
-
- expect(Hoek.deepEqual(/\s/, new RegExp('\\\s'))).to.be.true();
- expect(Hoek.deepEqual(/\s/g, /\s/g)).to.be.true();
- expect(Hoek.deepEqual(/a/, {})).to.be.false();
- expect(Hoek.deepEqual(/\s/g, /\s/i)).to.be.false();
- expect(Hoek.deepEqual(/a/g, /b/g)).to.be.false();
- done();
- });
-
- it('compares arrays', function (done) {
-
- expect(Hoek.deepEqual([[1]], [[1]])).to.be.true();
- expect(Hoek.deepEqual([1, 2, 3], [1, 2, 3])).to.be.true();
- expect(Hoek.deepEqual([1, 2, 3], [1, 3, 2])).to.be.false();
- expect(Hoek.deepEqual([1, 2, 3], [1, 2])).to.be.false();
- expect(Hoek.deepEqual([1], [1])).to.be.true();
- done();
- });
-
- it('compares buffers', function (done) {
-
- expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 2, 3]))).to.be.true();
- expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 3, 2]))).to.be.false();
- expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 2]))).to.be.false();
- expect(Hoek.deepEqual(new Buffer([1, 2, 3]), {})).to.be.false();
- expect(Hoek.deepEqual(new Buffer([1, 2, 3]), [1, 2, 3])).to.be.false();
- done();
- });
-
- it('compares objects', function (done) {
-
- expect(Hoek.deepEqual({ a: 1, b: 2, c: 3 }, { a: 1, b: 2, c: 3 })).to.be.true();
- expect(Hoek.deepEqual({ foo: 'bar' }, { foo: 'baz' })).to.be.false();
- expect(Hoek.deepEqual({ foo: { bar: 'foo' } }, { foo: { bar: 'baz' } })).to.be.false();
- done();
- });
-
- it('handles circular dependency', function (done) {
-
- var a = {};
- a.x = a;
-
- var b = Hoek.clone(a);
- expect(Hoek.deepEqual(a, b)).to.be.true();
- done();
- });
-
- it('compares an object with property getter without executing it', function (done) {
-
- var obj = {};
- var value = 1;
- var execCount = 0;
-
- Object.defineProperty(obj, 'test', {
- enumerable: true,
- configurable: true,
- get: function () {
-
- ++execCount;
- return value;
- }
- });
-
- var copy = Hoek.clone(obj);
- expect(Hoek.deepEqual(obj, copy)).to.be.true();
- expect(execCount).to.equal(0);
- expect(copy.test).to.equal(1);
- expect(execCount).to.equal(1);
- done();
- });
-
- it('compares objects with property getters', function (done) {
-
- var obj = {};
- Object.defineProperty(obj, 'test', {
- enumerable: true,
- configurable: true,
- get: function () {
-
- return 1;
- }
- });
-
- var ref = {};
- Object.defineProperty(ref, 'test', {
- enumerable: true,
- configurable: true,
- get: function () {
-
- return 2;
- }
- });
-
- expect(Hoek.deepEqual(obj, ref)).to.be.false();
- done();
- });
-
- it('compares object prototypes', function (done) {
-
- var Obj = function () {
-
- this.a = 5;
- };
-
- Obj.prototype.b = function () {
-
- return this.a;
- };
-
- var Ref = function () {
-
- this.a = 5;
- };
-
- Ref.prototype.b = function () {
-
- return this.a;
- };
-
- expect(Hoek.deepEqual(new Obj(), new Ref())).to.be.false();
- expect(Hoek.deepEqual(new Obj(), new Obj())).to.be.true();
- expect(Hoek.deepEqual(new Ref(), new Ref())).to.be.true();
- done();
- });
-
- it('compares plain objects', function (done) {
-
- var a = Object.create(null);
- var b = Object.create(null);
-
- a.b = 'c';
- b.b = 'c';
-
- expect(Hoek.deepEqual(a, b)).to.be.true();
- expect(Hoek.deepEqual(a, { b: 'c' })).to.be.false();
- done();
- });
-
- it('compares an object with an empty object', function (done) {
-
- var a = { a: 1, b: 2 };
-
- expect(Hoek.deepEqual({}, a)).to.be.false();
- expect(Hoek.deepEqual(a, {})).to.be.false();
- done();
- });
-
- it('compares an object ignoring the prototype', function (done) {
-
- var a = Object.create(null);
- var b = {};
-
- expect(Hoek.deepEqual(a, b, { prototype: false })).to.be.true();
- done();
- });
-
- it('compares an object ignoring the prototype recursively', function (done) {
-
- var a = [Object.create(null)];
- var b = [{}];
-
- expect(Hoek.deepEqual(a, b, { prototype: false })).to.be.true();
- done();
- });
-});
-
-describe('unique()', function () {
-
- it('ensures uniqueness within array of objects based on subkey', function (done) {
-
- var a = Hoek.unique(dupsArray, 'x');
- expect(a).to.deep.equal(reducedDupsArray);
- done();
- });
-
- it('removes duplicated without key', function (done) {
-
- expect(Hoek.unique([1, 2, 3, 4, 2, 1, 5])).to.deep.equal([1, 2, 3, 4, 5]);
- done();
- });
-});
-
-describe('mapToObject()', function () {
-
- it('returns null on null array', function (done) {
-
- var a = Hoek.mapToObject(null);
- expect(a).to.equal(null);
- done();
- });
-
- it('converts basic array to existential object', function (done) {
-
- var keys = [1, 2, 3, 4];
- var a = Hoek.mapToObject(keys);
- for (var i in keys) {
- expect(a[keys[i]]).to.equal(true);
- }
- done();
- });
-
- it('converts array of objects to existential object', function (done) {
-
- var keys = [{ x: 1 }, { x: 2 }, { x: 3 }, { y: 4 }];
- var subkey = 'x';
- var a = Hoek.mapToObject(keys, subkey);
- expect(a).to.deep.equal({ 1: true, 2: true, 3: true });
- done();
- });
-});
-
-describe('intersect()', function () {
-
- it('returns the common objects of two arrays', function (done) {
-
- var array1 = [1, 2, 3, 4, 4, 5, 5];
- var array2 = [5, 4, 5, 6, 7];
- var common = Hoek.intersect(array1, array2);
- expect(common.length).to.equal(2);
- done();
- });
-
- it('returns just the first common object of two arrays', function (done) {
-
- var array1 = [1, 2, 3, 4, 4, 5, 5];
- var array2 = [5, 4, 5, 6, 7];
- var common = Hoek.intersect(array1, array2, true);
- expect(common).to.equal(5);
- done();
- });
-
- it('returns null when no common and returning just the first common object of two arrays', function (done) {
-
- var array1 = [1, 2, 3, 4, 4, 5, 5];
- var array2 = [6, 7];
- var common = Hoek.intersect(array1, array2, true);
- expect(common).to.equal(null);
- done();
- });
-
- it('returns an empty array if either input is null', function (done) {
-
- expect(Hoek.intersect([1], null).length).to.equal(0);
- expect(Hoek.intersect(null, [1]).length).to.equal(0);
- done();
- });
-
- it('returns the common objects of object and array', function (done) {
-
- var array1 = [1, 2, 3, 4, 4, 5, 5];
- var array2 = [5, 4, 5, 6, 7];
- var common = Hoek.intersect(Hoek.mapToObject(array1), array2);
- expect(common.length).to.equal(2);
- done();
- });
-});
-
-describe('contain()', function () {
-
- it('tests strings', function (done) {
-
- expect(Hoek.contain('abc', 'ab')).to.be.true();
- expect(Hoek.contain('abc', 'abc', { only: true })).to.be.true();
- expect(Hoek.contain('aaa', 'a', { only: true })).to.be.true();
- expect(Hoek.contain('abc', 'b', { once: true })).to.be.true();
- expect(Hoek.contain('abc', ['a', 'c'])).to.be.true();
- expect(Hoek.contain('abc', ['a', 'd'], { part: true })).to.be.true();
-
- expect(Hoek.contain('abc', 'ac')).to.be.false();
- expect(Hoek.contain('abcd', 'abc', { only: true })).to.be.false();
- expect(Hoek.contain('aab', 'a', { only: true })).to.be.false();
- expect(Hoek.contain('abb', 'b', { once: true })).to.be.false();
- expect(Hoek.contain('abc', ['a', 'd'])).to.be.false();
- expect(Hoek.contain('abc', ['ab', 'bc'])).to.be.false(); // Overlapping values not supported
- done();
- });
-
- it('tests arrays', function (done) {
-
- expect(Hoek.contain([1, 2, 3], 1)).to.be.true();
- expect(Hoek.contain([{ a: 1 }], { a: 1 }, { deep: true })).to.be.true();
- expect(Hoek.contain([1, 2, 3], [1, 2])).to.be.true();
- expect(Hoek.contain([{ a: 1 }], [{ a: 1 }], { deep: true })).to.be.true();
- expect(Hoek.contain([1, 1, 2], [1, 2], { only: true })).to.be.true();
- expect(Hoek.contain([1, 2], [1, 2], { once: true })).to.be.true();
- expect(Hoek.contain([1, 2, 3], [1, 4], { part: true })).to.be.true();
- expect(Hoek.contain([[1], [2]], [[1]], { deep: true })).to.be.true();
-
- expect(Hoek.contain([1, 2, 3], 4)).to.be.false();
- expect(Hoek.contain([{ a: 1 }], { a: 2 }, { deep: true })).to.be.false();
- expect(Hoek.contain([{ a: 1 }], { a: 1 })).to.be.false();
- expect(Hoek.contain([1, 2, 3], [4, 5])).to.be.false();
- expect(Hoek.contain([[3], [2]], [[1]])).to.be.false();
- expect(Hoek.contain([[1], [2]], [[1]])).to.be.false();
- expect(Hoek.contain([{ a: 1 }], [{ a: 2 }], { deep: true })).to.be.false();
- expect(Hoek.contain([1, 3, 2], [1, 2], { only: true })).to.be.false();
- expect(Hoek.contain([1, 2, 2], [1, 2], { once: true })).to.be.false();
- expect(Hoek.contain([0, 2, 3], [1, 4], { part: true })).to.be.false();
- done();
- });
-
- it('tests objects', function (done) {
-
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, 'a')).to.be.true();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'c'])).to.be.true();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'b', 'c'], { only: true })).to.be.true();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1 })).to.be.true();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, c: 3 })).to.be.true();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 }, { part: true })).to.be.true();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, b: 2, c: 3 }, { only: true })).to.be.true();
- expect(Hoek.contain({ a: [1], b: [2], c: [3] }, { a: [1], c: [3] }, { deep: true })).to.be.true();
- expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true })).to.be.true();
- expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, part: true })).to.be.true();
- expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, part: false })).to.be.false();
- expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, only: true })).to.be.false();
- expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, only: false })).to.be.true();
-
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, 'd')).to.be.false();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'd'])).to.be.false();
- expect(Hoek.contain({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'b', 'c'], { only: true })).to.be.false();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 2 })).to.be.false();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 2, b: 2 }, { part: true })).to.be.false(); // part does not ignore bad value
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 3 })).to.be.false();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 })).to.be.false();
- expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 }, { only: true })).to.be.false();
- expect(Hoek.contain({ a: [1], b: [2], c: [3] }, { a: [1], c: [3] })).to.be.false();
- expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } })).to.be.false();
- expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true })).to.be.true();
- expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, only: true })).to.be.false();
- expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, only: false })).to.be.true();
- expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, part: true })).to.be.true();
- expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, part: false })).to.be.false();
-
- // Getter check
- var Foo = function (bar) {
-
- this.bar = bar;
- };
-
- Object.defineProperty(Foo.prototype, 'baz', {
- enumerable: true,
- get: function () {
-
- return this.bar;
- }
- });
-
- expect(Hoek.contain({ a: new Foo('b') }, { a: new Foo('b') }, { deep: true })).to.be.true();
- expect(Hoek.contain({ a: new Foo('b') }, { a: new Foo('b') }, { deep: true, part: true })).to.be.true();
- expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true })).to.be.true();
- expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true, only: true })).to.be.false();
- expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true, part: false })).to.be.false();
- expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true, part: true })).to.be.true();
-
- done();
- });
-});
-
-describe('flatten()', function () {
-
- it('returns a flat array', function (done) {
-
- var result = Hoek.flatten([1, 2, [3, 4, [5, 6], [7], 8], [9], [10, [11, 12]], 13]);
- expect(result.length).to.equal(13);
- expect(result).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]);
- done();
- });
-});
-
-describe('reach()', function () {
-
- var obj = {
- a: {
- b: {
- c: {
- d: 1,
- e: 2
- },
- f: 'hello'
- },
- g: {
- h: 3
- }
- },
- i: function () { },
- j: null,
- k: [4, 8, 9, 1]
- };
-
- obj.i.x = 5;
-
- it('returns object itself', function (done) {
-
- expect(Hoek.reach(obj, null)).to.equal(obj);
- expect(Hoek.reach(obj, false)).to.equal(obj);
- expect(Hoek.reach(obj)).to.equal(obj);
- done();
- });
-
- it('returns first value of array', function (done) {
-
- expect(Hoek.reach(obj, 'k.0')).to.equal(4);
- done();
- });
-
- it('returns last value of array using negative index', function (done) {
-
- expect(Hoek.reach(obj, 'k.-2')).to.equal(9);
- done();
- });
-
- it('returns a valid member', function (done) {
-
- expect(Hoek.reach(obj, 'a.b.c.d')).to.equal(1);
- done();
- });
-
- it('returns a valid member with separator override', function (done) {
-
- expect(Hoek.reach(obj, 'a/b/c/d', '/')).to.equal(1);
- done();
- });
-
- it('returns undefined on null object', function (done) {
-
- expect(Hoek.reach(null, 'a.b.c.d')).to.equal(undefined);
- done();
- });
-
- it('returns undefined on missing object member', function (done) {
-
- expect(Hoek.reach(obj, 'a.b.c.d.x')).to.equal(undefined);
- done();
- });
-
- it('returns undefined on missing function member', function (done) {
-
- expect(Hoek.reach(obj, 'i.y', { functions: true })).to.equal(undefined);
- done();
- });
-
- it('throws on missing member in strict mode', function (done) {
-
- expect(function () {
-
- Hoek.reach(obj, 'a.b.c.o.x', { strict: true });
- }).to.throw('Missing segment o in reach path a.b.c.o.x');
-
- done();
- });
-
- it('returns undefined on invalid member', function (done) {
-
- expect(Hoek.reach(obj, 'a.b.c.d-.x')).to.equal(undefined);
- done();
- });
-
- it('returns function member', function (done) {
-
- expect(typeof Hoek.reach(obj, 'i')).to.equal('function');
- done();
- });
-
- it('returns function property', function (done) {
-
- expect(Hoek.reach(obj, 'i.x')).to.equal(5);
- done();
- });
-
- it('returns null', function (done) {
-
- expect(Hoek.reach(obj, 'j')).to.equal(null);
- done();
- });
-
- it('throws on function property when functions not allowed', function (done) {
-
- expect(function () {
-
- Hoek.reach(obj, 'i.x', { functions: false });
- }).to.throw('Invalid segment x in reach path i.x');
-
- done();
- });
-
- it('will return a default value if property is not found', function (done) {
-
- expect(Hoek.reach(obj, 'a.b.q', { default: 'defaultValue' })).to.equal('defaultValue');
- done();
- });
-
- it('will return a default value if path is not found', function (done) {
-
- expect(Hoek.reach(obj, 'q', { default: 'defaultValue' })).to.equal('defaultValue');
- done();
- });
-
- it('allows a falsey value to be used as the default value', function (done) {
-
- expect(Hoek.reach(obj, 'q', { default: '' })).to.equal('');
- done();
- });
-});
-
-describe('reachTemplate()', function () {
-
- it('applies object to template', function (done) {
-
- var obj = {
- a: {
- b: {
- c: {
- d: 1
- }
- }
- },
- j: null,
- k: [4, 8, 9, 1]
- };
-
- var template = '{k.0}:{k.-2}:{a.b.c.d}:{x.y}:{j}';
-
- expect(Hoek.reachTemplate(obj, template)).to.equal('4:9:1::');
- done();
- });
-
- it('applies object to template (options)', function (done) {
-
- var obj = {
- a: {
- b: {
- c: {
- d: 1
- }
- }
- },
- j: null,
- k: [4, 8, 9, 1]
- };
-
- var template = '{k/0}:{k/-2}:{a/b/c/d}:{x/y}:{j}';
-
- expect(Hoek.reachTemplate(obj, template, '/')).to.equal('4:9:1::');
- done();
- });
-});
-
-describe('callStack()', function () {
-
- it('returns the full call stack', function (done) {
-
- var stack = Hoek.callStack();
- expect(stack[0][0]).to.contain('index.js');
- expect(stack[0][2]).to.equal(26);
- done();
- });
-});
-
-describe('displayStack ()', function () {
-
- it('returns the full call stack for display', function (done) {
-
- var stack = Hoek.displayStack();
- expect(stack[0]).to.contain(Path.normalize('/test/index.js') + ':');
- done();
- });
-
- it('includes constructor functions correctly', function (done) {
-
- var Something = function (next) {
-
- next();
- };
-
- var something = new Something(function () {
-
- var stack = Hoek.displayStack();
- expect(stack[1]).to.contain('new Something');
- done();
- });
- });
-});
-
-describe('abort()', function () {
-
- it('exits process when not in test mode', function (done) {
-
- var env = process.env.NODE_ENV;
- var write = process.stdout.write;
- var exit = process.exit;
-
- process.env.NODE_ENV = 'nottatest';
- process.stdout.write = function () { };
- process.exit = function (state) {
-
- process.exit = exit;
- process.env.NODE_ENV = env;
- process.stdout.write = write;
-
- expect(state).to.equal(1);
- done();
- };
-
- Hoek.abort('Boom');
- });
-
- it('throws when not in test mode and abortThrow is true', function (done) {
-
- var env = process.env.NODE_ENV;
- process.env.NODE_ENV = 'nottatest';
- Hoek.abortThrow = true;
-
- var fn = function () {
-
- Hoek.abort('my error message');
- };
-
- expect(fn).to.throw('my error message');
- Hoek.abortThrow = false;
- process.env.NODE_ENV = env;
-
- done();
- });
-
- it('respects hideStack argument', function (done) {
-
- var env = process.env.NODE_ENV;
- var write = process.stdout.write;
- var exit = process.exit;
- var output = '';
-
- process.exit = function () { };
- process.env.NODE_ENV = '';
- process.stdout.write = function (message) {
-
- output = message;
- };
-
- Hoek.abort('my error message', true);
-
- process.env.NODE_ENV = env;
- process.stdout.write = write;
- process.exit = exit;
-
- expect(output).to.equal('ABORT: my error message\n\t\n');
-
- done();
- });
-
- it('throws in test mode', function (done) {
-
- var env = process.env.NODE_ENV;
- process.env.NODE_ENV = 'test';
-
- expect(function () {
-
- Hoek.abort('my error message', true);
- }).to.throw('my error message');
-
- process.env.NODE_ENV = env;
- done();
- });
-
- it('throws in test mode with default message', function (done) {
-
- var env = process.env.NODE_ENV;
- process.env.NODE_ENV = 'test';
-
- expect(function () {
-
- Hoek.abort('', true);
- }).to.throw('Unknown error');
-
- process.env.NODE_ENV = env;
- done();
- });
-
- it('defaults to showing stack', function (done) {
-
- var env = process.env.NODE_ENV;
- var write = process.stdout.write;
- var exit = process.exit;
- var output = '';
-
- process.exit = function () { };
- process.env.NODE_ENV = '';
- process.stdout.write = function (message) {
-
- output = message;
- };
-
- Hoek.abort('my error message');
-
- process.env.NODE_ENV = env;
- process.stdout.write = write;
- process.exit = exit;
-
- expect(output).to.contain('index.js');
-
- done();
- });
-});
-
-describe('assert()', function () {
-
- it('throws an Error when using assert in a test', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'my error message');
- };
-
- expect(fn).to.throw('my error message');
- done();
- });
-
- it('throws an Error when using assert in a test with no message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false);
- };
-
- expect(fn).to.throw('Unknown error');
- done();
- });
-
- it('throws an Error when using assert in a test with multipart message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'This', 'is', 'my message');
- };
-
- expect(fn).to.throw('This is my message');
- done();
- });
-
- it('throws an Error when using assert in a test with multipart message (empty)', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'This', 'is', '', 'my message');
- };
-
- expect(fn).to.throw('This is my message');
- done();
- });
-
- it('throws an Error when using assert in a test with object message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'This', 'is', { spinal: 'tap' });
- };
-
- expect(fn).to.throw('This is {"spinal":"tap"}');
- done();
- });
-
- it('throws an Error when using assert in a test with multipart string and error messages', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'This', 'is', new Error('spinal'), new Error('tap'));
- };
-
- expect(fn).to.throw('This is spinal tap');
- done();
- });
-
- it('throws an Error when using assert in a test with error object message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, new Error('This is spinal tap'));
- };
-
- expect(fn).to.throw('This is spinal tap');
- done();
- });
-
- it('throws the same Error that is passed to it if there is only one error passed', function (done) {
-
- var error = new Error('ruh roh');
- var error2 = new Error('ruh roh');
-
- var fn = function () {
-
- Hoek.assert(false, error);
- };
-
- try {
- fn();
- } catch (err) {
- expect(error).to.equal(error); // should be the same reference
- expect(error).to.not.equal(error2); // error with the same message should not match
- }
-
- done();
- });
-});
-
-describe('Timer', function () {
-
- it('returns time elapsed', function (done) {
-
- var timer = new Hoek.Timer();
- setTimeout(function () {
-
- expect(timer.elapsed()).to.be.above(9);
- done();
- }, 12);
- });
-});
-
-describe('Bench', function () {
-
- it('returns time elapsed', function (done) {
-
- var timer = new Hoek.Bench();
- setTimeout(function () {
-
- expect(timer.elapsed()).to.be.above(9);
- done();
- }, 12);
- });
-});
-
-describe('escapeRegex()', function () {
-
- it('escapes all special regular expression characters', function (done) {
-
- var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,');
- expect(a).to.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,');
- done();
- });
-});
-
-describe('Base64Url', function () {
-
- var base64str = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w';
- var str = unescape('%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF');
-
- describe('base64urlEncode()', function () {
-
- it('should base64 URL-safe a string', function (done) {
-
- expect(Hoek.base64urlEncode(str)).to.equal(base64str);
- done();
- });
-
- it('encodes a buffer', function (done) {
-
- expect(Hoek.base64urlEncode(new Buffer(str, 'binary'))).to.equal(base64str);
- done();
- });
-
- it('should base64 URL-safe a hex string', function (done) {
-
- var buffer = new Buffer(str, 'binary');
- expect(Hoek.base64urlEncode(buffer.toString('hex'), 'hex')).to.equal(base64str);
- done();
- });
-
- it('works on larger input strings', function (done) {
-
- var input = Fs.readFileSync(Path.join(__dirname, 'index.js')).toString();
- var encoded = Hoek.base64urlEncode(input);
-
- expect(encoded).to.not.contain('+');
- expect(encoded).to.not.contain('/');
-
- var decoded = Hoek.base64urlDecode(encoded);
-
- expect(decoded).to.equal(input);
- done();
- });
- });
-
- describe('base64urlDecode()', function () {
-
- it('should un-base64 URL-safe a string', function (done) {
-
- expect(Hoek.base64urlDecode(base64str)).to.equal(str);
- done();
- });
-
- it('should un-base64 URL-safe a string into hex', function (done) {
-
- expect(Hoek.base64urlDecode(base64str, 'hex')).to.equal(new Buffer(str, 'binary').toString('hex'));
- done();
- });
-
- it('should un-base64 URL-safe a string and return a buffer', function (done) {
-
- var buf = Hoek.base64urlDecode(base64str, 'buffer');
- expect(buf instanceof Buffer).to.equal(true);
- expect(buf.toString('binary')).to.equal(str);
- done();
- });
-
- it('returns error on undefined input', function (done) {
-
- expect(Hoek.base64urlDecode().message).to.exist();
- done();
- });
-
- it('returns error on invalid input', function (done) {
-
- expect(Hoek.base64urlDecode('*').message).to.exist();
- done();
- });
- });
-});
-
-describe('escapeHeaderAttribute()', function () {
-
- it('should not alter ascii values', function (done) {
-
- var a = Hoek.escapeHeaderAttribute('My Value');
- expect(a).to.equal('My Value');
- done();
- });
-
- it('escapes all special HTTP header attribute characters', function (done) {
-
- var a = Hoek.escapeHeaderAttribute('I said go!!!#"' + String.fromCharCode(92));
- expect(a).to.equal('I said go!!!#\\"\\\\');
- done();
- });
-
- it('throws on large unicode characters', function (done) {
-
- var fn = function () {
-
- Hoek.escapeHeaderAttribute('this is a test' + String.fromCharCode(500) + String.fromCharCode(300));
- };
-
- expect(fn).to.throw(Error);
- done();
- });
-
- it('throws on CRLF to prevent response splitting', function (done) {
-
- var fn = function () {
-
- Hoek.escapeHeaderAttribute('this is a test\r\n');
- };
-
- expect(fn).to.throw(Error);
- done();
- });
-});
-
-describe('escapeHtml()', function () {
-
- it('escapes all special HTML characters', function (done) {
-
- var a = Hoek.escapeHtml('&<>"\'`');
- expect(a).to.equal('&amp;&lt;&gt;&quot;&#x27;&#x60;');
- done();
- });
-
- it('returns empty string on falsy input', function (done) {
-
- var a = Hoek.escapeHtml('');
- expect(a).to.equal('');
- done();
- });
-
- it('returns unchanged string on no reserved input', function (done) {
-
- var a = Hoek.escapeHtml('abc');
- expect(a).to.equal('abc');
- done();
- });
-});
-
-describe('nextTick()', function () {
-
- it('calls the provided callback on nextTick', function (done) {
-
- var a = 0;
-
- var inc = function (step, next) {
-
- a += step;
- next();
- };
-
- var ticked = Hoek.nextTick(inc);
-
- ticked(5, function () {
-
- expect(a).to.equal(6);
- done();
- });
-
- expect(a).to.equal(0);
- inc(1, function () {
-
- expect(a).to.equal(1);
- });
- });
-});
-
-describe('once()', function () {
-
- it('allows function to only execute once', function (done) {
-
- var gen = 0;
- var add = function (x) {
-
- gen += x;
- };
-
- add(5);
- expect(gen).to.equal(5);
- add = Hoek.once(add);
- add(5);
- expect(gen).to.equal(10);
- add(5);
- expect(gen).to.equal(10);
- done();
- });
-
- it('double once wraps one time', function (done) {
-
- var method = function () { };
- method = Hoek.once(method);
- method.x = 1;
- method = Hoek.once(method);
- expect(method.x).to.equal(1);
- done();
- });
-});
-
-describe('isAbsoltePath()', function () {
-
- it('identifies if path is absolute on Unix without node support', { parallel: false }, function (done) {
-
- var orig = Path.isAbsolute;
- Path.isAbsolute = undefined;
-
- expect(Hoek.isAbsolutePath('')).to.equal(false);
- expect(Hoek.isAbsolutePath('a')).to.equal(false);
- expect(Hoek.isAbsolutePath('./a')).to.equal(false);
- expect(Hoek.isAbsolutePath('/a')).to.equal(true);
- expect(Hoek.isAbsolutePath('/')).to.equal(true);
-
- Path.isAbsolute = orig;
-
- done();
- });
-
- it('identifies if path is absolute with fake node support', { parallel: false }, function (done) {
-
- var orig = Path.isAbsolute;
- Path.isAbsolute = function (path) {
-
- return path[0] === '/';
- };
-
- expect(Hoek.isAbsolutePath('', 'linux')).to.equal(false);
- expect(Hoek.isAbsolutePath('a', 'linux')).to.equal(false);
- expect(Hoek.isAbsolutePath('./a', 'linux')).to.equal(false);
- expect(Hoek.isAbsolutePath('/a', 'linux')).to.equal(true);
- expect(Hoek.isAbsolutePath('/', 'linux')).to.equal(true);
-
- Path.isAbsolute = orig;
-
- done();
- });
-
- it('identifies if path is absolute on Windows without node support', { parallel: false }, function (done) {
-
- var orig = Path.isAbsolute;
- Path.isAbsolute = undefined;
-
- expect(Hoek.isAbsolutePath('//server/file', 'win32')).to.equal(true);
- expect(Hoek.isAbsolutePath('//server/file', 'win32')).to.equal(true);
- expect(Hoek.isAbsolutePath('\\\\server\\file', 'win32')).to.equal(true);
- expect(Hoek.isAbsolutePath('C:/Users/', 'win32')).to.equal(true);
- expect(Hoek.isAbsolutePath('C:\\Users\\', 'win32')).to.equal(true);
- expect(Hoek.isAbsolutePath('C:cwd/another', 'win32')).to.equal(false);
- expect(Hoek.isAbsolutePath('C:cwd\\another', 'win32')).to.equal(false);
- expect(Hoek.isAbsolutePath('directory/directory', 'win32')).to.equal(false);
- expect(Hoek.isAbsolutePath('directory\\directory', 'win32')).to.equal(false);
-
- Path.isAbsolute = orig;
-
- done();
- });
-});
-
-describe('isInteger()', function () {
-
- it('validates integers', function (done) {
-
- expect(Hoek.isInteger(0)).to.equal(true);
- expect(Hoek.isInteger(1)).to.equal(true);
- expect(Hoek.isInteger(1394035612500)).to.equal(true);
- expect(Hoek.isInteger('0')).to.equal(false);
- expect(Hoek.isInteger(1.0)).to.equal(true);
- expect(Hoek.isInteger(1.1)).to.equal(false);
- done();
- });
-});
-
-describe('ignore()', function () {
-
- it('exists', function (done) {
-
- expect(Hoek.ignore).to.exist();
- expect(typeof Hoek.ignore).to.equal('function');
- done();
- });
-});
-
-describe('inherits()', function () {
-
- it('exists', function (done) {
-
- expect(Hoek.inherits).to.exist();
- expect(typeof Hoek.inherits).to.equal('function');
- done();
- });
-});
-
-describe('format()', function () {
-
- it('exists', function (done) {
-
- expect(Hoek.format).to.exist();
- expect(typeof Hoek.format).to.equal('function');
- done();
- });
-
- it('is a reference to Util.format', function (done) {
-
- expect(Hoek.format('hello %s', 'world')).to.equal('hello world');
- done();
- });
-});
-
-describe('transform()', function () {
-
- var source = {
- address: {
- one: '123 main street',
- two: 'PO Box 1234'
- },
- zip: {
- code: 3321232,
- province: null
- },
- title: 'Warehouse',
- state: 'CA'
- };
-
- var sourcesArray = [{
- address: {
- one: '123 main street',
- two: 'PO Box 1234'
- },
- zip: {
- code: 3321232,
- province: null
- },
- title: 'Warehouse',
- state: 'CA'
- }, {
- address: {
- one: '456 market street',
- two: 'PO Box 5678'
- },
- zip: {
- code: 9876,
- province: null
- },
- title: 'Garage',
- state: 'NY'
- }];
-
- it('transforms an object based on the input object', function (done) {
-
- var result = Hoek.transform(source, {
- 'person.address.lineOne': 'address.one',
- 'person.address.lineTwo': 'address.two',
- 'title': 'title',
- 'person.address.region': 'state',
- 'person.address.zip': 'zip.code',
- 'person.address.location': 'zip.province'
- });
-
- expect(result).to.deep.equal({
- person: {
- address: {
- lineOne: '123 main street',
- lineTwo: 'PO Box 1234',
- region: 'CA',
- zip: 3321232,
- location: null
- }
- },
- title: 'Warehouse'
- });
-
- done();
- });
-
- it('transforms an array of objects based on the input object', function (done) {
-
- var result = Hoek.transform(sourcesArray, {
- 'person.address.lineOne': 'address.one',
- 'person.address.lineTwo': 'address.two',
- 'title': 'title',
- 'person.address.region': 'state',
- 'person.address.zip': 'zip.code',
- 'person.address.location': 'zip.province'
- });
-
- expect(result).to.deep.equal([
- {
- person: {
- address: {
- lineOne: '123 main street',
- lineTwo: 'PO Box 1234',
- region: 'CA',
- zip: 3321232,
- location: null
- }
- },
- title: 'Warehouse'
- },
- {
- person: {
- address: {
- lineOne: '456 market street',
- lineTwo: 'PO Box 5678',
- region: 'NY',
- zip: 9876,
- location: null
- }
- },
- title: 'Garage'
- }
- ]);
-
- done();
- });
-
- it('uses the reach options passed into it', function (done) {
-
- var schema = {
- 'person.address.lineOne': 'address-one',
- 'person.address.lineTwo': 'address-two',
- 'title': 'title',
- 'person.address.region': 'state',
- 'person.prefix': 'person-title',
- 'person.zip': 'zip-code'
- };
- var options = {
- separator: '-',
- default: 'unknown'
- };
- var result = Hoek.transform(source, schema, options);
-
- expect(result).to.deep.equal({
- person: {
- address: {
- lineOne: '123 main street',
- lineTwo: 'PO Box 1234',
- region: 'CA'
- },
- prefix: 'unknown',
- zip: 3321232
- },
- title: 'Warehouse'
- });
-
- done();
- });
-
- it('works to create shallow objects', function (done) {
-
- var result = Hoek.transform(source, {
- lineOne: 'address.one',
- lineTwo: 'address.two',
- title: 'title',
- region: 'state',
- province: 'zip.province'
- });
-
- expect(result).to.deep.equal({
- lineOne: '123 main street',
- lineTwo: 'PO Box 1234',
- title: 'Warehouse',
- region: 'CA',
- province: null
- });
-
- done();
- });
-
- it('only allows strings in the map', function (done) {
-
- expect(function () {
-
- var result = Hoek.transform(source, {
- lineOne: {}
- });
- }).to.throw('All mappings must be "." delineated strings');
-
- done();
- });
-
- it('throws an error on invalid arguments', function (done) {
-
- expect(function () {
-
- var result = Hoek.transform(NaN, {});
- }).to.throw('Invalid source object: must be null, undefined, an object, or an array');
-
- done();
- });
-
- it('is safe to pass null', function (done) {
-
- var result = Hoek.transform(null, {});
- expect(result).to.deep.equal({});
-
- done();
- });
-
- it('is safe to pass undefined', function (done) {
-
- var result = Hoek.transform(undefined, {});
- expect(result).to.deep.equal({});
-
- done();
- });
-});
-
-describe('uniqueFilename()', function () {
-
- it('generates a random file path', function (done) {
-
- var result = Hoek.uniqueFilename('./test/modules');
-
- expect(result).to.exist();
- expect(result).to.be.a.string();
- expect(result).to.contain('test/modules');
- done();
- });
-
- it('is random enough to use in fast loops', function (done) {
-
- var results = [];
-
- for (var i = 0; i < 10; ++i) {
- results[i] = Hoek.uniqueFilename('./test/modules');
- }
-
- var filter = results.filter(function (item, index, array) {
-
- return array.indexOf(item) === index;
- });
-
- expect(filter.length).to.equal(10);
- expect(results.length).to.equal(10);
- done();
-
- });
-
- it('combines the random elements with a supplied character', function (done) {
-
- var result = Hoek.uniqueFilename('./test', 'txt');
-
- expect(result).to.contain('test/');
- expect(result).to.contain('.txt');
-
- done();
- });
-
- it('accepts extensions with a "." in it', function (done) {
-
- var result = Hoek.uniqueFilename('./test', '.mp3');
-
- expect(result).to.contain('test/');
- expect(result).to.contain('.mp3');
-
- done();
- });
-});
-
-describe('stringify()', function (done) {
-
- it('converts object to string', function (done) {
-
- var obj = { a: 1 };
- expect(Hoek.stringify(obj)).to.equal('{"a":1}');
- done();
- });
-
- it('returns error in result string', function (done) {
-
- var obj = { a: 1 };
- obj.b = obj;
- expect(Hoek.stringify(obj)).to.equal('[Cannot display object: Converting circular structure to JSON]');
- done();
- });
-});
-
-describe('shallow()', function (done) {
-
- it('shallow copies an object', function (done) {
-
- var obj = {
- a: 5,
- b: {
- c: 6
- }
- };
-
- var shallow = Hoek.shallow(obj);
- expect(shallow).to.not.equal(obj);
- expect(shallow).to.deep.equal(obj);
- expect(shallow.b).to.equal(obj.b);
- done();
- });
-});
diff --git a/node_modules/hoek/test/modules/ignore.txt b/node_modules/hoek/test/modules/ignore.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/node_modules/hoek/test/modules/ignore.txt
+++ /dev/null
diff --git a/node_modules/hoek/test/modules/test1.js b/node_modules/hoek/test/modules/test1.js
deleted file mode 100644
index fa4e06abe..000000000
--- a/node_modules/hoek/test/modules/test1.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.x = 1;
diff --git a/node_modules/hoek/test/modules/test2.js b/node_modules/hoek/test/modules/test2.js
deleted file mode 100644
index 88e9166e8..000000000
--- a/node_modules/hoek/test/modules/test2.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.y = 2;
diff --git a/node_modules/hoek/test/modules/test3.js b/node_modules/hoek/test/modules/test3.js
deleted file mode 100644
index 670e724a6..000000000
--- a/node_modules/hoek/test/modules/test3.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.z = 3;
diff --git a/node_modules/json-stable-stringify/.npmignore b/node_modules/json-stable-stringify/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/json-stable-stringify/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/json-stable-stringify/.travis.yml b/node_modules/json-stable-stringify/.travis.yml
deleted file mode 100644
index cc4dba29d..000000000
--- a/node_modules/json-stable-stringify/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/node_modules/json-stable-stringify/LICENSE b/node_modules/json-stable-stringify/LICENSE
deleted file mode 100644
index ee27ba4b4..000000000
--- a/node_modules/json-stable-stringify/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/json-stable-stringify/example/key_cmp.js b/node_modules/json-stable-stringify/example/key_cmp.js
deleted file mode 100644
index d5f66752d..000000000
--- a/node_modules/json-stable-stringify/example/key_cmp.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var stringify = require('../');
-
-var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
-var s = stringify(obj, function (a, b) {
- return a.key < b.key ? 1 : -1;
-});
-console.log(s);
diff --git a/node_modules/json-stable-stringify/example/nested.js b/node_modules/json-stable-stringify/example/nested.js
deleted file mode 100644
index 9a672fc65..000000000
--- a/node_modules/json-stable-stringify/example/nested.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var stringify = require('../');
-var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
-console.log(stringify(obj));
diff --git a/node_modules/json-stable-stringify/example/str.js b/node_modules/json-stable-stringify/example/str.js
deleted file mode 100644
index 9b4b3cd28..000000000
--- a/node_modules/json-stable-stringify/example/str.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var stringify = require('../');
-var obj = { c: 6, b: [4,5], a: 3 };
-console.log(stringify(obj));
diff --git a/node_modules/json-stable-stringify/example/value_cmp.js b/node_modules/json-stable-stringify/example/value_cmp.js
deleted file mode 100644
index 09f1c5f79..000000000
--- a/node_modules/json-stable-stringify/example/value_cmp.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var stringify = require('../');
-
-var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
-var s = stringify(obj, function (a, b) {
- return a.value < b.value ? 1 : -1;
-});
-console.log(s);
diff --git a/node_modules/json-stable-stringify/index.js b/node_modules/json-stable-stringify/index.js
deleted file mode 100644
index 6a4131d44..000000000
--- a/node_modules/json-stable-stringify/index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var json = typeof JSON !== 'undefined' ? JSON : require('jsonify');
-
-module.exports = function (obj, opts) {
- if (!opts) opts = {};
- if (typeof opts === 'function') opts = { cmp: opts };
- var space = opts.space || '';
- if (typeof space === 'number') space = Array(space+1).join(' ');
- var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
- var replacer = opts.replacer || function(key, value) { return value; };
-
- var cmp = opts.cmp && (function (f) {
- return function (node) {
- return function (a, b) {
- var aobj = { key: a, value: node[a] };
- var bobj = { key: b, value: node[b] };
- return f(aobj, bobj);
- };
- };
- })(opts.cmp);
-
- var seen = [];
- return (function stringify (parent, key, node, level) {
- var indent = space ? ('\n' + new Array(level + 1).join(space)) : '';
- var colonSeparator = space ? ': ' : ':';
-
- if (node && node.toJSON && typeof node.toJSON === 'function') {
- node = node.toJSON();
- }
-
- node = replacer.call(parent, key, node);
-
- if (node === undefined) {
- return;
- }
- if (typeof node !== 'object' || node === null) {
- return json.stringify(node);
- }
- if (isArray(node)) {
- var out = [];
- for (var i = 0; i < node.length; i++) {
- var item = stringify(node, i, node[i], level+1) || json.stringify(null);
- out.push(indent + space + item);
- }
- return '[' + out.join(',') + indent + ']';
- }
- else {
- if (seen.indexOf(node) !== -1) {
- if (cycles) return json.stringify('__cycle__');
- throw new TypeError('Converting circular structure to JSON');
- }
- else seen.push(node);
-
- var keys = objectKeys(node).sort(cmp && cmp(node));
- var out = [];
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var value = stringify(node, key, node[key], level+1);
-
- if(!value) continue;
-
- var keyValue = json.stringify(key)
- + colonSeparator
- + value;
- ;
- out.push(indent + space + keyValue);
- }
- seen.splice(seen.indexOf(node), 1);
- return '{' + out.join(',') + indent + '}';
- }
- })({ '': obj }, '', obj, 0);
-};
-
-var isArray = Array.isArray || function (x) {
- return {}.toString.call(x) === '[object Array]';
-};
-
-var objectKeys = Object.keys || function (obj) {
- var has = Object.prototype.hasOwnProperty || function () { return true };
- var keys = [];
- for (var key in obj) {
- if (has.call(obj, key)) keys.push(key);
- }
- return keys;
-};
diff --git a/node_modules/json-stable-stringify/package.json b/node_modules/json-stable-stringify/package.json
deleted file mode 100644
index eca371269..000000000
--- a/node_modules/json-stable-stringify/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "_from": "json-stable-stringify@^1.0.1",
- "_id": "json-stable-stringify@1.0.1",
- "_inBundle": false,
- "_integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
- "_location": "/json-stable-stringify",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "json-stable-stringify@^1.0.1",
- "name": "json-stable-stringify",
- "escapedName": "json-stable-stringify",
- "rawSpec": "^1.0.1",
- "saveSpec": null,
- "fetchSpec": "^1.0.1"
- },
- "_requiredBy": [
- "/har-validator/ajv"
- ],
- "_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
- "_shasum": "9a759d39c5f2ff503fd5300646ed445f88c4f9af",
- "_spec": "json-stable-stringify@^1.0.1",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/har-validator/node_modules/ajv",
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/json-stable-stringify/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "jsonify": "~0.0.0"
- },
- "deprecated": false,
- "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results",
- "devDependencies": {
- "tape": "~1.0.4"
- },
- "homepage": "https://github.com/substack/json-stable-stringify",
- "keywords": [
- "json",
- "stringify",
- "deterministic",
- "hash",
- "sort",
- "stable"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "json-stable-stringify",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/json-stable-stringify.git"
- },
- "scripts": {
- "test": "tape test/*.js"
- },
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "ff/5",
- "ff/latest",
- "chrome/15",
- "chrome/latest",
- "safari/latest",
- "opera/latest"
- ]
- },
- "version": "1.0.1"
-}
diff --git a/node_modules/json-stable-stringify/readme.markdown b/node_modules/json-stable-stringify/readme.markdown
deleted file mode 100644
index 406c3c726..000000000
--- a/node_modules/json-stable-stringify/readme.markdown
+++ /dev/null
@@ -1,130 +0,0 @@
-# json-stable-stringify
-
-deterministic version of `JSON.stringify()` so you can get a consistent hash
-from stringified results
-
-You can also pass in a custom comparison function.
-
-[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify)
-
-[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify)
-
-# example
-
-``` js
-var stringify = require('json-stable-stringify');
-var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
-console.log(stringify(obj));
-```
-
-output:
-
-```
-{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
-```
-
-# methods
-
-``` js
-var stringify = require('json-stable-stringify')
-```
-
-## var str = stringify(obj, opts)
-
-Return a deterministic stringified string `str` from the object `obj`.
-
-## options
-
-### cmp
-
-If `opts` is given, you can supply an `opts.cmp` to have a custom comparison
-function for object keys. Your function `opts.cmp` is called with these
-parameters:
-
-``` js
-opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })
-```
-
-For example, to sort on the object key names in reverse order you could write:
-
-``` js
-var stringify = require('json-stable-stringify');
-
-var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
-var s = stringify(obj, function (a, b) {
- return a.key < b.key ? 1 : -1;
-});
-console.log(s);
-```
-
-which results in the output string:
-
-```
-{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
-```
-
-Or if you wanted to sort on the object values in reverse order, you could write:
-
-```
-var stringify = require('json-stable-stringify');
-
-var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
-var s = stringify(obj, function (a, b) {
- return a.value < b.value ? 1 : -1;
-});
-console.log(s);
-```
-
-which outputs:
-
-```
-{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10}
-```
-
-### space
-
-If you specify `opts.space`, it will indent the output for pretty-printing.
-Valid values are strings (e.g. `{space: \t}`) or a number of spaces
-(`{space: 3}`).
-
-For example:
-
-```js
-var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } };
-var s = stringify(obj, { space: ' ' });
-console.log(s);
-```
-
-which outputs:
-
-```
-{
- "a": {
- "and": [
- 1,
- 2,
- 3
- ],
- "foo": "bar"
- },
- "b": 1
-}
-```
-
-### replacer
-
-The replacer parameter is a function `opts.replacer(key, value)` that behaves
-the same as the replacer
-[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter).
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install json-stable-stringify
-```
-
-# license
-
-MIT
diff --git a/node_modules/json-stable-stringify/test/cmp.js b/node_modules/json-stable-stringify/test/cmp.js
deleted file mode 100644
index 2dbb39355..000000000
--- a/node_modules/json-stable-stringify/test/cmp.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var test = require('tape');
-var stringify = require('../');
-
-test('custom comparison function', function (t) {
- t.plan(1);
- var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
- var s = stringify(obj, function (a, b) {
- return a.key < b.key ? 1 : -1;
- });
- t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}');
-});
diff --git a/node_modules/json-stable-stringify/test/nested.js b/node_modules/json-stable-stringify/test/nested.js
deleted file mode 100644
index 026ebd59c..000000000
--- a/node_modules/json-stable-stringify/test/nested.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var test = require('tape');
-var stringify = require('../');
-
-test('nested', function (t) {
- t.plan(1);
- var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
- t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}');
-});
-
-test('cyclic (default)', function (t) {
- t.plan(1);
- var one = { a: 1 };
- var two = { a: 2, one: one };
- one.two = two;
- try {
- stringify(one);
- } catch (ex) {
- t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
- }
-});
-
-test('cyclic (specifically allowed)', function (t) {
- t.plan(1);
- var one = { a: 1 };
- var two = { a: 2, one: one };
- one.two = two;
- t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}');
-});
-
-test('repeated non-cyclic value', function(t) {
- t.plan(1);
- var one = { x: 1 };
- var two = { a: one, b: one };
- t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}');
-});
diff --git a/node_modules/json-stable-stringify/test/replacer.js b/node_modules/json-stable-stringify/test/replacer.js
deleted file mode 100644
index 98802a72d..000000000
--- a/node_modules/json-stable-stringify/test/replacer.js
+++ /dev/null
@@ -1,74 +0,0 @@
-var test = require('tape');
-var stringify = require('../');
-
-test('replace root', function (t) {
- t.plan(1);
-
- var obj = { a: 1, b: 2, c: false };
- var replacer = function(key, value) { return 'one'; };
-
- t.equal(stringify(obj, { replacer: replacer }), '"one"');
-});
-
-test('replace numbers', function (t) {
- t.plan(1);
-
- var obj = { a: 1, b: 2, c: false };
- var replacer = function(key, value) {
- if(value === 1) return 'one';
- if(value === 2) return 'two';
- return value;
- };
-
- t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}');
-});
-
-test('replace with object', function (t) {
- t.plan(1);
-
- var obj = { a: 1, b: 2, c: false };
- var replacer = function(key, value) {
- if(key === 'b') return { d: 1 };
- if(value === 1) return 'one';
- return value;
- };
-
- t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}');
-});
-
-test('replace with undefined', function (t) {
- t.plan(1);
-
- var obj = { a: 1, b: 2, c: false };
- var replacer = function(key, value) {
- if(value === false) return;
- return value;
- };
-
- t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}');
-});
-
-test('replace with array', function (t) {
- t.plan(1);
-
- var obj = { a: 1, b: 2, c: false };
- var replacer = function(key, value) {
- if(key === 'b') return ['one', 'two'];
- return value;
- };
-
- t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}');
-});
-
-test('replace array item', function (t) {
- t.plan(1);
-
- var obj = { a: 1, b: 2, c: [1,2] };
- var replacer = function(key, value) {
- if(value === 1) return 'one';
- if(value === 2) return 'two';
- return value;
- };
-
- t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}');
-});
diff --git a/node_modules/json-stable-stringify/test/space.js b/node_modules/json-stable-stringify/test/space.js
deleted file mode 100644
index 2621122ae..000000000
--- a/node_modules/json-stable-stringify/test/space.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var test = require('tape');
-var stringify = require('../');
-
-test('space parameter', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2 };
- t.equal(stringify(obj, {space: ' '}), ''
- + '{\n'
- + ' "one": 1,\n'
- + ' "two": 2\n'
- + '}'
- );
-});
-
-test('space parameter (with tabs)', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2 };
- t.equal(stringify(obj, {space: '\t'}), ''
- + '{\n'
- + '\t"one": 1,\n'
- + '\t"two": 2\n'
- + '}'
- );
-});
-
-test('space parameter (with a number)', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2 };
- t.equal(stringify(obj, {space: 3}), ''
- + '{\n'
- + ' "one": 1,\n'
- + ' "two": 2\n'
- + '}'
- );
-});
-
-test('space parameter (nested objects)', function (t) {
- t.plan(1);
- var obj = { one: 1, two: { b: 4, a: [2,3] } };
- t.equal(stringify(obj, {space: ' '}), ''
- + '{\n'
- + ' "one": 1,\n'
- + ' "two": {\n'
- + ' "a": [\n'
- + ' 2,\n'
- + ' 3\n'
- + ' ],\n'
- + ' "b": 4\n'
- + ' }\n'
- + '}'
- );
-});
-
-test('space parameter (same as native)', function (t) {
- t.plan(1);
- // for this test, properties need to be in alphabetical order
- var obj = { one: 1, two: { a: [2,3], b: 4 } };
- t.equal(stringify(obj, {space: ' '}), JSON.stringify(obj, null, ' '));
-});
diff --git a/node_modules/json-stable-stringify/test/str.js b/node_modules/json-stable-stringify/test/str.js
deleted file mode 100644
index 67426b99e..000000000
--- a/node_modules/json-stable-stringify/test/str.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var test = require('tape');
-var stringify = require('../');
-
-test('simple object', function (t) {
- t.plan(1);
- var obj = { c: 6, b: [4,5], a: 3, z: null };
- t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
-});
-
-test('object with undefined', function (t) {
- t.plan(1);
- var obj = { a: 3, z: undefined };
- t.equal(stringify(obj), '{"a":3}');
-});
-
-test('array with undefined', function (t) {
- t.plan(1);
- var obj = [4, undefined, 6];
- t.equal(stringify(obj), '[4,null,6]');
-});
-
-test('object with empty string', function (t) {
- t.plan(1);
- var obj = { a: 3, z: '' };
- t.equal(stringify(obj), '{"a":3,"z":""}');
-});
-
-test('array with empty string', function (t) {
- t.plan(1);
- var obj = [4, '', 6];
- t.equal(stringify(obj), '[4,"",6]');
-});
diff --git a/node_modules/json-stable-stringify/test/to-json.js b/node_modules/json-stable-stringify/test/to-json.js
deleted file mode 100644
index ef9a98092..000000000
--- a/node_modules/json-stable-stringify/test/to-json.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var stringify = require('../');
-
-test('toJSON function', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } };
- t.equal(stringify(obj), '{"one":1}' );
-});
-
-test('toJSON returns string', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } };
- t.equal(stringify(obj), '"one"');
-});
-
-test('toJSON returns array', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } };
- t.equal(stringify(obj), '["one"]');
-});
diff --git a/node_modules/jsonify/README.markdown b/node_modules/jsonify/README.markdown
deleted file mode 100644
index 71d9a93b5..000000000
--- a/node_modules/jsonify/README.markdown
+++ /dev/null
@@ -1,34 +0,0 @@
-jsonify
-=======
-
-This module provides Douglas Crockford's JSON implementation without modifying
-any globals.
-
-`stringify` and `parse` are merely exported without respect to whether or not a
-global `JSON` object exists.
-
-methods
-=======
-
-var json = require('jsonify');
-
-json.parse(source, reviver)
----------------------------
-
-Return a new javascript object from a parse of the `source` string.
-
-If a `reviver` function is specified, walk the structure passing each name/value
-pair to `reviver.call(parent, key, value)` to transform the `value` before
-parsing it.
-
-json.stringify(value, replacer, space)
---------------------------------------
-
-Return a string representation for `value`.
-
-If `replacer` is specified, walk the structure passing each name/value pair to
-`replacer.call(parent, key, value)` to transform the `value` before stringifying
-it.
-
-If `space` is a number, indent the result by that many spaces.
-If `space` is a string, use `space` as the indentation.
diff --git a/node_modules/jsonify/index.js b/node_modules/jsonify/index.js
deleted file mode 100644
index f728a1605..000000000
--- a/node_modules/jsonify/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-exports.parse = require('./lib/parse');
-exports.stringify = require('./lib/stringify');
diff --git a/node_modules/jsonify/lib/parse.js b/node_modules/jsonify/lib/parse.js
deleted file mode 100644
index 30e2f0143..000000000
--- a/node_modules/jsonify/lib/parse.js
+++ /dev/null
@@ -1,273 +0,0 @@
-var at, // The index of the current character
- ch, // The current character
- escapee = {
- '"': '"',
- '\\': '\\',
- '/': '/',
- b: '\b',
- f: '\f',
- n: '\n',
- r: '\r',
- t: '\t'
- },
- text,
-
- error = function (m) {
- // Call error when something is wrong.
- throw {
- name: 'SyntaxError',
- message: m,
- at: at,
- text: text
- };
- },
-
- next = function (c) {
- // If a c parameter is provided, verify that it matches the current character.
- if (c && c !== ch) {
- error("Expected '" + c + "' instead of '" + ch + "'");
- }
-
- // Get the next character. When there are no more characters,
- // return the empty string.
-
- ch = text.charAt(at);
- at += 1;
- return ch;
- },
-
- number = function () {
- // Parse a number value.
- var number,
- string = '';
-
- if (ch === '-') {
- string = '-';
- next('-');
- }
- while (ch >= '0' && ch <= '9') {
- string += ch;
- next();
- }
- if (ch === '.') {
- string += '.';
- while (next() && ch >= '0' && ch <= '9') {
- string += ch;
- }
- }
- if (ch === 'e' || ch === 'E') {
- string += ch;
- next();
- if (ch === '-' || ch === '+') {
- string += ch;
- next();
- }
- while (ch >= '0' && ch <= '9') {
- string += ch;
- next();
- }
- }
- number = +string;
- if (!isFinite(number)) {
- error("Bad number");
- } else {
- return number;
- }
- },
-
- string = function () {
- // Parse a string value.
- var hex,
- i,
- string = '',
- uffff;
-
- // When parsing for string values, we must look for " and \ characters.
- if (ch === '"') {
- while (next()) {
- if (ch === '"') {
- next();
- return string;
- } else if (ch === '\\') {
- next();
- if (ch === 'u') {
- uffff = 0;
- for (i = 0; i < 4; i += 1) {
- hex = parseInt(next(), 16);
- if (!isFinite(hex)) {
- break;
- }
- uffff = uffff * 16 + hex;
- }
- string += String.fromCharCode(uffff);
- } else if (typeof escapee[ch] === 'string') {
- string += escapee[ch];
- } else {
- break;
- }
- } else {
- string += ch;
- }
- }
- }
- error("Bad string");
- },
-
- white = function () {
-
-// Skip whitespace.
-
- while (ch && ch <= ' ') {
- next();
- }
- },
-
- word = function () {
-
-// true, false, or null.
-
- switch (ch) {
- case 't':
- next('t');
- next('r');
- next('u');
- next('e');
- return true;
- case 'f':
- next('f');
- next('a');
- next('l');
- next('s');
- next('e');
- return false;
- case 'n':
- next('n');
- next('u');
- next('l');
- next('l');
- return null;
- }
- error("Unexpected '" + ch + "'");
- },
-
- value, // Place holder for the value function.
-
- array = function () {
-
-// Parse an array value.
-
- var array = [];
-
- if (ch === '[') {
- next('[');
- white();
- if (ch === ']') {
- next(']');
- return array; // empty array
- }
- while (ch) {
- array.push(value());
- white();
- if (ch === ']') {
- next(']');
- return array;
- }
- next(',');
- white();
- }
- }
- error("Bad array");
- },
-
- object = function () {
-
-// Parse an object value.
-
- var key,
- object = {};
-
- if (ch === '{') {
- next('{');
- white();
- if (ch === '}') {
- next('}');
- return object; // empty object
- }
- while (ch) {
- key = string();
- white();
- next(':');
- if (Object.hasOwnProperty.call(object, key)) {
- error('Duplicate key "' + key + '"');
- }
- object[key] = value();
- white();
- if (ch === '}') {
- next('}');
- return object;
- }
- next(',');
- white();
- }
- }
- error("Bad object");
- };
-
-value = function () {
-
-// Parse a JSON value. It could be an object, an array, a string, a number,
-// or a word.
-
- white();
- switch (ch) {
- case '{':
- return object();
- case '[':
- return array();
- case '"':
- return string();
- case '-':
- return number();
- default:
- return ch >= '0' && ch <= '9' ? number() : word();
- }
-};
-
-// Return the json_parse function. It will have access to all of the above
-// functions and variables.
-
-module.exports = function (source, reviver) {
- var result;
-
- text = source;
- at = 0;
- ch = ' ';
- result = value();
- white();
- if (ch) {
- error("Syntax error");
- }
-
- // If there is a reviver function, we recursively walk the new structure,
- // passing each name/value pair to the reviver function for possible
- // transformation, starting with a temporary root object that holds the result
- // in an empty key. If there is not a reviver function, we simply return the
- // result.
-
- return typeof reviver === 'function' ? (function walk(holder, key) {
- var k, v, value = holder[key];
- if (value && typeof value === 'object') {
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- }
- }
- }
- return reviver.call(holder, key, value);
- }({'': result}, '')) : result;
-};
diff --git a/node_modules/jsonify/lib/stringify.js b/node_modules/jsonify/lib/stringify.js
deleted file mode 100644
index 134587081..000000000
--- a/node_modules/jsonify/lib/stringify.js
+++ /dev/null
@@ -1,154 +0,0 @@
-var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-function quote(string) {
- // If the string contains no control characters, no quote characters, and no
- // backslash characters, then we can safely slap some quotes around it.
- // Otherwise we must also replace the offending characters with safe escape
- // sequences.
-
- escapable.lastIndex = 0;
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
- var c = meta[a];
- return typeof c === 'string' ? c :
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- }) + '"' : '"' + string + '"';
-}
-
-function str(key, holder) {
- // Produce a string from holder[key].
- var i, // The loop counter.
- k, // The member key.
- v, // The member value.
- length,
- mind = gap,
- partial,
- value = holder[key];
-
- // If the value has a toJSON method, call it to obtain a replacement value.
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
- // If we were called with a replacer function, then call the replacer to
- // obtain a replacement value.
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
- // What happens next depends on the value's type.
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
- // JSON numbers must be finite. Encode non-finite numbers as null.
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
- // If the value is a boolean or null, convert it to a string. Note:
- // typeof null does not produce 'null'. The case is included here in
- // the remote chance that this gets fixed someday.
- return String(value);
-
- case 'object':
- if (!value) return 'null';
- gap += indent;
- partial = [];
-
- // Array.isArray
- if (Object.prototype.toString.apply(value) === '[object Array]') {
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
-
- // Join all of the elements together, separated with commas, and
- // wrap them in brackets.
- v = partial.length === 0 ? '[]' : gap ?
- '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
- '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
- // If the replacer is an array, use it to select the members to be
- // stringified.
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- k = rep[i];
- if (typeof k === 'string') {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
- else {
- // Otherwise, iterate through all of the keys in the object.
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
-
- // Join all of the member texts together, separated with commas,
- // and wrap them in braces.
-
- v = partial.length === 0 ? '{}' : gap ?
- '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
- '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
-}
-
-module.exports = function (value, replacer, space) {
- var i;
- gap = '';
- indent = '';
-
- // If the space parameter is a number, make an indent string containing that
- // many spaces.
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
- }
- // If the space parameter is a string, it will be used as the indent string.
- else if (typeof space === 'string') {
- indent = space;
- }
-
- // If there is a replacer, it must be a function or an array.
- // Otherwise, throw an error.
- rep = replacer;
- if (replacer && typeof replacer !== 'function'
- && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
-
- // Make a fake root object containing our value under the key of ''.
- // Return the result of stringifying the value.
- return str('', {'': value});
-};
diff --git a/node_modules/jsonify/package.json b/node_modules/jsonify/package.json
deleted file mode 100644
index 6d92f5c80..000000000
--- a/node_modules/jsonify/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "jsonify@~0.0.0",
- "_id": "jsonify@0.0.0",
- "_inBundle": false,
- "_integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
- "_location": "/jsonify",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "jsonify@~0.0.0",
- "name": "jsonify",
- "escapedName": "jsonify",
- "rawSpec": "~0.0.0",
- "saveSpec": null,
- "fetchSpec": "~0.0.0"
- },
- "_requiredBy": [
- "/json-stable-stringify"
- ],
- "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "_shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73",
- "_spec": "jsonify@~0.0.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/json-stable-stringify",
- "author": {
- "name": "Douglas Crockford",
- "url": "http://crockford.com/"
- },
- "bugs": {
- "url": "https://github.com/substack/jsonify/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "JSON without touching any globals",
- "devDependencies": {
- "garbage": "0.0.x",
- "tap": "0.0.x"
- },
- "directories": {
- "lib": ".",
- "test": "test"
- },
- "engines": {
- "node": "*"
- },
- "homepage": "https://github.com/substack/jsonify#readme",
- "keywords": [
- "json",
- "browser"
- ],
- "license": "Public Domain",
- "main": "index.js",
- "name": "jsonify",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/substack/jsonify.git"
- },
- "scripts": {
- "test": "tap test"
- },
- "version": "0.0.0"
-}
diff --git a/node_modules/jsonify/test/parse.js b/node_modules/jsonify/test/parse.js
deleted file mode 100644
index e2313f55a..000000000
--- a/node_modules/jsonify/test/parse.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var test = require('tap').test;
-var json = require('../');
-var garbage = require('garbage');
-
-test('parse', function (t) {
- for (var i = 0; i < 50; i++) {
- var s = JSON.stringify(garbage(50));
-
- t.deepEqual(
- json.parse(s),
- JSON.parse(s)
- );
- }
-
- t.end();
-});
diff --git a/node_modules/jsonify/test/stringify.js b/node_modules/jsonify/test/stringify.js
deleted file mode 100644
index 89b0b6703..000000000
--- a/node_modules/jsonify/test/stringify.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var test = require('tap').test;
-var json = require('../');
-var garbage = require('garbage');
-
-test('stringify', function (t) {
- for (var i = 0; i < 50; i++) {
- var obj = garbage(50);
- t.equal(
- json.stringify(obj),
- JSON.stringify(obj)
- );
- }
-
- t.end();
-});
diff --git a/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md b/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
index 7a6166428..10156d89a 100644
--- a/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
+++ b/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
@@ -10,7 +10,7 @@ Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
- [ ] `npm install && npm test` passes
- [ ] tests are included <!-- Bug fixes and new features should include tests -->
- [ ] documentation is changed or added
-- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#commit-message-guidelines)
+- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)
##### Description of change
<!-- Provide a description of the change -->
diff --git a/node_modules/node-gyp/CHANGELOG.md b/node_modules/node-gyp/CHANGELOG.md
index be052d1a2..33bbfad5d 100644
--- a/node_modules/node-gyp/CHANGELOG.md
+++ b/node_modules/node-gyp/CHANGELOG.md
@@ -1,3 +1,48 @@
+v3.8.0 2018-08-09
+=================
+
+* [[`c5929cb4fe`](https://github.com/nodejs/node-gyp/commit/c5929cb4fe)] - **doc**: update Xcode preferences tab name. (Ivan Daniluk) [#1330](https://github.com/nodejs/node-gyp/pull/1330)
+* [[`8b488da8b9`](https://github.com/nodejs/node-gyp/commit/8b488da8b9)] - **doc**: update link to commit guidelines (Jonas Hermsmeier) [#1456](https://github.com/nodejs/node-gyp/pull/1456)
+* [[`b4fe8c16f9`](https://github.com/nodejs/node-gyp/commit/b4fe8c16f9)] - **doc**: fix visual studio links (Bartosz Sosnowski) [#1490](https://github.com/nodejs/node-gyp/pull/1490)
+* [[`536759c7e9`](https://github.com/nodejs/node-gyp/commit/536759c7e9)] - **configure**: use sys.version\_info to get python version (Yang Guo) [#1504](https://github.com/nodejs/node-gyp/pull/1504)
+* [[`94c39c604e`](https://github.com/nodejs/node-gyp/commit/94c39c604e)] - **gyp**: fix ninja build failure (GYP patch) (Daniel Bevenius) [nodejs/node#12484](https://github.com/nodejs/node/pull/12484)
+* [[`e8ea74e0fa`](https://github.com/nodejs/node-gyp/commit/e8ea74e0fa)] - **tools**: patch gyp to avoid xcrun errors (Ujjwal Sharma) [nodejs/node#21520](https://github.com/nodejs/node/pull/21520)
+* [[`ea9aff44f2`](https://github.com/nodejs/node-gyp/commit/ea9aff44f2)] - **tools**: fix "the the" typos in comments (Masashi Hirano) [nodejs/node#20716](https://github.com/nodejs/node/pull/20716)
+* [[`207e5aa4fd`](https://github.com/nodejs/node-gyp/commit/207e5aa4fd)] - **gyp**: implement LD/LDXX for ninja and FIPS (Sam Roberts)
+* [[`b416c5f4b7`](https://github.com/nodejs/node-gyp/commit/b416c5f4b7)] - **gyp**: enable cctest to use objects (gyp part) (Daniel Bevenius) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450)
+* [[`40692d016b`](https://github.com/nodejs/node-gyp/commit/40692d016b)] - **gyp**: add compile\_commands.json gyp generator (Ben Noordhuis) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450)
+* [[`fc3c4e2b10`](https://github.com/nodejs/node-gyp/commit/fc3c4e2b10)] - **gyp**: float gyp patch for long filenames (Anna Henningsen) [nodejs/node#7963](https://github.com/nodejs/node/pull/7963)
+* [[`8aedbfdef6`](https://github.com/nodejs/node-gyp/commit/8aedbfdef6)] - **gyp**: backport GYP fix to fix AIX shared suffix (Stewart Addison)
+* [[`6cd84b84fc`](https://github.com/nodejs/node-gyp/commit/6cd84b84fc)] - **test**: formatting and minor fixes for execFileSync replacement (Rod Vagg) [#1521](https://github.com/nodejs/node-gyp/pull/1521)
+* [[`60e421363f`](https://github.com/nodejs/node-gyp/commit/60e421363f)] - **test**: added test/processExecSync.js for when execFileSync is not available. (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
+* [[`969447c5bd`](https://github.com/nodejs/node-gyp/commit/969447c5bd)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
+* [[`340403ccfe`](https://github.com/nodejs/node-gyp/commit/340403ccfe)] - **win**: improve parsing of SDK version (Alessandro Vergani) [#1516](https://github.com/nodejs/node-gyp/pull/1516)
+
+v3.7.0 2018-06-08
+=================
+
+* [[`84cea7b30d`](https://github.com/nodejs/node-gyp/commit/84cea7b30d)] - Remove unused gyp test scripts. (Ben Noordhuis) [#1458](https://github.com/nodejs/node-gyp/pull/1458)
+* [[`0540e4ec63`](https://github.com/nodejs/node-gyp/commit/0540e4ec63)] - **gyp**: escape spaces in filenames in make generator (Jeff Senn) [#1436](https://github.com/nodejs/node-gyp/pull/1436)
+* [[`88fc6fa0ec`](https://github.com/nodejs/node-gyp/commit/88fc6fa0ec)] - Drop dependency on minimatch. (Brian Woodward) [#1158](https://github.com/nodejs/node-gyp/pull/1158)
+* [[`1e203c5148`](https://github.com/nodejs/node-gyp/commit/1e203c5148)] - Fix include path when pointing to Node.js source (Richard Lau) [#1055](https://github.com/nodejs/node-gyp/pull/1055)
+* [[`53d8cb967c`](https://github.com/nodejs/node-gyp/commit/53d8cb967c)] - Prefix build targets with /t: on Windows (Natalie Wolfe) [#1164](https://github.com/nodejs/node-gyp/pull/1164)
+* [[`53a5f8ff38`](https://github.com/nodejs/node-gyp/commit/53a5f8ff38)] - **gyp**: add support for .mm files to msvs generator (Julien Racle) [#1167](https://github.com/nodejs/node-gyp/pull/1167)
+* [[`dd8561e528`](https://github.com/nodejs/node-gyp/commit/dd8561e528)] - **zos**: don't use universal-new-lines mode (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451)
+* [[`e5a69010ed`](https://github.com/nodejs/node-gyp/commit/e5a69010ed)] - **zos**: add search locations for libnode.x (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451)
+* [[`79febace53`](https://github.com/nodejs/node-gyp/commit/79febace53)] - **doc**: update macOS information in README (Josh Parnham) [#1323](https://github.com/nodejs/node-gyp/pull/1323)
+* [[`9425448945`](https://github.com/nodejs/node-gyp/commit/9425448945)] - **gyp**: don't print xcodebuild not found errors (Gibson Fahnestock) [#1370](https://github.com/nodejs/node-gyp/pull/1370)
+* [[`6f1286f5b2`](https://github.com/nodejs/node-gyp/commit/6f1286f5b2)] - Fix infinite install loop. (Ben Noordhuis) [#1384](https://github.com/nodejs/node-gyp/pull/1384)
+* [[`2580b9139e`](https://github.com/nodejs/node-gyp/commit/2580b9139e)] - Update `--nodedir` description in README. (Ben Noordhuis) [#1372](https://github.com/nodejs/node-gyp/pull/1372)
+* [[`a61360391a`](https://github.com/nodejs/node-gyp/commit/a61360391a)] - Update README with another way to install on windows (JeffAtDeere) [#1352](https://github.com/nodejs/node-gyp/pull/1352)
+* [[`47496bf6dc`](https://github.com/nodejs/node-gyp/commit/47496bf6dc)] - Fix IndexError when parsing GYP files. (Ben Noordhuis) [#1267](https://github.com/nodejs/node-gyp/pull/1267)
+* [[`b2024dee7b`](https://github.com/nodejs/node-gyp/commit/b2024dee7b)] - **zos**: support platform (John Barboza) [#1276](https://github.com/nodejs/node-gyp/pull/1276)
+* [[`90d86512f4`](https://github.com/nodejs/node-gyp/commit/90d86512f4)] - **win**: run PS with `-NoProfile` (Refael Ackermann) [#1292](https://github.com/nodejs/node-gyp/pull/1292)
+* [[`2da5f86ef7`](https://github.com/nodejs/node-gyp/commit/2da5f86ef7)] - **doc**: add github PR and Issue templates (Gibson Fahnestock) [#1228](https://github.com/nodejs/node-gyp/pull/1228)
+* [[`a46a770d68`](https://github.com/nodejs/node-gyp/commit/a46a770d68)] - **doc**: update proposed DCO and CoC (Mikeal Rogers) [#1229](https://github.com/nodejs/node-gyp/pull/1229)
+* [[`7e803d58e0`](https://github.com/nodejs/node-gyp/commit/7e803d58e0)] - **doc**: headerify the Install instructions (Nick Schonning) [#1225](https://github.com/nodejs/node-gyp/pull/1225)
+* [[`f27599193a`](https://github.com/nodejs/node-gyp/commit/f27599193a)] - **gyp**: update xml string encoding conversion (Liu Chao) [#1203](https://github.com/nodejs/node-gyp/pull/1203)
+* [[`0a07e481f7`](https://github.com/nodejs/node-gyp/commit/0a07e481f7)] - **configure**: don't set ensure if tarball is set (Gibson Fahnestock) [#1220](https://github.com/nodejs/node-gyp/pull/1220)
+
v3.6.3 2018-06-08
=================
diff --git a/node_modules/node-gyp/README.md b/node_modules/node-gyp/README.md
index bfb687d63..0fed03c54 100644
--- a/node_modules/node-gyp/README.md
+++ b/node_modules/node-gyp/README.md
@@ -42,7 +42,7 @@ You will also need to install:
* `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on macOS)
* [Xcode](https://developer.apple.com/xcode/download/)
- * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads` (or by running `xcode-select --install` in your Terminal)
+ * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Locations` (or by running `xcode-select --install` in your Terminal)
* This step will install `gcc` and the related toolchain containing `make`
### On Windows
@@ -54,22 +54,11 @@ Install all the required tools and configurations using Microsoft's [windows-bui
#### Option 2
Install tools and configuration manually:
- * Visual C++ Build Environment:
- * Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option.
-
- * Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions.
-
- * Option 3: if you already have Visual Studio 2015 installed and did not install the
- *Common Tools for Visual C++* during setup, you can `File -> New -> Project`, pick
- any of the options under `Templates -> Other Languages -> Visual C++` then `Ok`
- and Visual Studio will offer to install the *Common Tools for Visual C++* with a
- "Install Missing Features" / "You need the Universal Windows App Development Tools
- to develop Windows app projects." dialog.
-
- > :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
-
+ * Install Visual C++ Build Environment: [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)
+ (using "Visual C++ build tools" workload) or [Visual Studio 2017 Community](https://visualstudio.microsoft.com/pl/thank-you-downloading-visual-studio/?sku=Community)
+ (using the "Desktop development with C++" workload)
* Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)
- * Launch cmd, `npm config set msvs_version 2015`
+ * Launch cmd, `npm config set msvs_version 2017`
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
diff --git a/node_modules/node-gyp/gyp/AUTHORS b/node_modules/node-gyp/gyp/AUTHORS
index fecf84a1c..d76d8cd76 100644
--- a/node_modules/node-gyp/gyp/AUTHORS
+++ b/node_modules/node-gyp/gyp/AUTHORS
@@ -1,9 +1,10 @@
# Names should be added to this file like so:
# Name or Organization <email address>
-Google Inc.
-Bloomberg Finance L.P.
-Yandex LLC
+Google Inc. <*@google.com>
+Bloomberg Finance L.P. <*@bloomberg.net>
+IBM Inc. <*@*.ibm.com>
+Yandex LLC <*@yandex-team.ru>
Steven Knight <knight@baldmt.com>
Ryan Norton <rnorton10@gmail.com>
diff --git a/node_modules/node-gyp/gyp/PRESUBMIT.py b/node_modules/node-gyp/gyp/PRESUBMIT.py
index dde025383..f6c8a357a 100644
--- a/node_modules/node-gyp/gyp/PRESUBMIT.py
+++ b/node_modules/node-gyp/gyp/PRESUBMIT.py
@@ -73,23 +73,15 @@ PYLINT_DISABLED_WARNINGS = [
]
-def CheckChangeOnUpload(input_api, output_api):
- report = []
- report.extend(input_api.canned_checks.PanProjectChecks(
- input_api, output_api))
- return report
-
-
-def CheckChangeOnCommit(input_api, output_api):
- report = []
-
+def _LicenseHeader(input_api):
# Accept any year number from 2009 to the current year.
current_year = int(input_api.time.strftime('%Y'))
allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1)))
+
years_re = '(' + '|'.join(allowed_years) + ')'
# The (c) is deprecated, but tolerate it until it's removed from all files.
- license = (
+ return (
r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
r'.*? Use of this source code is governed by a BSD-style license that '
r'can be\n'
@@ -98,8 +90,18 @@ def CheckChangeOnCommit(input_api, output_api):
'year': years_re,
}
+def CheckChangeOnUpload(input_api, output_api):
+ report = []
+ report.extend(input_api.canned_checks.PanProjectChecks(
+ input_api, output_api, license_header=_LicenseHeader(input_api)))
+ return report
+
+
+def CheckChangeOnCommit(input_api, output_api):
+ report = []
+
report.extend(input_api.canned_checks.PanProjectChecks(
- input_api, output_api, license_header=license))
+ input_api, output_api, license_header=_LicenseHeader(input_api)))
report.extend(input_api.canned_checks.CheckTreeIsOpen(
input_api, output_api,
'http://gyp-status.appspot.com/status',
diff --git a/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
index 4985756bd..a08cc154d 100644
--- a/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
+++ b/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
@@ -417,7 +417,7 @@ def FixVCMacroSlashes(s):
def ConvertVCMacrosToMSBuild(s):
- """Convert the the MSVS macros found in the string to the MSBuild equivalent.
+ """Convert the MSVS macros found in the string to the MSBuild equivalent.
This list is probably not exhaustive. Add as needed.
"""
diff --git a/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
index 8990057a0..fe801b77c 100644
--- a/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
@@ -19,7 +19,7 @@
#
# Global settings and utility functions are currently stuffed in the
# toplevel Makefile. It may make sense to generate some .mk files on
-# the side to keep the the files readable.
+# the side to keep the files readable.
import os
import re
@@ -31,6 +31,8 @@ import gyp.xcode_emulation
from gyp.common import GetEnvironFallback
from gyp.common import GypError
+import hashlib
+
generator_default_variables = {
'EXECUTABLE_PREFIX': '',
'EXECUTABLE_SUFFIX': '',
@@ -90,7 +92,10 @@ def CalculateVariables(default_variables, params):
if flavor == 'android':
operating_system = 'linux' # Keep this legacy behavior for now.
default_variables.setdefault('OS', operating_system)
- default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
+ if flavor == 'aix':
+ default_variables.setdefault('SHARED_LIB_SUFFIX', '.a')
+ else:
+ default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
default_variables.setdefault('SHARED_LIB_DIR','$(builddir)/lib.$(TOOLSET)')
default_variables.setdefault('LIB_DIR', '$(obj).$(TOOLSET)')
@@ -142,7 +147,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
+cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
@@ -1369,7 +1374,10 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
if target[:3] == 'lib':
target = target[3:]
target_prefix = 'lib'
- target_ext = '.so'
+ if self.flavor == 'aix':
+ target_ext = '.a'
+ else:
+ target_ext = '.so'
elif self.type == 'none':
target = '%s.stamp' % target
elif self.type != 'executable':
@@ -1765,7 +1773,10 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
# actual command.
# - The intermediate recipe will 'touch' the intermediate file.
# - The multi-output rule will have an do-nothing recipe.
- intermediate = "%s.intermediate" % (command if command else self.target)
+
+ # Hash the target name to avoid generating overlong filenames.
+ cmddigest = hashlib.sha1(command if command else self.target).hexdigest()
+ intermediate = "%s.intermediate" % cmddigest
self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
self.WriteLn('\t%s' % '@:');
self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate))
diff --git a/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
index 4ee2bd1b4..a00573ebf 100644
--- a/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
+++ b/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
@@ -140,7 +140,7 @@ class Target(object):
# On Windows, incremental linking requires linking against all the .objs
# that compose a .lib (rather than the .lib itself). That list is stored
# here. In this case, we also need to save the compile_deps for the target,
- # so that the the target that directly depends on the .objs can also depend
+ # so that the target that directly depends on the .objs can also depend
# on those.
self.component_objs = None
self.compile_deps = None
@@ -1873,6 +1873,10 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
ld = os.path.join(build_to_root, value)
if key == 'LD.host':
ld_host = os.path.join(build_to_root, value)
+ if key == 'LDXX':
+ ldxx = os.path.join(build_to_root, value)
+ if key == 'LDXX.host':
+ ldxx_host = os.path.join(build_to_root, value)
if key == 'NM':
nm = os.path.join(build_to_root, value)
if key == 'NM.host':
@@ -1962,6 +1966,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
CommandWithWrapper('CXX.host', wrappers, cxx_host))
if flavor == 'win':
master_ninja.variable('ld_host', ld_host)
+ master_ninja.variable('ldxx_host', ldxx_host)
else:
master_ninja.variable('ld_host', CommandWithWrapper(
'LINK', wrappers, ld_host))
@@ -2086,13 +2091,13 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
restat=True,
command=mtime_preserving_solink_base % {'suffix': '@$link_file_list'},
rspfile='$link_file_list',
- rspfile_content='-Wl,--start-group $in -Wl,--end-group $solibs $libs',
+ rspfile_content='-Wl,--start-group $in $solibs $libs -Wl,--end-group',
pool='link_pool')
master_ninja.rule(
'link',
description='LINK $out',
command=('$ld $ldflags -o $out '
- '-Wl,--start-group $in -Wl,--end-group $solibs $libs'),
+ '-Wl,--start-group $in $solibs $libs -Wl,--end-group'),
pool='link_pool')
elif flavor == 'win':
master_ninja.rule(
diff --git a/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
index 4321f6089..69f7d97cf 100644
--- a/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+++ b/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
@@ -233,6 +233,9 @@ class XcodeSettings(object):
def _IsIosWatchApp(self):
return int(self.spec.get('ios_watch_app', 0)) != 0
+ def _IsXCTest(self):
+ return int(self.spec.get('mac_xctest_bundle', 0)) != 0
+
def GetFrameworkVersion(self):
"""Returns the framework version of the current target. Only valid for
bundles."""
@@ -568,6 +571,11 @@ class XcodeSettings(object):
cflags += self._Settings().get('WARNING_CFLAGS', [])
+ if self._IsXCTest():
+ platform_root = self._XcodePlatformPath(configname)
+ if platform_root:
+ cflags.append('-F' + platform_root + '/Developer/Library/Frameworks/')
+
if sdk_root:
framework_root = sdk_root
else:
@@ -831,6 +839,11 @@ class XcodeSettings(object):
for directory in framework_dirs:
ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
+ if self._IsXCTest():
+ platform_root = self._XcodePlatformPath(configname)
+ if platform_root:
+ cflags.append('-F' + platform_root + '/Developer/Library/Frameworks/')
+
is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension()
if sdk_root and is_extension:
# Adds the link flags for extensions. These flags are common for all
diff --git a/node_modules/node-gyp/lib/Find-VS2017.cs b/node_modules/node-gyp/lib/Find-VS2017.cs
index 87e0a9c9b..6e7429b77 100644
--- a/node_modules/node-gyp/lib/Find-VS2017.cs
+++ b/node_modules/node-gyp/lib/Find-VS2017.cs
@@ -232,7 +232,9 @@ namespace VisualStudioConfiguration
string[] parts = id.Substring(Win10SDKPrefix.Length).Split('.');
if (parts.Length > 1 && parts[1] != "Desktop")
continue;
- Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(parts[0]));
+ uint foundSdkVer;
+ if (UInt32.TryParse(parts[0], out foundSdkVer))
+ Win10SDKVer = Math.Max(Win10SDKVer, foundSdkVer);
} else if (id == "Microsoft.VisualStudio.Component.Windows81SDK")
hasWin8SDK = true;
else
diff --git a/node_modules/node-gyp/lib/configure.js b/node_modules/node-gyp/lib/configure.js
index f4820b514..35e6787d1 100644
--- a/node_modules/node-gyp/lib/configure.js
+++ b/node_modules/node-gyp/lib/configure.js
@@ -448,7 +448,7 @@ PythonFinder.prototype = {
},
checkPythonVersion: function checkPythonVersion () {
- var args = ['-c', 'import platform; print(platform.python_version());']
+ var args = ['-c', 'import sys; print "%s.%s.%s" % sys.version_info[:3];']
var env = extend({}, this.env)
env.TERM = 'dumb'
@@ -460,14 +460,6 @@ PythonFinder.prototype = {
'`%s -c "' + args[1] + '"` returned: %j',
this.python, stdout)
var version = stdout.trim()
- if (~version.indexOf('+')) {
- this.log.silly('stripping "+" sign(s) from version')
- version = version.replace(/\+/g, '')
- }
- if (~version.indexOf('rc')) {
- this.log.silly('stripping "rc" identifier from version')
- version = version.replace(/rc(.*)$/ig, '')
- }
var range = semver.Range('>=2.5.0 <3.0.0')
var valid = false
try {
diff --git a/node_modules/node-gyp/node_modules/ajv/.tonic_example.js b/node_modules/node-gyp/node_modules/ajv/.tonic_example.js
deleted file mode 100644
index 0c3cc86ce..000000000
--- a/node_modules/node-gyp/node_modules/ajv/.tonic_example.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var Ajv = require('ajv');
-var ajv = Ajv({allErrors: true});
-
-var schema = {
- "properties": {
- "foo": { "type": "string" },
- "bar": { "type": "number", "maximum": 3 }
- }
-};
-
-var validate = ajv.compile(schema);
-
-test({"foo": "abc", "bar": 2});
-test({"foo": 2, "bar": 4});
-
-function test(data) {
- var valid = validate(data);
- if (valid) console.log('Valid!');
- else console.log('Invalid: ' + ajv.errorsText(validate.errors));
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/ajv/LICENSE b/node_modules/node-gyp/node_modules/ajv/LICENSE
deleted file mode 100644
index 810539685..000000000
--- a/node_modules/node-gyp/node_modules/ajv/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Evgeny Poberezkin
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/node_modules/node-gyp/node_modules/ajv/README.md b/node_modules/node-gyp/node_modules/ajv/README.md
deleted file mode 100644
index 9d4fcbb9c..000000000
--- a/node_modules/node-gyp/node_modules/ajv/README.md
+++ /dev/null
@@ -1,1213 +0,0 @@
-<img align="right" alt="Ajv logo" width="160" src="http://epoberezkin.github.io/ajv/images/ajv_logo.png">
-
-# Ajv: Another JSON Schema Validator
-
-The fastest JSON Schema validator for node.js and browser. Supports [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals).
-
-
-[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv)
-[![npm version](https://badge.fury.io/js/ajv.svg)](https://www.npmjs.com/package/ajv)
-[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv)
-[![Code Climate](https://codeclimate.com/github/epoberezkin/ajv/badges/gpa.svg)](https://codeclimate.com/github/epoberezkin/ajv)
-[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master)
-[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
-
-
-__Please note__: You can start using NEW beta version [5.0.4](https://github.com/epoberezkin/ajv/releases/tag/5.0.4-beta.3) (see [migration guide from 4.x.x](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0)) with the support of JSON-Schema draft-06 (not officially published yet): `npm install ajv@^5.0.4-beta`.
-
-Also see [docs](https://github.com/epoberezkin/ajv/tree/5.0.4-beta.3) for 5.0.4.
-
-
-## Contents
-
-- [Performance](#performance)
-- [Features](#features)
-- [Getting started](#getting-started)
-- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md)
-- [Using in browser](#using-in-browser)
-- [Command line interface](#command-line-interface)
-- Validation
- - [Keywords](#validation-keywords)
- - [Formats](#formats)
- - [$data reference](#data-reference)
- - NEW: [$merge and $patch keywords](#merge-and-patch-keywords)
- - [Defining custom keywords](#defining-custom-keywords)
- - [Asynchronous schema compilation](#asynchronous-compilation)
- - [Asynchronous validation](#asynchronous-validation)
-- Modifying data during validation
- - [Filtering data](#filtering-data)
- - [Assigning defaults](#assigning-defaults)
- - [Coercing data types](#coercing-data-types)
-- API
- - [Methods](#api)
- - [Options](#options)
- - [Validation errors](#validation-errors)
-- [Related packages](#related-packages)
-- [Packages using Ajv](#some-packages-using-ajv)
-- [Tests, Contributing, History, License](#tests)
-
-
-## Performance
-
-Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON schemas into super-fast validation functions that are efficient for v8 optimization.
-
-Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
-
-- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
-- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
-- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
-- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
-
-
-Performace of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
-
-[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:%7Cajv%7Cis-my-json-valid%7Cjsen%7Cschemasaurus%7Cthemis%7Cz-schema%7Cjsck%7Cjsonschema%7Cskeemas%7Ctv4%7Cjayschema&chd=t:100,68,61,22.8,17.6,6.6,2.7,0.9,0.7,0.4,0.1)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
-
-
-## Features
-
-- Ajv implements full [JSON Schema draft 4](http://json-schema.org/) standard:
- - all validation keywords (see [JSON-Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md))
- - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available)
- - support of circular references between schemas
- - correct string lengths for strings with unicode pairs (can be turned off)
- - [formats](#formats) defined by JSON Schema draft 4 standard and custom formats (can be turned off)
- - [validates schemas against meta-schema](#api-validateschema)
-- supports [browsers](#using-in-browser) and nodejs 0.10-6.x
-- [asynchronous loading](#asynchronous-compilation) of referenced schemas during compilation
-- "All errors" validation mode with [option allErrors](#options)
-- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages
-- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package
-- [filtering data](#filtering-data) from additional properties
-- [assigning defaults](#assigning-defaults) to missing properties and items
-- [coercing data](#coercing-data-types) to the types specified in `type` keywords
-- [custom keywords](#defining-custom-keywords)
-- keywords `switch`, `constant`, `contains`, `patternGroups`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [option v5](#options)
-- [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) for schemas using v5 keywords
-- [v5 $data reference](#data-reference) to use values from the validated data as values for the schema keywords
-- [asynchronous validation](#asynchronous-validation) of custom formats and keywords
-
-Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript).
-
-
-## Install
-
-```
-npm install ajv
-```
-
-To install a stable beta version [5.0.4](https://github.com/epoberezkin/ajv/releases/tag/5.0.4-beta.3) (see [migration guide from 4.x.x](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0)):
-
-```
-npm install ajv@^5.0.4-beta
-```
-
-
-## <a name="usage"></a>Getting started
-
-Try it in the node REPL: https://tonicdev.com/npm/ajv
-
-
-The fastest validation call:
-
-```javascript
-var Ajv = require('ajv');
-var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true}
-var validate = ajv.compile(schema);
-var valid = validate(data);
-if (!valid) console.log(validate.errors);
-```
-
-or with less code
-
-```javascript
-// ...
-var valid = ajv.validate(schema, data);
-if (!valid) console.log(ajv.errors);
-// ...
-```
-
-or
-
-```javascript
-// ...
-ajv.addSchema(schema, 'mySchema');
-var valid = ajv.validate('mySchema', data);
-if (!valid) console.log(ajv.errorsText());
-// ...
-```
-
-See [API](#api) and [Options](#options) for more details.
-
-Ajv compiles schemas to functions and caches them in all cases (using schema stringified with [json-stable-stringify](https://github.com/substack/json-stable-stringify) as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again.
-
-The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call).
-
-__Please note__: every time validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors)
-
-
-## Using in browser
-
-You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle.
-
-If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)).
-
-Then you need to load Ajv in the browser:
-```html
-<script src="ajv.min.js"></script>
-```
-
-This bundle can be used with different module systems or creates global `Ajv` if no module system is found.
-
-The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv).
-
-Ajv is tested with these browsers:
-
-[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin)
-
-__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)).
-
-
-## Command line interface
-
-CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports:
-
-- compiling JSON-schemas to test their validity
-- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack))
-- validating data file(s) against JSON-schema
-- testing expected validity of data against JSON-schema
-- referenced schemas
-- custom meta-schemas
-- files in JSON and JavaScript format
-- all Ajv options
-- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format
-
-
-## Validation keywords
-
-Ajv supports all validation keywords from draft 4 of JSON-schema standard:
-
-- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type)
-- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf
-- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format
-- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems
-- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minproperties, required, properties, patternProperties, additionalProperties, dependencies
-- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, not, oneOf, anyOf, allOf
-
-With option `v5: true` Ajv also supports all validation keywords and [$data reference](#data-reference) from [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard:
-
-- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-v5-proposal) - conditional validation with a sequence of if/then clauses
-- [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains-v5-proposal) - check that array contains a valid item
-- [constant](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#constant-v5-proposal) - check that data is equal to some value
-- [patternGroups](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patterngroups-v5-proposal) - a more powerful alternative to patternProperties
-- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-v5-proposal) - like `required` but with patterns that some property should match.
-- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-v5-proposal) - setting limits for date, time, etc.
-
-See [JSON-Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details.
-
-
-## Formats
-
-The following formats are supported for string validation with "format" keyword:
-
-- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
-- _time_: time with optional time-zone.
-- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)).
-- _uri_: full uri with optional protocol.
-- _email_: email address.
-- _hostname_: host name acording to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
-- _ipv4_: IP address v4.
-- _ipv6_: IP address v6.
-- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor.
-- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122).
-- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901).
-- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00).
-
-There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `email`, and `hostname`. See [Options](#options) for details.
-
-You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method.
-
-The option `unknownFormats` allows to change the behaviour in case an unknown format is encountered - Ajv can either ignore them (default now) or fail schema compilation (will be the default in 5.0.0).
-
-You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js).
-
-
-## $data reference
-
-With `v5` option you can use values from the validated data as the values for the schema keywords. See [v5 proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works.
-
-`$data` reference is supported in the keywords: constant, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems.
-
-The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema).
-
-Examples.
-
-This schema requires that the value in property `smaller` is less or equal than the value in the property larger:
-
-```javascript
-var schema = {
- "properties": {
- "smaller": {
- "type": "number",
- "maximum": { "$data": "1/larger" }
- },
- "larger": { "type": "number" }
- }
-};
-
-var validData = {
- smaller: 5,
- larger: 7
-};
-```
-
-This schema requires that the properties have the same format as their field names:
-
-```javascript
-var schema = {
- "additionalProperties": {
- "type": "string",
- "format": { "$data": "0#" }
- }
-};
-
-var validData = {
- 'date-time': '1963-06-19T08:30:06.283185Z',
- email: 'joe.bloggs@example.com'
-}
-```
-
-`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `constant` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails.
-
-
-## $merge and $patch keywords
-
-With v5 option and the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902).
-
-To add keywords `$merge` and `$patch` to Ajv instance use this code:
-
-```javascript
-require('ajv-merge-patch')(ajv);
-```
-
-Examples.
-
-Using `$merge`:
-
-```json
-{
- "$merge": {
- "source": {
- "type": "object",
- "properties": { "p": { "type": "string" } },
- "additionalProperties": false
- },
- "with": {
- "properties": { "q": { "type": "number" } }
- }
- }
-}
-```
-
-Using `$patch`:
-
-```json
-{
- "$patch": {
- "source": {
- "type": "object",
- "properties": { "p": { "type": "string" } },
- "additionalProperties": false
- },
- "with": [
- { "op": "add", "path": "/properties/q", "value": { "type": "number" } }
- ]
- }
-}
-```
-
-The schemas above are equivalent to this schema:
-
-```json
-{
- "type": "object",
- "properties": {
- "p": { "type": "string" },
- "q": { "type": "number" }
- },
- "additionalProperties": false
-}
-```
-
-The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema.
-
-See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information.
-
-
-## Defining custom keywords
-
-The advantages of using custom keywords are:
-
-- allow creating validation scenarios that cannot be expressed using JSON-Schema
-- simplify your schemas
-- help bringing a bigger part of the validation logic to your schemas
-- make your schemas more expressive, less verbose and closer to your application domain
-- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated
-
-If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result).
-
-The concerns you have to be aware of when extending JSON-schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas.
-
-You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords.
-
-Ajv allows defining keywords with:
-- validation function
-- compilation function
-- macro function
-- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema.
-
-Example. `range` and `exclusiveRange` keywords using compiled schema:
-
-```javascript
-ajv.addKeyword('range', { type: 'number', compile: function (sch, parentSchema) {
- var min = sch[0];
- var max = sch[1];
-
- return parentSchema.exclusiveRange === true
- ? function (data) { return data > min && data < max; }
- : function (data) { return data >= min && data <= max; }
-} });
-
-var schema = { "range": [2, 4], "exclusiveRange": true };
-var validate = ajv.compile(schema);
-console.log(validate(2.01)); // true
-console.log(validate(3.99)); // true
-console.log(validate(2)); // false
-console.log(validate(4)); // false
-```
-
-Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords.
-
-See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details.
-
-
-## Asynchronous compilation
-
-During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` method and `loadSchema` [option](#options).
-
-Example:
-
-```javascript
-var ajv = new Ajv({ loadSchema: loadSchema });
-
-ajv.compileAsync(schema, function (err, validate) {
- if (err) return;
- var valid = validate(data);
-});
-
-function loadSchema(uri, callback) {
- request.json(uri, function(err, res, body) {
- if (err || res.statusCode >= 400)
- callback(err || new Error('Loading error: ' + res.statusCode));
- else
- callback(null, body);
- });
-}
-```
-
-__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work.
-
-
-## Asynchronous validation
-
-Example in node REPL: https://tonicdev.com/esp/ajv-asynchronous-validation
-
-You can define custom formats and keywords that perform validation asyncronously by accessing database or some service. You should add `async: true` in the keyword or format defnition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)).
-
-If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation.
-
-__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail.
-
-Validation function for an asynchronous custom format/keyword should return a promise that resolves to `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [generator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) (default) that can be optionally transpiled with [regenerator](https://github.com/facebook/regenerator) or to [es7 async function](http://tc39.github.io/ecmascript-asyncawait/) that can be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options).
-
-The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both syncronous and asynchronous schemas.
-
-If you are using generators, the compiled validation function can be either wrapped with [co](https://github.com/tj/co) (default) or returned as generator function, that can be used directly, e.g. in [koa](http://koajs.com/) 1.0. `co` is a small library, it is included in Ajv (both as npm dependency and in the browser bundle).
-
-Generator functions are currently supported in Chrome, Firefox and node.js (0.11+); if you are using Ajv in other browsers or in older versions of node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it.
-
-Validation result will be a promise that resolves to `true` or rejects with an exception `Ajv.ValidationError` that has the array of validation errors in `errors` property.
-
-
-Example:
-
-```javascript
-/**
- * without "async" and "transpile" options (or with option {async: true})
- * Ajv will choose the first supported/installed option in this order:
- * 1. native generator function wrapped with co
- * 2. es7 async functions transpiled with nodent
- * 3. es7 async functions transpiled with regenerator
- */
-
-var ajv = new Ajv;
-
-ajv.addKeyword('idExists', {
- async: true,
- type: 'number',
- validate: checkIdExists
-});
-
-
-function checkIdExists(schema, data) {
- return knex(schema.table)
- .select('id')
- .where('id', data)
- .then(function (rows) {
- return !!rows.length; // true if record is found
- });
-}
-
-var schema = {
- "$async": true,
- "properties": {
- "userId": {
- "type": "integer",
- "idExists": { "table": "users" }
- },
- "postId": {
- "type": "integer",
- "idExists": { "table": "posts" }
- }
- }
-};
-
-var validate = ajv.compile(schema);
-
-validate({ userId: 1, postId: 19 }))
-.then(function (valid) {
- // "valid" is always true here
- console.log('Data is valid');
-})
-.catch(function (err) {
- if (!(err instanceof Ajv.ValidationError)) throw err;
- // data is invalid
- console.log('Validation errors:', err.errors);
-});
-
-```
-
-### Using transpilers with asyncronous validation functions.
-
-To use a transpiler you should separately install it (or load its bundle in the browser).
-
-Ajv npm package includes minified browser bundles of regenerator and nodent in dist folder.
-
-
-#### Using nodent
-
-```javascript
-var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' });
-var validate = ajv.compile(schema); // transpiled es7 async function
-validate(data).then(successFunc).catch(errorFunc);
-```
-
-`npm install nodent` or use `nodent.min.js` from dist folder of npm package.
-
-
-#### Using regenerator
-
-```javascript
-var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' });
-var validate = ajv.compile(schema); // transpiled es7 async function
-validate(data).then(successFunc).catch(errorFunc);
-```
-
-`npm install regenerator` or use `regenerator.min.js` from dist folder of npm package.
-
-
-#### Using other transpilers
-
-```javascript
-var ajv = new Ajv({ async: 'es7', transpile: transpileFunc });
-var validate = ajv.compile(schema); // transpiled es7 async function
-validate(data).then(successFunc).catch(errorFunc);
-```
-
-See [Options](#options).
-
-
-#### Comparison of async modes
-
-|mode|transpile<br>speed*|run-time<br>speed*|bundle<br>size|
-|---|:-:|:-:|:-:|
-|generators<br>(native)|-|1.0|-|
-|es7.nodent|1.35|1.1|183Kb|
-|es7.regenerator|1.0|2.7|322Kb|
-|regenerator|1.0|3.2|322Kb|
-
-\* Relative performance in node v.4, smaller is better.
-
-[nodent](https://github.com/MatAtBread/nodent) has several advantages:
-
-- much smaller browser bundle than regenerator
-- almost the same performance of generated code as native generators in nodejs and the latest Chrome
-- much better performace than native generators in other browsers
-- works in IE 9 (regenerator does not)
-
-[regenerator](https://github.com/facebook/regenerator) is a more widely adopted alternative.
-
-
-## Filtering data
-
-With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation.
-
-This option modifies original data.
-
-Example:
-
-```javascript
-var ajv = new Ajv({ removeAdditional: true });
-var schema = {
- "additionalProperties": false,
- "properties": {
- "foo": { "type": "number" },
- "bar": {
- "additionalProperties": { "type": "number" },
- "properties": {
- "baz": { "type": "string" }
- }
- }
- }
-}
-
-var data = {
- "foo": 0,
- "additional1": 1, // will be removed; `additionalProperties` == false
- "bar": {
- "baz": "abc",
- "additional2": 2 // will NOT be removed; `additionalProperties` != false
- },
-}
-
-var validate = ajv.compile(schema);
-
-console.log(validate(data)); // true
-console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 }
-```
-
-If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed.
-
-If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed).
-
-__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example:
-
-```json
-{
- "type": "object",
- "oneOf": [
- {
- "properties": {
- "foo": { "type": "string" }
- },
- "required": [ "foo" ],
- "additionalProperties": false
- },
- {
- "properties": {
- "bar": { "type": "integer" }
- },
- "required": [ "bar" ],
- "additionalProperties": false
- }
- ]
-}
-```
-
-The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties.
-
-With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema).
-
-While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way:
-
-```json
-{
- "type": "object",
- "properties": {
- "foo": { "type": "string" },
- "bar": { "type": "integer" }
- },
- "additionalProperties": false,
- "oneOf": [
- { "required": [ "foo" ] },
- { "required": [ "bar" ] }
- ]
-}
-```
-
-The schema above is also more efficient - it will compile into a faster function.
-
-
-## Assigning defaults
-
-With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items.
-
-This option modifies original data.
-
-__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema.
-
-If you need to insert the default value in the data by reference pass the option `useDefaults: "shared"`.
-
-Inserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below.
-
-
-Example 1 (`default` in `properties`):
-
-```javascript
-var ajv = new Ajv({ useDefaults: true });
-var schema = {
- "type": "object",
- "properties": {
- "foo": { "type": "number" },
- "bar": { "type": "string", "default": "baz" }
- },
- "required": [ "foo", "bar" ]
-};
-
-var data = { "foo": 1 };
-
-var validate = ajv.compile(schema);
-
-console.log(validate(data)); // true
-console.log(data); // { "foo": 1, "bar": "baz" }
-```
-
-Example 2 (`default` in `items`):
-
-```javascript
-var schema = {
- "type": "array",
- "items": [
- { "type": "number" },
- { "type": "string", "default": "foo" }
- ]
-}
-
-var data = [ 1 ];
-
-var validate = ajv.compile(schema);
-
-console.log(validate(data)); // true
-console.log(data); // [ 1, "foo" ]
-```
-
-Example 3 (inserting "defaults" by reference):
-
-```javascript
-var ajv = new Ajv({ useDefaults: 'shared' });
-
-var schema = {
- properties: {
- foo: {
- default: { bar: 1 }
- }
- }
-}
-
-var validate = ajv.compile(schema);
-
-var data = {};
-console.log(validate(data)); // true
-console.log(data); // { foo: { bar: 1 } }
-
-data.foo.bar = 2;
-
-var data2 = {};
-console.log(validate(data2)); // true
-console.log(data2); // { foo: { bar: 2 } }
-```
-
-`default` keywords in other cases are ignored:
-
-- not in `properties` or `items` subschemas
-- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42))
-- in `if` subschema of v5 `switch` keyword
-- in schemas generated by custom macro keywords
-
-
-## Coercing data types
-
-When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards.
-
-This option modifies original data.
-
-__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value.
-
-
-Example 1:
-
-```javascript
-var ajv = new Ajv({ coerceTypes: true });
-var schema = {
- "type": "object",
- "properties": {
- "foo": { "type": "number" },
- "bar": { "type": "boolean" }
- },
- "required": [ "foo", "bar" ]
-};
-
-var data = { "foo": "1", "bar": "false" };
-
-var validate = ajv.compile(schema);
-
-console.log(validate(data)); // true
-console.log(data); // { "foo": 1, "bar": false }
-```
-
-Example 2 (array coercions):
-
-```javascript
-var ajv = new Ajv({ coerceTypes: 'array' });
-var schema = {
- "properties": {
- "foo": { "type": "array", "items": { "type": "number" } },
- "bar": { "type": "boolean" }
- }
-};
-
-var data = { "foo": "1", "bar": ["false"] };
-
-var validate = ajv.compile(schema);
-
-console.log(validate(data)); // true
-console.log(data); // { "foo": [1], "bar": false }
-```
-
-The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords).
-
-See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details.
-
-
-## API
-
-##### new Ajv(Object options) -&gt; Object
-
-Create Ajv instance.
-
-All the instance methods below are bound to the instance, so they can be used without the instance.
-
-
-##### .compile(Object schema) -&gt; Function&lt;Object data&gt;
-
-Generate validating function and cache the compiled schema for future use.
-
-Validating function returns boolean and has properties `errors` with the errors from the last validation (`null` if there were no errors) and `schema` with the reference to the original schema.
-
-Unless the option `validateSchema` is false, the schema will be validated against meta-schema and if schema is invalid the error will be thrown. See [options](#options).
-
-
-##### .compileAsync(Object schema, Function callback)
-
-Asyncronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. Callback will always be called with 2 parameters: error (or null) and validating function. Error will be not null in the following cases:
-
-- missing schema can't be loaded (`loadSchema` calls callback with error).
-- the schema containing missing reference is loaded, but the reference cannot be resolved.
-- schema (or some referenced schema) is invalid.
-
-The function compiles schema and loads the first missing schema multiple times, until all missing schemas are loaded.
-
-See example in [Asynchronous compilation](#asynchronous-compilation).
-
-
-##### .validate(Object schema|String key|String ref, data) -&gt; Boolean
-
-Validate data using passed schema (it will be compiled and cached).
-
-Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference.
-
-Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors).
-
-__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later.
-
-If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation).
-
-
-##### .addSchema(Array&lt;Object&gt;|Object schema [, String key])
-
-Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole.
-
-Array of schemas can be passed (schemas should have ids), the second parameter will be ignored.
-
-Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key.
-
-
-Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data.
-
-Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time.
-
-By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option.
-
-
-##### .addMetaSchema(Array&lt;Object&gt;|Object schema [, String key])
-
-Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option).
-
-There is no need to explicitly add draft 4 meta schema (http://json-schema.org/draft-04/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`.
-
-With option `v5: true` [meta-schema that includes v5 keywords](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json) also added.
-
-
-##### <a name="api-validateschema"></a>.validateSchema(Object schema) -&gt; Boolean
-
-Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON-Schema standard.
-
-By default this method is called automatically when the schema is added, so you rarely need to use it directly.
-
-If schema doesn't have `$schema` property it is validated against draft 4 meta-schema (option `meta` should not be false) or against [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) if option `v5` is true.
-
-If schema has `$schema` property then the schema with this id (that should be previously added) is used to validate passed schema.
-
-Errors will be available at `ajv.errors`.
-
-
-##### .getSchema(String key) -&gt; Function&lt;Object data&gt;
-
-Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). Returned validating function has `schema` property with the reference to the original schema.
-
-
-##### .removeSchema([Object schema|String key|String ref|RegExp pattern])
-
-Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references.
-
-Schema can be removed using:
-- key passed to `addSchema`
-- it's full reference (id)
-- RegExp that should match schema id or key (meta-schemas won't be removed)
-- actual schema object that will be stable-stringified to remove schema from cache
-
-If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared.
-
-
-##### <a name="api-addformat"></a>.addFormat(String name, String|RegExp|Function|Object format)
-
-Add custom format to validate strings. It can also be used to replace pre-defined formats for Ajv instance.
-
-Strings are converted to RegExp.
-
-Function should return validation result as `true` or `false`.
-
-If object is passed it should have properties `validate`, `compare` and `async`:
-
-- _validate_: a string, RegExp or a function as described above.
-- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (from [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) - `v5` option should be used). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal.
-- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`.
-
-Custom formats can be also added via `formats` option.
-
-
-##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition)
-
-Add custom validation keyword to Ajv instance.
-
-Keyword should be different from all standard JSON schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance.
-
-Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`.
-It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions.
-
-Example Keywords:
-- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions.
-- `"example"`: valid, but not recommended as it could collide with future versions of JSON schema etc.
-- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword
-
-Keyword definition is an object with the following properties:
-
-- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types.
-- _validate_: validating function
-- _compile_: compiling function
-- _macro_: macro function
-- _inline_: compiling function that returns code (as string)
-- _schema_: an optional `false` value used with "validate" keyword to not pass schema
-- _metaSchema_: an optional meta-schema for keyword schema
-- _modifying_: `true` MUST be passed if keyword modifies data
-- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords.
-- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function).
-- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords.
-- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation.
-
-_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference.
-
-__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed.
-
-See [Defining custom keywords](#defining-custom-keywords) for more details.
-
-
-##### .getKeyword(String keyword) -&gt; Object|Boolean
-
-Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown.
-
-
-##### .removeKeyword(String keyword)
-
-Removes custom or pre-defined keyword so you can redefine them.
-
-While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results.
-
-__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again.
-
-
-##### .errorsText([Array&lt;Object&gt; errors [, Object options]]) -&gt; String
-
-Returns the text with all errors in a String.
-
-Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default).
-
-
-## Options
-
-Defaults:
-
-```javascript
-{
- // validation and reporting options:
- v5: false,
- allErrors: false,
- verbose: false,
- jsonPointers: false,
- uniqueItems: true,
- unicode: true,
- format: 'fast',
- formats: {},
- unknownFormats: 'ignore',
- schemas: {},
- // referenced schema options:
- missingRefs: true,
- extendRefs: true,
- loadSchema: undefined, // function(uri, cb) { /* ... */ cb(err, schema); },
- // options to modify validated data:
- removeAdditional: false,
- useDefaults: false,
- coerceTypes: false,
- // asynchronous validation options:
- async: undefined,
- transpile: undefined,
- // advanced options:
- meta: true,
- validateSchema: true,
- addUsedSchema: true,
- inlineRefs: true,
- passContext: false,
- loopRequired: Infinity,
- ownProperties: false,
- multipleOfPrecision: false,
- errorDataPath: 'object',
- sourceCode: true,
- messages: true,
- beautify: false,
- cache: new Cache
-}
-```
-
-##### Validation and reporting options
-
-- _v5_: add keywords `switch`, `constant`, `contains`, `patternGroups`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals). With this option added schemas without `$schema` property are validated against [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#). `false` by default.
-- _allErrors_: check all rules collecting all errors. Default is to return after the first error.
-- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default).
-- _jsonPointers_: set `dataPath` propery of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation.
-- _uniqueItems_: validate `uniqueItems` keyword (true by default).
-- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters.
-- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode.
-- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method.
-- _unknownFormats_: handling of unknown formats. Option values:
- - `true` (will be default in 5.0.0) - if the unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [v5 $data reference](#data-reference) and it is unknown the validation will fail.
- - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if some other unknown format is used. If `format` keyword value is [v5 $data reference](#data-reference) and it is not in this array the validation will fail.
- - `"ignore"` (default now) - to log warning during schema compilation and always pass validation. This option is not recommended, as it allows to mistype format name. This behaviour is required by JSON-schema specification.
-- _schemas_: an array or object of schemas that will be added to the instance. If the order is important, pass array. In this case schemas must have IDs in them. Otherwise the object can be passed - `addSchema(value, key)` will be called for each schema in this object.
-
-
-##### Referenced schema options
-
-- _missingRefs_: handling of missing referenced schemas. Option values:
- - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted).
- - `"ignore"` - to log error during compilation and always pass validation.
- - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked.
-- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values:
- - `true` (default) - validate all keywords in the schemas with `$ref`.
- - `"ignore"` - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation.
- - `"fail"` - if other validation keywords are used together with `$ref` the exception will be throw when the schema is compiled.
-- _loadSchema_: asynchronous function that will be used to load remote schemas when the method `compileAsync` is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept 2 parameters: remote schema uri and node-style callback. See example in [Asynchronous compilation](#asynchronous-compilation).
-
-
-##### Options to modify validated data
-
-- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values:
- - `false` (default) - not to remove additional properties
- - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them).
- - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed.
- - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema).
-- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values:
- - `false` (default) - do not use defaults
- - `true` - insert defaults by value (safer and slower, object literal is used).
- - `"shared"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well.
-- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values:
- - `false` (default) - no type coercion.
- - `true` - coerce scalar data types.
- - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema).
-
-
-##### Asynchronous validation options
-
-- _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values:
- - `"*"` / `"co*"` - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `transpile` option, the exception will be thrown when Ajv instance is created.
- - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `transpile` option. Currently only MS Edge 13 with flag supports es7 async functions according to [compatibility table](http://kangax.github.io/compat-table/es7/)).
- - `true` - if transpile option is not passed Ajv will choose the first supported/installed async/transpile modes in this order: "co*" (native generator with co.wrap), "es7"/"nodent", "co*"/"regenerator" during the creation of the Ajv instance. If none of the options is available the exception will be thrown.
- - `undefined`- Ajv will choose the first available async mode in the same way as with `true` option but when the first asynchronous schema is compiled.
-- _transpile_: determines whether Ajv transpiles compiled asynchronous validation function. Option values:
- - `"nodent"` - transpile with [nodent](https://github.com/MatAtBread/nodent). If nodent is not installed, the exception will be thrown. nodent can only transpile es7 async functions; it will enforce this mode.
- - `"regenerator"` - transpile with [regenerator](https://github.com/facebook/regenerator). If regenerator is not installed, the exception will be thrown.
- - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer.
-
-
-##### Advanced options
-
-- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). With option `v5: true` [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) will be added as well. If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword.
-- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can either be http://json-schema.org/schema or http://json-schema.org/draft-04/schema or absent (draft-4 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values:
- - `true` (default) - if the validation fails, throw the exception.
- - `"log"` - if the validation fails, log error.
- - `false` - skip schema validation.
-- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `id` property that doesn't start with "#". If `id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `id` uniqueness check when these methods are used. This option does not affect `addSchema` method.
-- _inlineRefs_: Affects compilation of referenced schemas. Option values:
- - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions.
- - `false` - to not inline referenced schemas (they will be compiled as separate functions).
- - integer number - to limit the maximum number of keywords of the schema that will be inlined.
-- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance.
-- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance.
-- _ownProperties_: by default ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst.
-- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations).
-- _errorDataPath_: set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`.
-- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call).
-- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)).
-- _beautify_: format the generated function with [js-beautify](https://github.com/beautify-web/js-beautify) (the validating function is generated without line-breaks). `npm install js-beautify` to use this option. `true` or js-beautify options can be passed.
-- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`.
-
-
-## Validation errors
-
-In case of validation failure Ajv assigns the array of errors to `.errors` property of validation function (or to `.errors` property of Ajv instance in case `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation) the returned promise is rejected with the exception of the class `Ajv.ValidationError` that has `.errors` poperty.
-
-
-### Error objects
-
-Each error is an object with the following properties:
-
-- _keyword_: validation keyword.
-- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`).
-- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation.
-- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords.
-- _message_: the standard error message (can be excluded with option `messages` set to false).
-- _schema_: the schema of the keyword (added with `verbose` option).
-- _parentSchema_: the schema containing the keyword (added with `verbose` option)
-- _data_: the data validated by the keyword (added with `verbose` option).
-
-
-### Error parameters
-
-Properties of `params` object in errors depend on the keyword that failed validation.
-
-- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword).
-- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false).
-- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords).
-- `patternGroups` (with v5 option) - properties:
- - `pattern`
- - `reason` ("minimum"/"maximum"),
- - `limit` (max/min allowed number of properties matching number)
-- `dependencies` - properties:
- - `property` (dependent property),
- - `missingProperty` (required missing dependency - only the first one is reported currently)
- - `deps` (required dependencies, comma separated list as a string),
- - `depsCount` (the number of required dependedncies).
-- `format` - property `format` (the schema of the keyword).
-- `maximum`, `minimum` - properties:
- - `limit` (number, the schema of the keyword),
- - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`),
- - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=")
-- `multipleOf` - property `multipleOf` (the schema of the keyword)
-- `pattern` - property `pattern` (the schema of the keyword)
-- `required` - property `missingProperty` (required property that is missing).
-- `patternRequired` (with v5 option) - property `missingPattern` (required pattern that did not match any property).
-- `type` - property `type` (required type(s), a string, can be a comma-separated list)
-- `uniqueItems` - properties `i` and `j` (indices of duplicate items).
-- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword).
-- `$ref` - property `ref` with the referenced schema URI.
-- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name).
-
-
-## Related packages
-
-- [ajv-cli](https://github.com/epoberezkin/ajv-cli) - command line interface for Ajv
-- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages
-- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch from v5 proposals.
-- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - several custom keywords that can be used with Ajv (typeof, instanceof, range, propertyNames)
-
-
-## Some packages using Ajv
-
-- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser
-- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services
-- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition
-- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator
-- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org
-- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON-schema http://jsonschemalint.com
-- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for node.js
-- [table](https://github.com/gajus/table) - formats data into a string table
-- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser
-- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content
-- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation
-- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation
-- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages
-- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema
-- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON-schema with expect in mocha tests
-- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON-Schema
-- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file
-- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app
-- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter
-- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages
-
-
-## Tests
-
-```
-npm install
-git submodule update --init
-npm test
-```
-
-## Contributing
-
-All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency.
-
-`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder.
-
-`npm run watch` - automatically compiles templates when files in dot folder change
-
-Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md)
-
-
-## Changes history
-
-See https://github.com/epoberezkin/ajv/releases
-
-__Please note__: [Changes in version 5.0.1-beta](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0).
-
-[Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0).
-
-[Changes in version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0).
-
-[Changes in version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0).
-
-[Changes in version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0).
-
-
-## License
-
-[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE)
diff --git a/node_modules/node-gyp/node_modules/ajv/dist/ajv.bundle.js b/node_modules/node-gyp/node_modules/ajv/dist/ajv.bundle.js
deleted file mode 100644
index b624d1367..000000000
--- a/node_modules/node-gyp/node_modules/ajv/dist/ajv.bundle.js
+++ /dev/null
@@ -1,8023 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-'use strict';
-
-module.exports = {
- setup: setupAsync,
- compile: compileAsync
-};
-
-
-var util = require('./compile/util');
-
-var ASYNC = {
- '*': checkGenerators,
- 'co*': checkGenerators,
- 'es7': checkAsyncFunction
-};
-
-var TRANSPILE = {
- 'nodent': getNodent,
- 'regenerator': getRegenerator
-};
-
-var MODES = [
- { async: 'co*' },
- { async: 'es7', transpile: 'nodent' },
- { async: 'co*', transpile: 'regenerator' }
-];
-
-
-var regenerator, nodent;
-
-
-function setupAsync(opts, required) {
- if (required !== false) required = true;
- var async = opts.async
- , transpile = opts.transpile
- , check;
-
- switch (typeof transpile) {
- case 'string':
- var get = TRANSPILE[transpile];
- if (!get) throw new Error('bad transpiler: ' + transpile);
- return (opts._transpileFunc = get(opts, required));
- case 'undefined':
- case 'boolean':
- if (typeof async == 'string') {
- check = ASYNC[async];
- if (!check) throw new Error('bad async mode: ' + async);
- return (opts.transpile = check(opts, required));
- }
-
- for (var i=0; i<MODES.length; i++) {
- var _opts = MODES[i];
- if (setupAsync(_opts, false)) {
- util.copy(_opts, opts);
- return opts.transpile;
- }
- }
- /* istanbul ignore next */
- throw new Error('generators, nodent and regenerator are not available');
- case 'function':
- return (opts._transpileFunc = opts.transpile);
- default:
- throw new Error('bad transpiler: ' + transpile);
- }
-}
-
-
-function checkGenerators(opts, required) {
- /* jshint evil: true */
- try {
- (new Function('(function*(){})()'))();
- return true;
- } catch(e) {
- /* istanbul ignore next */
- if (required) throw new Error('generators not supported');
- }
-}
-
-
-function checkAsyncFunction(opts, required) {
- /* jshint evil: true */
- try {
- (new Function('(async function(){})()'))();
- /* istanbul ignore next */
- return true;
- } catch(e) {
- if (required) throw new Error('es7 async functions not supported');
- }
-}
-
-
-function getRegenerator(opts, required) {
- try {
- if (!regenerator) {
- var name = 'regenerator';
- regenerator = require(name);
- regenerator.runtime();
- }
- if (!opts.async || opts.async === true)
- opts.async = 'es7';
- return regeneratorTranspile;
- } catch(e) {
- /* istanbul ignore next */
- if (required) throw new Error('regenerator not available');
- }
-}
-
-
-function regeneratorTranspile(code) {
- return regenerator.compile(code).code;
-}
-
-
-function getNodent(opts, required) {
- /* jshint evil: true */
- try {
- if (!nodent) {
- var name = 'nodent';
- nodent = require(name)({ log: false, dontInstallRequireHook: true });
- }
- if (opts.async != 'es7') {
- if (opts.async && opts.async !== true) console.warn('nodent transpiles only es7 async functions');
- opts.async = 'es7';
- }
- return nodentTranspile;
- } catch(e) {
- /* istanbul ignore next */
- if (required) throw new Error('nodent not available');
- }
-}
-
-
-function nodentTranspile(code) {
- return nodent.compile(code, '', { promises: true, sourcemap: false }).code;
-}
-
-
-/**
- * Creates validating function for passed schema with asynchronous loading of missing schemas.
- * `loadSchema` option should be a function that accepts schema uri and node-style callback.
- * @this Ajv
- * @param {Object} schema schema object
- * @param {Function} callback node-style callback, it is always called with 2 parameters: error (or null) and validating function.
- */
-function compileAsync(schema, callback) {
- /* eslint no-shadow: 0 */
- /* jshint validthis: true */
- var schemaObj;
- var self = this;
- try {
- schemaObj = this._addSchema(schema);
- } catch(e) {
- setTimeout(function() { callback(e); });
- return;
- }
- if (schemaObj.validate) {
- setTimeout(function() { callback(null, schemaObj.validate); });
- } else {
- if (typeof this._opts.loadSchema != 'function')
- throw new Error('options.loadSchema should be a function');
- _compileAsync(schema, callback, true);
- }
-
-
- function _compileAsync(schema, callback, firstCall) {
- var validate;
- try { validate = self.compile(schema); }
- catch(e) {
- if (e.missingSchema) loadMissingSchema(e);
- else deferCallback(e);
- return;
- }
- deferCallback(null, validate);
-
- function loadMissingSchema(e) {
- var ref = e.missingSchema;
- if (self._refs[ref] || self._schemas[ref])
- return callback(new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'));
- var _callbacks = self._loadingSchemas[ref];
- if (_callbacks) {
- if (typeof _callbacks == 'function')
- self._loadingSchemas[ref] = [_callbacks, schemaLoaded];
- else
- _callbacks[_callbacks.length] = schemaLoaded;
- } else {
- self._loadingSchemas[ref] = schemaLoaded;
- self._opts.loadSchema(ref, function (err, sch) {
- var _callbacks = self._loadingSchemas[ref];
- delete self._loadingSchemas[ref];
- if (typeof _callbacks == 'function') {
- _callbacks(err, sch);
- } else {
- for (var i=0; i<_callbacks.length; i++)
- _callbacks[i](err, sch);
- }
- });
- }
-
- function schemaLoaded(err, sch) {
- if (err) return callback(err);
- if (!(self._refs[ref] || self._schemas[ref])) {
- try {
- self.addSchema(sch, ref);
- } catch(e) {
- callback(e);
- return;
- }
- }
- _compileAsync(schema, callback);
- }
- }
-
- function deferCallback(err, validate) {
- if (firstCall) setTimeout(function() { callback(err, validate); });
- else return callback(err, validate);
- }
- }
-}
-
-},{"./compile/util":11}],2:[function(require,module,exports){
-'use strict';
-
-
-var Cache = module.exports = function Cache() {
- this._cache = {};
-};
-
-
-Cache.prototype.put = function Cache_put(key, value) {
- this._cache[key] = value;
-};
-
-
-Cache.prototype.get = function Cache_get(key) {
- return this._cache[key];
-};
-
-
-Cache.prototype.del = function Cache_del(key) {
- delete this._cache[key];
-};
-
-
-Cache.prototype.clear = function Cache_clear() {
- this._cache = {};
-};
-
-},{}],3:[function(require,module,exports){
-'use strict';
-
-//all requires must be explicit because browserify won't work with dynamic requires
-module.exports = {
- '$ref': require('../dotjs/ref'),
- allOf: require('../dotjs/allOf'),
- anyOf: require('../dotjs/anyOf'),
- dependencies: require('../dotjs/dependencies'),
- 'enum': require('../dotjs/enum'),
- format: require('../dotjs/format'),
- items: require('../dotjs/items'),
- maximum: require('../dotjs/_limit'),
- minimum: require('../dotjs/_limit'),
- maxItems: require('../dotjs/_limitItems'),
- minItems: require('../dotjs/_limitItems'),
- maxLength: require('../dotjs/_limitLength'),
- minLength: require('../dotjs/_limitLength'),
- maxProperties: require('../dotjs/_limitProperties'),
- minProperties: require('../dotjs/_limitProperties'),
- multipleOf: require('../dotjs/multipleOf'),
- not: require('../dotjs/not'),
- oneOf: require('../dotjs/oneOf'),
- pattern: require('../dotjs/pattern'),
- properties: require('../dotjs/properties'),
- required: require('../dotjs/required'),
- uniqueItems: require('../dotjs/uniqueItems'),
- validate: require('../dotjs/validate')
-};
-
-},{"../dotjs/_limit":14,"../dotjs/_limitItems":15,"../dotjs/_limitLength":16,"../dotjs/_limitProperties":17,"../dotjs/allOf":18,"../dotjs/anyOf":19,"../dotjs/dependencies":22,"../dotjs/enum":23,"../dotjs/format":24,"../dotjs/items":25,"../dotjs/multipleOf":26,"../dotjs/not":27,"../dotjs/oneOf":28,"../dotjs/pattern":29,"../dotjs/properties":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":35,"../dotjs/validate":36}],4:[function(require,module,exports){
-'use strict';
-
-/*eslint complexity: 0*/
-
-module.exports = function equal(a, b) {
- if (a === b) return true;
-
- var arrA = Array.isArray(a)
- , arrB = Array.isArray(b)
- , i;
-
- if (arrA && arrB) {
- if (a.length != b.length) return false;
- for (i = 0; i < a.length; i++)
- if (!equal(a[i], b[i])) return false;
- return true;
- }
-
- if (arrA != arrB) return false;
-
- if (a && b && typeof a === 'object' && typeof b === 'object') {
- var keys = Object.keys(a);
- if (keys.length !== Object.keys(b).length) return false;
-
- var dateA = a instanceof Date
- , dateB = b instanceof Date;
- if (dateA && dateB) return a.getTime() == b.getTime();
- if (dateA != dateB) return false;
-
- var regexpA = a instanceof RegExp
- , regexpB = b instanceof RegExp;
- if (regexpA && regexpB) return a.toString() == b.toString();
- if (regexpA != regexpB) return false;
-
- for (i = 0; i < keys.length; i++)
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
-
- for (i = 0; i < keys.length; i++)
- if(!equal(a[keys[i]], b[keys[i]])) return false;
-
- return true;
- }
-
- return false;
-};
-
-},{}],5:[function(require,module,exports){
-'use strict';
-
-var util = require('./util');
-
-var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
-var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
-var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
-var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
-var URI = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i;
-var UUID = /^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
-var JSON_POINTER = /^(?:\/(?:[^~\/]|~0|~1)*)*$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
-var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/;
-
-
-module.exports = formats;
-
-function formats(mode) {
- mode = mode == 'full' ? 'full' : 'fast';
- var formatDefs = util.copy(formats[mode]);
- for (var fName in formats.compare) {
- formatDefs[fName] = {
- validate: formatDefs[fName],
- compare: formats.compare[fName]
- };
- }
- return formatDefs;
-}
-
-
-formats.fast = {
- // date: http://tools.ietf.org/html/rfc3339#section-5.6
- date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
- // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
- time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
- 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
- // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
- uri: /^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,
- // email (sources from jsen validator):
- // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
- // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
- email: /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
- hostname: HOSTNAME,
- // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
- ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
- // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
- ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
- regex: regex,
- // uuid: http://tools.ietf.org/html/rfc4122
- uuid: UUID,
- // JSON-pointer: https://tools.ietf.org/html/rfc6901
- // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
- 'json-pointer': JSON_POINTER,
- // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
- 'relative-json-pointer': RELATIVE_JSON_POINTER
-};
-
-
-formats.full = {
- date: date,
- time: time,
- 'date-time': date_time,
- uri: uri,
- email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
- hostname: hostname,
- ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
- ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
- regex: regex,
- uuid: UUID,
- 'json-pointer': JSON_POINTER,
- 'relative-json-pointer': RELATIVE_JSON_POINTER
-};
-
-
-formats.compare = {
- date: compareDate,
- time: compareTime,
- 'date-time': compareDateTime
-};
-
-
-function date(str) {
- // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
- var matches = str.match(DATE);
- if (!matches) return false;
-
- var month = +matches[1];
- var day = +matches[2];
- return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month];
-}
-
-
-function time(str, full) {
- var matches = str.match(TIME);
- if (!matches) return false;
-
- var hour = matches[1];
- var minute = matches[2];
- var second = matches[3];
- var timeZone = matches[5];
- return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);
-}
-
-
-var DATE_TIME_SEPARATOR = /t|\s/i;
-function date_time(str) {
- // http://tools.ietf.org/html/rfc3339#section-5.6
- var dateTime = str.split(DATE_TIME_SEPARATOR);
- return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
-}
-
-
-function hostname(str) {
- // https://tools.ietf.org/html/rfc1034#section-3.5
- // https://tools.ietf.org/html/rfc1123#section-2
- return str.length <= 255 && HOSTNAME.test(str);
-}
-
-
-var NOT_URI_FRAGMENT = /\/|\:/;
-function uri(str) {
- // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
- return NOT_URI_FRAGMENT.test(str) && URI.test(str);
-}
-
-
-function regex(str) {
- try {
- new RegExp(str);
- return true;
- } catch(e) {
- return false;
- }
-}
-
-
-function compareDate(d1, d2) {
- if (!(d1 && d2)) return;
- if (d1 > d2) return 1;
- if (d1 < d2) return -1;
- if (d1 === d2) return 0;
-}
-
-
-function compareTime(t1, t2) {
- if (!(t1 && t2)) return;
- t1 = t1.match(TIME);
- t2 = t2.match(TIME);
- if (!(t1 && t2)) return;
- t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');
- t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');
- if (t1 > t2) return 1;
- if (t1 < t2) return -1;
- if (t1 === t2) return 0;
-}
-
-
-function compareDateTime(dt1, dt2) {
- if (!(dt1 && dt2)) return;
- dt1 = dt1.split(DATE_TIME_SEPARATOR);
- dt2 = dt2.split(DATE_TIME_SEPARATOR);
- var res = compareDate(dt1[0], dt2[0]);
- if (res === undefined) return;
- return res || compareTime(dt1[1], dt2[1]);
-}
-
-},{"./util":11}],6:[function(require,module,exports){
-'use strict';
-
-var resolve = require('./resolve')
- , util = require('./util')
- , stableStringify = require('json-stable-stringify')
- , async = require('../async');
-
-var beautify;
-
-function loadBeautify(){
- if (beautify === undefined) {
- var name = 'js-beautify';
- try { beautify = require(name).js_beautify; }
- catch(e) { beautify = false; }
- }
-}
-
-var validateGenerator = require('../dotjs/validate');
-
-/**
- * Functions below are used inside compiled validations function
- */
-
-var co = require('co');
-var ucs2length = util.ucs2length;
-var equal = require('./equal');
-
-// this error is thrown by async schemas to return validation errors via exception
-var ValidationError = require('./validation_error');
-
-module.exports = compile;
-
-
-/**
- * Compiles schema to validation function
- * @this Ajv
- * @param {Object} schema schema object
- * @param {Object} root object with information about the root schema for this schema
- * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
- * @param {String} baseId base ID for IDs in the schema
- * @return {Function} validation function
- */
-function compile(schema, root, localRefs, baseId) {
- /* jshint validthis: true, evil: true */
- /* eslint no-shadow: 0 */
- var self = this
- , opts = this._opts
- , refVal = [ undefined ]
- , refs = {}
- , patterns = []
- , patternsHash = {}
- , defaults = []
- , defaultsHash = {}
- , customRules = []
- , keepSourceCode = opts.sourceCode !== false;
-
- root = root || { schema: schema, refVal: refVal, refs: refs };
-
- var c = checkCompiling.call(this, schema, root, baseId);
- var compilation = this._compilations[c.index];
- if (c.compiling) return (compilation.callValidate = callValidate);
-
- var formats = this._formats;
- var RULES = this.RULES;
-
- try {
- var v = localCompile(schema, root, localRefs, baseId);
- compilation.validate = v;
- var cv = compilation.callValidate;
- if (cv) {
- cv.schema = v.schema;
- cv.errors = null;
- cv.refs = v.refs;
- cv.refVal = v.refVal;
- cv.root = v.root;
- cv.$async = v.$async;
- if (keepSourceCode) cv.sourceCode = v.sourceCode;
- }
- return v;
- } finally {
- endCompiling.call(this, schema, root, baseId);
- }
-
- function callValidate() {
- var validate = compilation.validate;
- var result = validate.apply(null, arguments);
- callValidate.errors = validate.errors;
- return result;
- }
-
- function localCompile(_schema, _root, localRefs, baseId) {
- var isRoot = !_root || (_root && _root.schema == _schema);
- if (_root.schema != root.schema)
- return compile.call(self, _schema, _root, localRefs, baseId);
-
- var $async = _schema.$async === true;
- if ($async && !opts.transpile) async.setup(opts);
-
- var sourceCode = validateGenerator({
- isTop: true,
- schema: _schema,
- isRoot: isRoot,
- baseId: baseId,
- root: _root,
- schemaPath: '',
- errSchemaPath: '#',
- errorPath: '""',
- RULES: RULES,
- validate: validateGenerator,
- util: util,
- resolve: resolve,
- resolveRef: resolveRef,
- usePattern: usePattern,
- useDefault: useDefault,
- useCustomRule: useCustomRule,
- opts: opts,
- formats: formats,
- self: self
- });
-
- sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
- + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
- + sourceCode;
-
- if (opts.beautify) {
- loadBeautify();
- /* istanbul ignore else */
- if (beautify) sourceCode = beautify(sourceCode, opts.beautify);
- else console.error('"npm install js-beautify" to use beautify option');
- }
- // console.log('\n\n\n *** \n', sourceCode);
- var validate, validateCode
- , transpile = opts._transpileFunc;
- try {
- validateCode = $async && transpile
- ? transpile(sourceCode)
- : sourceCode;
-
- var makeValidate = new Function(
- 'self',
- 'RULES',
- 'formats',
- 'root',
- 'refVal',
- 'defaults',
- 'customRules',
- 'co',
- 'equal',
- 'ucs2length',
- 'ValidationError',
- validateCode
- );
-
- validate = makeValidate(
- self,
- RULES,
- formats,
- root,
- refVal,
- defaults,
- customRules,
- co,
- equal,
- ucs2length,
- ValidationError
- );
-
- refVal[0] = validate;
- } catch(e) {
- console.error('Error compiling schema, function code:', validateCode);
- throw e;
- }
-
- validate.schema = _schema;
- validate.errors = null;
- validate.refs = refs;
- validate.refVal = refVal;
- validate.root = isRoot ? validate : _root;
- if ($async) validate.$async = true;
- if (keepSourceCode) validate.sourceCode = sourceCode;
- if (opts.sourceCode === true) {
- validate.source = {
- patterns: patterns,
- defaults: defaults
- };
- }
-
- return validate;
- }
-
- function resolveRef(baseId, ref, isRoot) {
- ref = resolve.url(baseId, ref);
- var refIndex = refs[ref];
- var _refVal, refCode;
- if (refIndex !== undefined) {
- _refVal = refVal[refIndex];
- refCode = 'refVal[' + refIndex + ']';
- return resolvedRef(_refVal, refCode);
- }
- if (!isRoot && root.refs) {
- var rootRefId = root.refs[ref];
- if (rootRefId !== undefined) {
- _refVal = root.refVal[rootRefId];
- refCode = addLocalRef(ref, _refVal);
- return resolvedRef(_refVal, refCode);
- }
- }
-
- refCode = addLocalRef(ref);
- var v = resolve.call(self, localCompile, root, ref);
- if (!v) {
- var localSchema = localRefs && localRefs[ref];
- if (localSchema) {
- v = resolve.inlineRef(localSchema, opts.inlineRefs)
- ? localSchema
- : compile.call(self, localSchema, root, localRefs, baseId);
- }
- }
-
- if (v) {
- replaceLocalRef(ref, v);
- return resolvedRef(v, refCode);
- }
- }
-
- function addLocalRef(ref, v) {
- var refId = refVal.length;
- refVal[refId] = v;
- refs[ref] = refId;
- return 'refVal' + refId;
- }
-
- function replaceLocalRef(ref, v) {
- var refId = refs[ref];
- refVal[refId] = v;
- }
-
- function resolvedRef(refVal, code) {
- return typeof refVal == 'object'
- ? { code: code, schema: refVal, inline: true }
- : { code: code, $async: refVal && refVal.$async };
- }
-
- function usePattern(regexStr) {
- var index = patternsHash[regexStr];
- if (index === undefined) {
- index = patternsHash[regexStr] = patterns.length;
- patterns[index] = regexStr;
- }
- return 'pattern' + index;
- }
-
- function useDefault(value) {
- switch (typeof value) {
- case 'boolean':
- case 'number':
- return '' + value;
- case 'string':
- return util.toQuotedString(value);
- case 'object':
- if (value === null) return 'null';
- var valueStr = stableStringify(value);
- var index = defaultsHash[valueStr];
- if (index === undefined) {
- index = defaultsHash[valueStr] = defaults.length;
- defaults[index] = value;
- }
- return 'default' + index;
- }
- }
-
- function useCustomRule(rule, schema, parentSchema, it) {
- var validateSchema = rule.definition.validateSchema;
- if (validateSchema && self._opts.validateSchema !== false) {
- var valid = validateSchema(schema);
- if (!valid) {
- var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
- if (self._opts.validateSchema == 'log') console.error(message);
- else throw new Error(message);
- }
- }
-
- var compile = rule.definition.compile
- , inline = rule.definition.inline
- , macro = rule.definition.macro;
-
- var validate;
- if (compile) {
- validate = compile.call(self, schema, parentSchema, it);
- } else if (macro) {
- validate = macro.call(self, schema, parentSchema, it);
- if (opts.validateSchema !== false) self.validateSchema(validate, true);
- } else if (inline) {
- validate = inline.call(self, it, rule.keyword, schema, parentSchema);
- } else {
- validate = rule.definition.validate;
- }
-
- var index = customRules.length;
- customRules[index] = validate;
-
- return {
- code: 'customRule' + index,
- validate: validate
- };
- }
-}
-
-
-/**
- * Checks if the schema is currently compiled
- * @this Ajv
- * @param {Object} schema schema to compile
- * @param {Object} root root object
- * @param {String} baseId base schema ID
- * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
- */
-function checkCompiling(schema, root, baseId) {
- /* jshint validthis: true */
- var index = compIndex.call(this, schema, root, baseId);
- if (index >= 0) return { index: index, compiling: true };
- index = this._compilations.length;
- this._compilations[index] = {
- schema: schema,
- root: root,
- baseId: baseId
- };
- return { index: index, compiling: false };
-}
-
-
-/**
- * Removes the schema from the currently compiled list
- * @this Ajv
- * @param {Object} schema schema to compile
- * @param {Object} root root object
- * @param {String} baseId base schema ID
- */
-function endCompiling(schema, root, baseId) {
- /* jshint validthis: true */
- var i = compIndex.call(this, schema, root, baseId);
- if (i >= 0) this._compilations.splice(i, 1);
-}
-
-
-/**
- * Index of schema compilation in the currently compiled list
- * @this Ajv
- * @param {Object} schema schema to compile
- * @param {Object} root root object
- * @param {String} baseId base schema ID
- * @return {Integer} compilation index
- */
-function compIndex(schema, root, baseId) {
- /* jshint validthis: true */
- for (var i=0; i<this._compilations.length; i++) {
- var c = this._compilations[i];
- if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
- }
- return -1;
-}
-
-
-function patternCode(i, patterns) {
- return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
-}
-
-
-function defaultCode(i) {
- return 'var default' + i + ' = defaults[' + i + '];';
-}
-
-
-function refValCode(i, refVal) {
- return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';
-}
-
-
-function customRuleCode(i) {
- return 'var customRule' + i + ' = customRules[' + i + '];';
-}
-
-
-function vars(arr, statement) {
- if (!arr.length) return '';
- var code = '';
- for (var i=0; i<arr.length; i++)
- code += statement(i, arr);
- return code;
-}
-
-},{"../async":1,"../dotjs/validate":36,"./equal":4,"./resolve":7,"./util":11,"./validation_error":12,"co":41,"json-stable-stringify":42}],7:[function(require,module,exports){
-'use strict';
-
-var url = require('url')
- , equal = require('./equal')
- , util = require('./util')
- , SchemaObject = require('./schema_obj');
-
-module.exports = resolve;
-
-resolve.normalizeId = normalizeId;
-resolve.fullPath = getFullPath;
-resolve.url = resolveUrl;
-resolve.ids = resolveIds;
-resolve.inlineRef = inlineRef;
-resolve.schema = resolveSchema;
-
-/**
- * [resolve and compile the references ($ref)]
- * @this Ajv
- * @param {Function} compile reference to schema compilation funciton (localCompile)
- * @param {Object} root object with information about the root schema for the current schema
- * @param {String} ref reference to resolve
- * @return {Object|Function} schema object (if the schema can be inlined) or validation function
- */
-function resolve(compile, root, ref) {
- /* jshint validthis: true */
- var refVal = this._refs[ref];
- if (typeof refVal == 'string') {
- if (this._refs[refVal]) refVal = this._refs[refVal];
- else return resolve.call(this, compile, root, refVal);
- }
-
- refVal = refVal || this._schemas[ref];
- if (refVal instanceof SchemaObject) {
- return inlineRef(refVal.schema, this._opts.inlineRefs)
- ? refVal.schema
- : refVal.validate || this._compile(refVal);
- }
-
- var res = resolveSchema.call(this, root, ref);
- var schema, v, baseId;
- if (res) {
- schema = res.schema;
- root = res.root;
- baseId = res.baseId;
- }
-
- if (schema instanceof SchemaObject) {
- v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
- } else if (schema) {
- v = inlineRef(schema, this._opts.inlineRefs)
- ? schema
- : compile.call(this, schema, root, undefined, baseId);
- }
-
- return v;
-}
-
-
-/**
- * Resolve schema, its root and baseId
- * @this Ajv
- * @param {Object} root root object with properties schema, refVal, refs
- * @param {String} ref reference to resolve
- * @return {Object} object with properties schema, root, baseId
- */
-function resolveSchema(root, ref) {
- /* jshint validthis: true */
- var p = url.parse(ref, false, true)
- , refPath = _getFullPath(p)
- , baseId = getFullPath(root.schema.id);
- if (refPath !== baseId) {
- var id = normalizeId(refPath);
- var refVal = this._refs[id];
- if (typeof refVal == 'string') {
- return resolveRecursive.call(this, root, refVal, p);
- } else if (refVal instanceof SchemaObject) {
- if (!refVal.validate) this._compile(refVal);
- root = refVal;
- } else {
- refVal = this._schemas[id];
- if (refVal instanceof SchemaObject) {
- if (!refVal.validate) this._compile(refVal);
- if (id == normalizeId(ref))
- return { schema: refVal, root: root, baseId: baseId };
- root = refVal;
- } else {
- return;
- }
- }
- if (!root.schema) return;
- baseId = getFullPath(root.schema.id);
- }
- return getJsonPointer.call(this, p, baseId, root.schema, root);
-}
-
-
-/* @this Ajv */
-function resolveRecursive(root, ref, parsedRef) {
- /* jshint validthis: true */
- var res = resolveSchema.call(this, root, ref);
- if (res) {
- var schema = res.schema;
- var baseId = res.baseId;
- root = res.root;
- if (schema.id) baseId = resolveUrl(baseId, schema.id);
- return getJsonPointer.call(this, parsedRef, baseId, schema, root);
- }
-}
-
-
-var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
-/* @this Ajv */
-function getJsonPointer(parsedRef, baseId, schema, root) {
- /* jshint validthis: true */
- parsedRef.hash = parsedRef.hash || '';
- if (parsedRef.hash.slice(0,2) != '#/') return;
- var parts = parsedRef.hash.split('/');
-
- for (var i = 1; i < parts.length; i++) {
- var part = parts[i];
- if (part) {
- part = util.unescapeFragment(part);
- schema = schema[part];
- if (!schema) break;
- if (schema.id && !PREVENT_SCOPE_CHANGE[part]) baseId = resolveUrl(baseId, schema.id);
- if (schema.$ref) {
- var $ref = resolveUrl(baseId, schema.$ref);
- var res = resolveSchema.call(this, root, $ref);
- if (res) {
- schema = res.schema;
- root = res.root;
- baseId = res.baseId;
- }
- }
- }
- }
- if (schema && schema != root.schema)
- return { schema: schema, root: root, baseId: baseId };
-}
-
-
-var SIMPLE_INLINED = util.toHash([
- 'type', 'format', 'pattern',
- 'maxLength', 'minLength',
- 'maxProperties', 'minProperties',
- 'maxItems', 'minItems',
- 'maximum', 'minimum',
- 'uniqueItems', 'multipleOf',
- 'required', 'enum'
-]);
-function inlineRef(schema, limit) {
- if (limit === false) return false;
- if (limit === undefined || limit === true) return checkNoRef(schema);
- else if (limit) return countKeys(schema) <= limit;
-}
-
-
-function checkNoRef(schema) {
- var item;
- if (Array.isArray(schema)) {
- for (var i=0; i<schema.length; i++) {
- item = schema[i];
- if (typeof item == 'object' && !checkNoRef(item)) return false;
- }
- } else {
- for (var key in schema) {
- if (key == '$ref') return false;
- item = schema[key];
- if (typeof item == 'object' && !checkNoRef(item)) return false;
- }
- }
- return true;
-}
-
-
-function countKeys(schema) {
- var count = 0, item;
- if (Array.isArray(schema)) {
- for (var i=0; i<schema.length; i++) {
- item = schema[i];
- if (typeof item == 'object') count += countKeys(item);
- if (count == Infinity) return Infinity;
- }
- } else {
- for (var key in schema) {
- if (key == '$ref') return Infinity;
- if (SIMPLE_INLINED[key]) {
- count++;
- } else {
- item = schema[key];
- if (typeof item == 'object') count += countKeys(item) + 1;
- if (count == Infinity) return Infinity;
- }
- }
- }
- return count;
-}
-
-
-function getFullPath(id, normalize) {
- if (normalize !== false) id = normalizeId(id);
- var p = url.parse(id, false, true);
- return _getFullPath(p);
-}
-
-
-function _getFullPath(p) {
- var protocolSeparator = p.protocol || p.href.slice(0,2) == '//' ? '//' : '';
- return (p.protocol||'') + protocolSeparator + (p.host||'') + (p.path||'') + '#';
-}
-
-
-var TRAILING_SLASH_HASH = /#\/?$/;
-function normalizeId(id) {
- return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
-}
-
-
-function resolveUrl(baseId, id) {
- id = normalizeId(id);
- return url.resolve(baseId, id);
-}
-
-
-/* @this Ajv */
-function resolveIds(schema) {
- /* eslint no-shadow: 0 */
- /* jshint validthis: true */
- var id = normalizeId(schema.id);
- var localRefs = {};
- _resolveIds.call(this, schema, getFullPath(id, false), id);
- return localRefs;
-
- /* @this Ajv */
- function _resolveIds(schema, fullPath, baseId) {
- /* jshint validthis: true */
- if (Array.isArray(schema)) {
- for (var i=0; i<schema.length; i++)
- _resolveIds.call(this, schema[i], fullPath+'/'+i, baseId);
- } else if (schema && typeof schema == 'object') {
- if (typeof schema.id == 'string') {
- var id = baseId = baseId
- ? url.resolve(baseId, schema.id)
- : schema.id;
- id = normalizeId(id);
-
- var refVal = this._refs[id];
- if (typeof refVal == 'string') refVal = this._refs[refVal];
- if (refVal && refVal.schema) {
- if (!equal(schema, refVal.schema))
- throw new Error('id "' + id + '" resolves to more than one schema');
- } else if (id != normalizeId(fullPath)) {
- if (id[0] == '#') {
- if (localRefs[id] && !equal(schema, localRefs[id]))
- throw new Error('id "' + id + '" resolves to more than one schema');
- localRefs[id] = schema;
- } else {
- this._refs[id] = fullPath;
- }
- }
- }
- for (var key in schema)
- _resolveIds.call(this, schema[key], fullPath+'/'+util.escapeFragment(key), baseId);
- }
- }
-}
-
-},{"./equal":4,"./schema_obj":9,"./util":11,"url":50}],8:[function(require,module,exports){
-'use strict';
-
-var ruleModules = require('./_rules')
- , toHash = require('./util').toHash;
-
-module.exports = function rules() {
- var RULES = [
- { type: 'number',
- rules: [ 'maximum', 'minimum', 'multipleOf'] },
- { type: 'string',
- rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
- { type: 'array',
- rules: [ 'maxItems', 'minItems', 'uniqueItems', 'items' ] },
- { type: 'object',
- rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'properties' ] },
- { rules: [ '$ref', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
- ];
-
- var ALL = [ 'type', 'additionalProperties', 'patternProperties' ];
- var KEYWORDS = [ 'additionalItems', '$schema', 'id', 'title', 'description', 'default' ];
- var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
- RULES.all = toHash(ALL);
-
- RULES.forEach(function (group) {
- group.rules = group.rules.map(function (keyword) {
- ALL.push(keyword);
- var rule = RULES.all[keyword] = {
- keyword: keyword,
- code: ruleModules[keyword]
- };
- return rule;
- });
- });
-
- RULES.keywords = toHash(ALL.concat(KEYWORDS));
- RULES.types = toHash(TYPES);
- RULES.custom = {};
-
- return RULES;
-};
-
-},{"./_rules":3,"./util":11}],9:[function(require,module,exports){
-'use strict';
-
-var util = require('./util');
-
-module.exports = SchemaObject;
-
-function SchemaObject(obj) {
- util.copy(obj, this);
-}
-
-},{"./util":11}],10:[function(require,module,exports){
-'use strict';
-
-// https://mathiasbynens.be/notes/javascript-encoding
-// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
-module.exports = function ucs2length(str) {
- var length = 0
- , len = str.length
- , pos = 0
- , value;
- while (pos < len) {
- length++;
- value = str.charCodeAt(pos++);
- if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
- // high surrogate, and there is a next character
- value = str.charCodeAt(pos);
- if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
- }
- }
- return length;
-};
-
-},{}],11:[function(require,module,exports){
-'use strict';
-
-
-module.exports = {
- copy: copy,
- checkDataType: checkDataType,
- checkDataTypes: checkDataTypes,
- coerceToTypes: coerceToTypes,
- toHash: toHash,
- getProperty: getProperty,
- escapeQuotes: escapeQuotes,
- ucs2length: require('./ucs2length'),
- varOccurences: varOccurences,
- varReplace: varReplace,
- cleanUpCode: cleanUpCode,
- cleanUpVarErrors: cleanUpVarErrors,
- schemaHasRules: schemaHasRules,
- schemaHasRulesExcept: schemaHasRulesExcept,
- stableStringify: require('json-stable-stringify'),
- toQuotedString: toQuotedString,
- getPathExpr: getPathExpr,
- getPath: getPath,
- getData: getData,
- unescapeFragment: unescapeFragment,
- escapeFragment: escapeFragment,
- escapeJsonPointer: escapeJsonPointer
-};
-
-
-function copy(o, to) {
- to = to || {};
- for (var key in o) to[key] = o[key];
- return to;
-}
-
-
-function checkDataType(dataType, data, negate) {
- var EQUAL = negate ? ' !== ' : ' === '
- , AND = negate ? ' || ' : ' && '
- , OK = negate ? '!' : ''
- , NOT = negate ? '' : '!';
- switch (dataType) {
- case 'null': return data + EQUAL + 'null';
- case 'array': return OK + 'Array.isArray(' + data + ')';
- case 'object': return '(' + OK + data + AND +
- 'typeof ' + data + EQUAL + '"object"' + AND +
- NOT + 'Array.isArray(' + data + '))';
- case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
- NOT + '(' + data + ' % 1)' +
- AND + data + EQUAL + data + ')';
- default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
- }
-}
-
-
-function checkDataTypes(dataTypes, data) {
- switch (dataTypes.length) {
- case 1: return checkDataType(dataTypes[0], data, true);
- default:
- var code = '';
- var types = toHash(dataTypes);
- if (types.array && types.object) {
- code = types.null ? '(': '(!' + data + ' || ';
- code += 'typeof ' + data + ' !== "object")';
- delete types.null;
- delete types.array;
- delete types.object;
- }
- if (types.number) delete types.integer;
- for (var t in types)
- code += (code ? ' && ' : '' ) + checkDataType(t, data, true);
-
- return code;
- }
-}
-
-
-var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
-function coerceToTypes(optionCoerceTypes, dataTypes) {
- if (Array.isArray(dataTypes)) {
- var types = [];
- for (var i=0; i<dataTypes.length; i++) {
- var t = dataTypes[i];
- if (COERCE_TO_TYPES[t]) types[types.length] = t;
- else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
- }
- if (types.length) return types;
- } else if (COERCE_TO_TYPES[dataTypes]) {
- return [dataTypes];
- } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
- return ['array'];
- }
-}
-
-
-function toHash(arr) {
- var hash = {};
- for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
- return hash;
-}
-
-
-var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
-var SINGLE_QUOTE = /'|\\/g;
-function getProperty(key) {
- return typeof key == 'number'
- ? '[' + key + ']'
- : IDENTIFIER.test(key)
- ? '.' + key
- : "['" + escapeQuotes(key) + "']";
-}
-
-
-function escapeQuotes(str) {
- return str.replace(SINGLE_QUOTE, '\\$&')
- .replace(/\n/g, '\\n')
- .replace(/\r/g, '\\r')
- .replace(/\f/g, '\\f')
- .replace(/\t/g, '\\t');
-}
-
-
-function varOccurences(str, dataVar) {
- dataVar += '[^0-9]';
- var matches = str.match(new RegExp(dataVar, 'g'));
- return matches ? matches.length : 0;
-}
-
-
-function varReplace(str, dataVar, expr) {
- dataVar += '([^0-9])';
- expr = expr.replace(/\$/g, '$$$$');
- return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
-}
-
-
-var EMPTY_ELSE = /else\s*{\s*}/g
- , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g
- , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;
-function cleanUpCode(out) {
- return out.replace(EMPTY_ELSE, '')
- .replace(EMPTY_IF_NO_ELSE, '')
- .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');
-}
-
-
-var ERRORS_REGEXP = /[^v\.]errors/g
- , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
- , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g
- , RETURN_VALID = 'return errors === 0;'
- , RETURN_TRUE = 'validate.errors = null; return true;'
- , RETURN_ASYNC = /if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/
- , RETURN_TRUE_ASYNC = 'return true;';
-
-function cleanUpVarErrors(out, async) {
- var matches = out.match(ERRORS_REGEXP);
- if (!matches || matches.length !== 2) return out;
- return async
- ? out.replace(REMOVE_ERRORS_ASYNC, '')
- .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)
- : out.replace(REMOVE_ERRORS, '')
- .replace(RETURN_VALID, RETURN_TRUE);
-}
-
-
-function schemaHasRules(schema, rules) {
- for (var key in schema) if (rules[key]) return true;
-}
-
-
-function schemaHasRulesExcept(schema, rules, exceptKeyword) {
- for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
-}
-
-
-function toQuotedString(str) {
- return '\'' + escapeQuotes(str) + '\'';
-}
-
-
-function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
- var path = jsonPointers // false by default
- ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
- : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
- return joinPaths(currentPath, path);
-}
-
-
-function getPath(currentPath, prop, jsonPointers) {
- var path = jsonPointers // false by default
- ? toQuotedString('/' + escapeJsonPointer(prop))
- : toQuotedString(getProperty(prop));
- return joinPaths(currentPath, path);
-}
-
-
-var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
-var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
-function getData($data, lvl, paths) {
- var up, jsonPointer, data, matches;
- if ($data === '') return 'rootData';
- if ($data[0] == '/') {
- if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
- jsonPointer = $data;
- data = 'rootData';
- } else {
- matches = $data.match(RELATIVE_JSON_POINTER);
- if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
- up = +matches[1];
- jsonPointer = matches[2];
- if (jsonPointer == '#') {
- if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
- return paths[lvl - up];
- }
-
- if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
- data = 'data' + ((lvl - up) || '');
- if (!jsonPointer) return data;
- }
-
- var expr = data;
- var segments = jsonPointer.split('/');
- for (var i=0; i<segments.length; i++) {
- var segment = segments[i];
- if (segment) {
- data += getProperty(unescapeJsonPointer(segment));
- expr += ' && ' + data;
- }
- }
- return expr;
-}
-
-
-function joinPaths (a, b) {
- if (a == '""') return b;
- return (a + ' + ' + b).replace(/' \+ '/g, '');
-}
-
-
-function unescapeFragment(str) {
- return unescapeJsonPointer(decodeURIComponent(str));
-}
-
-
-function escapeFragment(str) {
- return encodeURIComponent(escapeJsonPointer(str));
-}
-
-
-function escapeJsonPointer(str) {
- return str.replace(/~/g, '~0').replace(/\//g, '~1');
-}
-
-
-function unescapeJsonPointer(str) {
- return str.replace(/~1/g, '/').replace(/~0/g, '~');
-}
-
-},{"./ucs2length":10,"json-stable-stringify":42}],12:[function(require,module,exports){
-'use strict';
-
-module.exports = ValidationError;
-
-
-function ValidationError(errors) {
- this.message = 'validation failed';
- this.errors = errors;
- this.ajv = this.validation = true;
-}
-
-
-ValidationError.prototype = Object.create(Error.prototype);
-ValidationError.prototype.constructor = ValidationError;
-
-},{}],13:[function(require,module,exports){
-'use strict';
-module.exports = function generate__formatLimit(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- out += 'var ' + ($valid) + ' = undefined;';
- if (it.opts.format === false) {
- out += ' ' + ($valid) + ' = true; ';
- return out;
- }
- var $schemaFormat = it.schema.format,
- $isDataFormat = it.opts.v5 && $schemaFormat.$data,
- $closingBraces = '';
- if ($isDataFormat) {
- var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr),
- $format = 'format' + $lvl,
- $compare = 'compare' + $lvl;
- out += ' var ' + ($format) + ' = formats[' + ($schemaValueFormat) + '] , ' + ($compare) + ' = ' + ($format) + ' && ' + ($format) + '.compare;';
- } else {
- var $format = it.formats[$schemaFormat];
- if (!($format && $format.compare)) {
- out += ' ' + ($valid) + ' = true; ';
- return out;
- }
- var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare';
- }
- var $isMax = $keyword == 'formatMaximum',
- $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum'),
- $schemaExcl = it.schema[$exclusiveKeyword],
- $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
- $op = $isMax ? '<' : '>',
- $result = 'result' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- if ($isDataExcl) {
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
- $exclusive = 'exclusive' + $lvl,
- $opExpr = 'op' + $lvl,
- $opStr = '\' + ' + $opExpr + ' + \'';
- out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
- $schemaValueExcl = 'schemaExcl' + $lvl;
- out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';
- var $errorKeyword = $exclusiveKeyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- if ($isData) {
- out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
- $closingBraces += '}';
- }
- if ($isDataFormat) {
- out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
- $closingBraces += '}';
- }
- out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
- } else {
- var $exclusive = $schemaExcl === true,
- $opStr = $op;
- if (!$exclusive) $opStr += '=';
- var $opExpr = '\'' + $opStr + '\'';
- if ($isData) {
- out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
- $closingBraces += '}';
- }
- if ($isDataFormat) {
- out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
- $closingBraces += '}';
- }
- out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);
- if (!$exclusive) {
- out += '=';
- }
- out += ' 0;';
- }
- out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , exclusive: ' + ($exclusive) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ' + ($opStr) + ' "';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + (it.util.escapeQuotes($schema));
- }
- out += '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '}';
- return out;
-}
-
-},{}],14:[function(require,module,exports){
-'use strict';
-module.exports = function generate__limit(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $isMax = $keyword == 'maximum',
- $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
- $schemaExcl = it.schema[$exclusiveKeyword],
- $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
- $op = $isMax ? '<' : '>',
- $notOp = $isMax ? '>' : '<';
- if ($isDataExcl) {
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
- $exclusive = 'exclusive' + $lvl,
- $opExpr = 'op' + $lvl,
- $opStr = '\' + ' + $opExpr + ' + \'';
- out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
- $schemaValueExcl = 'schemaExcl' + $lvl;
- out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { ';
- var $errorKeyword = $exclusiveKeyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else if( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
- } else {
- var $exclusive = $schemaExcl === true,
- $opStr = $op;
- if (!$exclusive) $opStr += '=';
- var $opExpr = '\'' + $opStr + '\'';
- out += ' if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ' + ($data) + ' ' + ($notOp);
- if ($exclusive) {
- out += '=';
- }
- out += ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') {';
- }
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ' + ($opStr) + ' ';
- if ($isData) {
- out += '\' + ' + ($schemaValue);
- } else {
- out += '' + ($schema) + '\'';
- }
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],15:[function(require,module,exports){
-'use strict';
-module.exports = function generate__limitItems(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $op = $keyword == 'maxItems' ? '>' : '<';
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ';
- if ($keyword == 'maxItems') {
- out += 'more';
- } else {
- out += 'less';
- }
- out += ' than ';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + ($schema);
- }
- out += ' items\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],16:[function(require,module,exports){
-'use strict';
-module.exports = function generate__limitLength(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $op = $keyword == 'maxLength' ? '>' : '<';
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- if (it.opts.unicode === false) {
- out += ' ' + ($data) + '.length ';
- } else {
- out += ' ucs2length(' + ($data) + ') ';
- }
- out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT be ';
- if ($keyword == 'maxLength') {
- out += 'longer';
- } else {
- out += 'shorter';
- }
- out += ' than ';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + ($schema);
- }
- out += ' characters\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],17:[function(require,module,exports){
-'use strict';
-module.exports = function generate__limitProperties(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $op = $keyword == 'maxProperties' ? '>' : '<';
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ';
- if ($keyword == 'maxProperties') {
- out += 'more';
- } else {
- out += 'less';
- }
- out += ' than ';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + ($schema);
- }
- out += ' properties\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],18:[function(require,module,exports){
-'use strict';
-module.exports = function generate_allOf(it, $keyword) {
- var out = ' ';
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $currentBaseId = $it.baseId,
- $allSchemasEmpty = true;
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $allSchemasEmpty = false;
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- if ($breakOnError) {
- if ($allSchemasEmpty) {
- out += ' if (true) { ';
- } else {
- out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
- }
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
-
-},{}],19:[function(require,module,exports){
-'use strict';
-module.exports = function generate_anyOf(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $noEmptySchema = $schema.every(function($sch) {
- return it.util.schemaHasRules($sch, it.RULES.all);
- });
- if ($noEmptySchema) {
- var $currentBaseId = $it.baseId;
- out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
- $closingBraces += '}';
- }
- }
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match some schema in anyOf\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
- if (it.opts.allErrors) {
- out += ' } ';
- }
- out = it.util.cleanUpCode(out);
- } else {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- }
- return out;
-}
-
-},{}],20:[function(require,module,exports){
-'use strict';
-module.exports = function generate_constant(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- if (!$isData) {
- out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
- }
- out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be equal to constant\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' }';
- return out;
-}
-
-},{}],21:[function(require,module,exports){
-'use strict';
-module.exports = function generate_custom(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $rule = this,
- $definition = 'definition' + $lvl,
- $rDef = $rule.definition;
- var $compile, $inline, $macro, $ruleValidate, $validateCode;
- if ($isData && $rDef.$data) {
- $validateCode = 'keywordValidate' + $lvl;
- var $validateSchema = $rDef.validateSchema;
- out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
- } else {
- $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
- $schemaValue = 'validate.schema' + $schemaPath;
- $validateCode = $ruleValidate.code;
- $compile = $rDef.compile;
- $inline = $rDef.inline;
- $macro = $rDef.macro;
- }
- var $ruleErrs = $validateCode + '.errors',
- $i = 'i' + $lvl,
- $ruleErr = 'ruleErr' + $lvl,
- $asyncKeyword = $rDef.async;
- if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
- if (!($inline || $macro)) {
- out += '' + ($ruleErrs) + ' = null;';
- }
- out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if ($validateSchema) {
- out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') {';
- }
- if ($inline) {
- if ($rDef.statements) {
- out += ' ' + ($ruleValidate.validate) + ' ';
- } else {
- out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';
- }
- } else if ($macro) {
- var $it = it.util.copy(it);
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- $it.schema = $ruleValidate.validate;
- $it.schemaPath = '';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($code);
- } else {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = '';
- out += ' ' + ($validateCode) + '.call( ';
- if (it.opts.passContext) {
- out += 'this';
- } else {
- out += 'self';
- }
- if ($compile || $rDef.schema === false) {
- out += ' , ' + ($data) + ' ';
- } else {
- out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
- }
- out += ' , (dataPath || \'\')';
- if (it.errorPath != '""') {
- out += ' + ' + (it.errorPath);
- }
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';
- var def_callRuleValidate = out;
- out = $$outStack.pop();
- if ($rDef.errors === false) {
- out += ' ' + ($valid) + ' = ';
- if ($asyncKeyword) {
- out += '' + (it.yieldAwait);
- }
- out += '' + (def_callRuleValidate) + '; ';
- } else {
- if ($asyncKeyword) {
- $ruleErrs = 'customErrors' + $lvl;
- out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
- } else {
- out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';
- }
- }
- }
- if ($rDef.modifying) {
- out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
- }
- if ($validateSchema) {
- out += ' }';
- }
- if ($rDef.valid) {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- } else {
- out += ' if ( ';
- if ($rDef.valid === undefined) {
- out += ' !';
- if ($macro) {
- out += '' + ($nextValid);
- } else {
- out += '' + ($valid);
- }
- } else {
- out += ' ' + (!$rDef.valid) + ' ';
- }
- out += ') { ';
- $errorKeyword = $rule.keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = '';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- var def_customError = out;
- out = $$outStack.pop();
- if ($inline) {
- if ($rDef.errors) {
- if ($rDef.errors != 'full') {
- out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
- if (it.opts.verbose) {
- out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
- }
- out += ' } ';
- }
- } else {
- if ($rDef.errors === false) {
- out += ' ' + (def_customError) + ' ';
- } else {
- out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
- if (it.opts.verbose) {
- out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
- }
- out += ' } } ';
- }
- }
- } else if ($macro) {
- out += ' var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError(vErrors); ';
- } else {
- out += ' validate.errors = vErrors; return false; ';
- }
- }
- } else {
- if ($rDef.errors === false) {
- out += ' ' + (def_customError) + ' ';
- } else {
- out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
- if (it.opts.verbose) {
- out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
- }
- out += ' } } else { ' + (def_customError) + ' } ';
- }
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- }
- return out;
-}
-
-},{}],22:[function(require,module,exports){
-'use strict';
-module.exports = function generate_dependencies(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $schemaDeps = {},
- $propertyDeps = {};
- for ($property in $schema) {
- var $sch = $schema[$property];
- var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
- $deps[$property] = $sch;
- }
- out += 'var ' + ($errs) + ' = errors;';
- var $currentErrorPath = it.errorPath;
- out += 'var missing' + ($lvl) + ';';
- for (var $property in $propertyDeps) {
- $deps = $propertyDeps[$property];
- out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
- if ($breakOnError) {
- out += ' && ( ';
- var arr1 = $deps;
- if (arr1) {
- var _$property, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- _$property = arr1[$i += 1];
- if ($i) {
- out += ' || ';
- }
- var $prop = it.util.getProperty(_$property);
- out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
- }
- }
- out += ')) { ';
- var $propertyPath = 'missing' + $lvl,
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should have ';
- if ($deps.length == 1) {
- out += 'property ' + (it.util.escapeQuotes($deps[0]));
- } else {
- out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
- }
- out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- } else {
- out += ' ) { ';
- var arr2 = $deps;
- if (arr2) {
- var $reqProperty, i2 = -1,
- l2 = arr2.length - 1;
- while (i2 < l2) {
- $reqProperty = arr2[i2 += 1];
- var $prop = it.util.getProperty($reqProperty),
- $missingProperty = it.util.escapeQuotes($reqProperty);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
- }
- out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should have ';
- if ($deps.length == 1) {
- out += 'property ' + (it.util.escapeQuotes($deps[0]));
- } else {
- out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
- }
- out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
- }
- }
- }
- out += ' } ';
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- }
- it.errorPath = $currentErrorPath;
- var $currentBaseId = $it.baseId;
- for (var $property in $schemaDeps) {
- var $sch = $schemaDeps[$property];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- out += ' ' + ($nextValid) + ' = true; if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined) { ';
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + it.util.getProperty($property);
- $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
-
-},{}],23:[function(require,module,exports){
-'use strict';
-module.exports = function generate_enum(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $i = 'i' + $lvl,
- $vSchema = 'schema' + $lvl;
- if (!$isData) {
- out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
- }
- out += 'var ' + ($valid) + ';';
- if ($isData) {
- out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
- }
- out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
- if ($isData) {
- out += ' } ';
- }
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be equal to one of the allowed values\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' }';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],24:[function(require,module,exports){
-'use strict';
-module.exports = function generate_format(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- if (it.opts.format === false) {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- return out;
- }
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $unknownFormats = it.opts.unknownFormats,
- $allowUnknown = Array.isArray($unknownFormats);
- if ($isData) {
- var $format = 'format' + $lvl;
- out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { ';
- if (it.async) {
- out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
- }
- out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
- }
- out += ' (';
- if ($unknownFormats === true || $allowUnknown) {
- out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
- if ($allowUnknown) {
- out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
- }
- out += ') || ';
- }
- out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? ';
- if (it.async) {
- out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
- } else {
- out += ' ' + ($format) + '(' + ($data) + ') ';
- }
- out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
- } else {
- var $format = it.formats[$schema];
- if (!$format) {
- if ($unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1)) {
- throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
- } else {
- if (!$allowUnknown) {
- console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
- if ($unknownFormats !== 'ignore') console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
- }
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- return out;
- }
- }
- var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
- if ($isObject) {
- var $async = $format.async === true;
- $format = $format.validate;
- }
- if ($async) {
- if (!it.async) throw new Error('async format in sync schema');
- var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
- out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
- } else {
- out += ' if (! ';
- var $formatRef = 'formats' + it.util.getProperty($schema);
- if ($isObject) $formatRef += '.validate';
- if (typeof $format == 'function') {
- out += ' ' + ($formatRef) + '(' + ($data) + ') ';
- } else {
- out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
- }
- out += ') { ';
- }
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match format "';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + (it.util.escapeQuotes($schema));
- }
- out += '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],25:[function(require,module,exports){
-'use strict';
-module.exports = function generate_items(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $idx = 'i' + $lvl,
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $currentBaseId = it.baseId;
- out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if (Array.isArray($schema)) {
- var $additionalItems = it.schema.additionalItems;
- if ($additionalItems === false) {
- out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
- var $currErrSchemaPath = $errSchemaPath;
- $errSchemaPath = it.errSchemaPath + '/additionalItems';
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- $errSchemaPath = $currErrSchemaPath;
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- }
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
- var $passData = $data + '[' + $i + ']';
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
- $it.dataPathArr[$dataNxt] = $i;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
- $it.schema = $additionalItems;
- $it.schemaPath = it.schemaPath + '.additionalItems';
- $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
- out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- } else if (it.util.schemaHasRules($schema, it.RULES.all)) {
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
-
-},{}],26:[function(require,module,exports){
-'use strict';
-module.exports = function generate_multipleOf(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- out += 'var division' + ($lvl) + ';if (';
- if ($isData) {
- out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
- }
- out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
- if (it.opts.multipleOfPrecision) {
- out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
- } else {
- out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
- }
- out += ' ) ';
- if ($isData) {
- out += ' ) ';
- }
- out += ' ) { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be multiple of ';
- if ($isData) {
- out += '\' + ' + ($schemaValue);
- } else {
- out += '' + ($schema) + '\'';
- }
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],27:[function(require,module,exports){
-'use strict';
-module.exports = function generate_not(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- if (it.util.schemaHasRules($schema, it.RULES.all)) {
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- out += ' var ' + ($errs) + ' = errors; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.createErrors = false;
- var $allErrorsOption;
- if ($it.opts.allErrors) {
- $allErrorsOption = $it.opts.allErrors;
- $it.opts.allErrors = false;
- }
- out += ' ' + (it.validate($it)) + ' ';
- $it.createErrors = true;
- if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' if (' + ($nextValid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT be valid\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
- if (it.opts.allErrors) {
- out += ' } ';
- }
- } else {
- out += ' var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT be valid\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- if ($breakOnError) {
- out += ' if (false) { ';
- }
- }
- return out;
-}
-
-},{}],28:[function(require,module,exports){
-'use strict';
-module.exports = function generate_oneOf(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;';
- var $currentBaseId = $it.baseId;
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- } else {
- out += ' var ' + ($nextValid) + ' = true; ';
- }
- if ($i) {
- out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';
- $closingBraces += '}';
- }
- out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';
- }
- }
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match exactly one schema in oneOf\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
- if (it.opts.allErrors) {
- out += ' } ';
- }
- return out;
-}
-
-},{}],29:[function(require,module,exports){
-'use strict';
-module.exports = function generate_pattern(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
- }
- out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match pattern "';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + (it.util.escapeQuotes($schema));
- }
- out += '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],30:[function(require,module,exports){
-'use strict';
-module.exports = function generate_patternRequired(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $key = 'key' + $lvl,
- $matched = 'patternMatched' + $lvl,
- $closingBraces = '',
- $ownProperties = it.opts.ownProperties;
- out += 'var ' + ($valid) + ' = true;';
- var arr1 = $schema;
- if (arr1) {
- var $pProperty, i1 = -1,
- l1 = arr1.length - 1;
- while (i1 < l1) {
- $pProperty = arr1[i1 += 1];
- out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';
- var $missingPattern = it.util.escapeQuotes($pProperty);
- out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- }
- }
- out += '' + ($closingBraces);
- return out;
-}
-
-},{}],31:[function(require,module,exports){
-'use strict';
-module.exports = function generate_properties(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $key = 'key' + $lvl,
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt;
- var $schemaKeys = Object.keys($schema || {}),
- $pProperties = it.schema.patternProperties || {},
- $pPropertyKeys = Object.keys($pProperties),
- $aProperties = it.schema.additionalProperties,
- $someProperties = $schemaKeys.length || $pPropertyKeys.length,
- $noAdditional = $aProperties === false,
- $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
- $removeAdditional = it.opts.removeAdditional,
- $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
- $ownProperties = it.opts.ownProperties,
- $currentBaseId = it.baseId;
- var $required = it.schema.required;
- if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);
- if (it.opts.v5) {
- var $pgProperties = it.schema.patternGroups || {},
- $pgPropertyKeys = Object.keys($pgProperties);
- }
- out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
- if ($checkAdditional) {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- if ($someProperties) {
- out += ' var isAdditional' + ($lvl) + ' = !(false ';
- if ($schemaKeys.length) {
- if ($schemaKeys.length > 5) {
- out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] ';
- } else {
- var arr1 = $schemaKeys;
- if (arr1) {
- var $propertyKey, i1 = -1,
- l1 = arr1.length - 1;
- while (i1 < l1) {
- $propertyKey = arr1[i1 += 1];
- out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
- }
- }
- }
- }
- if ($pPropertyKeys.length) {
- var arr2 = $pPropertyKeys;
- if (arr2) {
- var $pProperty, $i = -1,
- l2 = arr2.length - 1;
- while ($i < l2) {
- $pProperty = arr2[$i += 1];
- out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
- }
- }
- }
- if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {
- var arr3 = $pgPropertyKeys;
- if (arr3) {
- var $pgProperty, $i = -1,
- l3 = arr3.length - 1;
- while ($i < l3) {
- $pgProperty = arr3[$i += 1];
- out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') ';
- }
- }
- }
- out += ' ); if (isAdditional' + ($lvl) + ') { ';
- }
- if ($removeAdditional == 'all') {
- out += ' delete ' + ($data) + '[' + ($key) + ']; ';
- } else {
- var $currentErrorPath = it.errorPath;
- var $additionalProperty = '\' + ' + $key + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- }
- if ($noAdditional) {
- if ($removeAdditional) {
- out += ' delete ' + ($data) + '[' + ($key) + ']; ';
- } else {
- out += ' ' + ($nextValid) + ' = false; ';
- var $currErrSchemaPath = $errSchemaPath;
- $errSchemaPath = it.errSchemaPath + '/additionalProperties';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have additional properties\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- $errSchemaPath = $currErrSchemaPath;
- if ($breakOnError) {
- out += ' break; ';
- }
- }
- } else if ($additionalIsSchema) {
- if ($removeAdditional == 'failing') {
- out += ' var ' + ($errs) + ' = errors; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.schema = $aProperties;
- $it.schemaPath = it.schemaPath + '.additionalProperties';
- $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
- $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
- it.compositeRule = $it.compositeRule = $wasComposite;
- } else {
- $it.schema = $aProperties;
- $it.schemaPath = it.schemaPath + '.additionalProperties';
- $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
- $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- }
- }
- it.errorPath = $currentErrorPath;
- }
- if ($someProperties) {
- out += ' } ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- var $useDefaults = it.opts.useDefaults && !it.compositeRule;
- if ($schemaKeys.length) {
- var arr4 = $schemaKeys;
- if (arr4) {
- var $propertyKey, i4 = -1,
- l4 = arr4.length - 1;
- while (i4 < l4) {
- $propertyKey = arr4[i4 += 1];
- var $sch = $schema[$propertyKey];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- var $prop = it.util.getProperty($propertyKey),
- $passData = $data + $prop,
- $hasDefault = $useDefaults && $sch.default !== undefined;
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + $prop;
- $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
- $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
- $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- $code = it.util.varReplace($code, $nextData, $passData);
- var $useData = $passData;
- } else {
- var $useData = $nextData;
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
- }
- if ($hasDefault) {
- out += ' ' + ($code) + ' ';
- } else {
- if ($requiredHash && $requiredHash[$propertyKey]) {
- out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = false; ';
- var $currentErrorPath = it.errorPath,
- $currErrSchemaPath = $errSchemaPath,
- $missingProperty = it.util.escapeQuotes($propertyKey);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
- }
- $errSchemaPath = it.errSchemaPath + '/required';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- $errSchemaPath = $currErrSchemaPath;
- it.errorPath = $currentErrorPath;
- out += ' } else { ';
- } else {
- if ($breakOnError) {
- out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = true; } else { ';
- } else {
- out += ' if (' + ($useData) + ' !== undefined) { ';
- }
- }
- out += ' ' + ($code) + ' } ';
- }
- }
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- var arr5 = $pPropertyKeys;
- if (arr5) {
- var $pProperty, i5 = -1,
- l5 = arr5.length - 1;
- while (i5 < l5) {
- $pProperty = arr5[i5 += 1];
- var $sch = $pProperties[$pProperty];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $it.schema = $sch;
- $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
- $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else ' + ($nextValid) + ' = true; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- if (it.opts.v5) {
- var arr6 = $pgPropertyKeys;
- if (arr6) {
- var $pgProperty, i6 = -1,
- l6 = arr6.length - 1;
- while (i6 < l6) {
- $pgProperty = arr6[i6 += 1];
- var $pgSchema = $pgProperties[$pgProperty],
- $sch = $pgSchema.schema;
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $it.schema = $sch;
- $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
- $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';
- out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else ' + ($nextValid) + ' = true; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- var $pgMin = $pgSchema.minimum,
- $pgMax = $pgSchema.maximum;
- if ($pgMin !== undefined || $pgMax !== undefined) {
- out += ' var ' + ($valid) + ' = true; ';
- var $currErrSchemaPath = $errSchemaPath;
- if ($pgMin !== undefined) {
- var $limit = $pgMin,
- $reason = 'minimum',
- $moreOrLess = 'less';
- out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';
- $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($pgMax !== undefined) {
- out += ' else ';
- }
- }
- if ($pgMax !== undefined) {
- var $limit = $pgMax,
- $reason = 'maximum',
- $moreOrLess = 'more';
- out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';
- $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- }
- $errSchemaPath = $currErrSchemaPath;
- if ($breakOnError) {
- out += ' if (' + ($valid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
-
-},{}],32:[function(require,module,exports){
-'use strict';
-module.exports = function generate_ref(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $async, $refCode;
- if ($schema == '#' || $schema == '#/') {
- if (it.isRoot) {
- $async = it.async;
- $refCode = 'validate';
- } else {
- $async = it.root.schema.$async === true;
- $refCode = 'root.refVal[0]';
- }
- } else {
- var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
- if ($refVal === undefined) {
- var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId;
- if (it.opts.missingRefs == 'fail') {
- console.log($message);
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- if ($breakOnError) {
- out += ' if (false) { ';
- }
- } else if (it.opts.missingRefs == 'ignore') {
- console.log($message);
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- } else {
- var $error = new Error($message);
- $error.missingRef = it.resolve.url(it.baseId, $schema);
- $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));
- throw $error;
- }
- } else if ($refVal.inline) {
- var $it = it.util.copy(it);
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- $it.schema = $refVal.schema;
- $it.schemaPath = '';
- $it.errSchemaPath = $schema;
- var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
- out += ' ' + ($code) + ' ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- }
- } else {
- $async = $refVal.$async === true;
- $refCode = $refVal.code;
- }
- }
- if ($refCode) {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = '';
- if (it.opts.passContext) {
- out += ' ' + ($refCode) + '.call(this, ';
- } else {
- out += ' ' + ($refCode) + '( ';
- }
- out += ' ' + ($data) + ', (dataPath || \'\')';
- if (it.errorPath != '""') {
- out += ' + ' + (it.errorPath);
- }
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
- var __callValidate = out;
- out = $$outStack.pop();
- if ($async) {
- if (!it.async) throw new Error('async schema referenced by sync schema');
- out += ' try { ';
- if ($breakOnError) {
- out += 'var ' + ($valid) + ' =';
- }
- out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';
- if ($breakOnError) {
- out += ' if (' + ($valid) + ') { ';
- }
- } else {
- out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- }
- }
- return out;
-}
-
-},{}],33:[function(require,module,exports){
-'use strict';
-module.exports = function generate_required(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $vSchema = 'schema' + $lvl;
- if (!$isData) {
- if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
- var $required = [];
- var arr1 = $schema;
- if (arr1) {
- var $property, i1 = -1,
- l1 = arr1.length - 1;
- while (i1 < l1) {
- $property = arr1[i1 += 1];
- var $propertySch = it.schema.properties[$property];
- if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
- $required[$required.length] = $property;
- }
- }
- }
- } else {
- var $required = $schema;
- }
- }
- if ($isData || $required.length) {
- var $currentErrorPath = it.errorPath,
- $loopRequired = $isData || $required.length >= it.opts.loopRequired;
- if ($breakOnError) {
- out += ' var missing' + ($lvl) + '; ';
- if ($loopRequired) {
- if (!$isData) {
- out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
- }
- var $i = 'i' + $lvl,
- $propertyPath = 'schema' + $lvl + '[' + $i + ']',
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
- }
- out += ' var ' + ($valid) + ' = true; ';
- if ($isData) {
- out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
- }
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';
- if ($isData) {
- out += ' } ';
- }
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { ';
- } else {
- out += ' if ( ';
- var arr2 = $required;
- if (arr2) {
- var _$property, $i = -1,
- l2 = arr2.length - 1;
- while ($i < l2) {
- _$property = arr2[$i += 1];
- if ($i) {
- out += ' || ';
- }
- var $prop = it.util.getProperty(_$property);
- out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
- }
- }
- out += ') { ';
- var $propertyPath = 'missing' + $lvl,
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { ';
- }
- } else {
- if ($loopRequired) {
- if (!$isData) {
- out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
- }
- var $i = 'i' + $lvl,
- $propertyPath = 'schema' + $lvl + '[' + $i + ']',
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
- }
- if ($isData) {
- out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
- }
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
- if ($isData) {
- out += ' } ';
- }
- } else {
- var arr3 = $required;
- if (arr3) {
- var $reqProperty, i3 = -1,
- l3 = arr3.length - 1;
- while (i3 < l3) {
- $reqProperty = arr3[i3 += 1];
- var $prop = it.util.getProperty($reqProperty),
- $missingProperty = it.util.escapeQuotes($reqProperty);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
- }
- out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
- }
- }
- }
- }
- it.errorPath = $currentErrorPath;
- } else if ($breakOnError) {
- out += ' if (true) {';
- }
- return out;
-}
-
-},{}],34:[function(require,module,exports){
-'use strict';
-module.exports = function generate_switch(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $ifPassed = 'ifPassed' + it.level,
- $currentBaseId = $it.baseId,
- $shouldContinue;
- out += 'var ' + ($ifPassed) + ';';
- var arr1 = $schema;
- if (arr1) {
- var $sch, $caseIndex = -1,
- l1 = arr1.length - 1;
- while ($caseIndex < l1) {
- $sch = arr1[$caseIndex += 1];
- if ($caseIndex && !$shouldContinue) {
- out += ' if (!' + ($ifPassed) + ') { ';
- $closingBraces += '}';
- }
- if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {
- out += ' var ' + ($errs) + ' = errors; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.createErrors = false;
- $it.schema = $sch.if;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- $it.createErrors = true;
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($ifPassed) + ' = ' + ($nextValid) + '; if (' + ($ifPassed) + ') { ';
- if (typeof $sch.then == 'boolean') {
- if ($sch.then === false) {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "switch" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- }
- out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; ';
- } else {
- $it.schema = $sch.then;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- }
- out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';
- } else {
- out += ' ' + ($ifPassed) + ' = true; ';
- if (typeof $sch.then == 'boolean') {
- if ($sch.then === false) {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "switch" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- }
- out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; ';
- } else {
- $it.schema = $sch.then;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- }
- }
- $shouldContinue = $sch.continue
- }
- }
- out += '' + ($closingBraces) + 'var ' + ($valid) + ' = ' + ($nextValid) + '; ';
- out = it.util.cleanUpCode(out);
- return out;
-}
-
-},{}],35:[function(require,module,exports){
-'use strict';
-module.exports = function generate_uniqueItems(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- if (($schema || $isData) && it.opts.uniqueItems !== false) {
- if ($isData) {
- out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
- }
- out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';
- if ($isData) {
- out += ' } ';
- }
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- } else {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- }
- return out;
-}
-
-},{}],36:[function(require,module,exports){
-'use strict';
-module.exports = function generate_validate(it, $keyword) {
- var out = '';
- var $async = it.schema.$async === true;
- if (it.isTop) {
- var $top = it.isTop,
- $lvl = it.level = 0,
- $dataLvl = it.dataLevel = 0,
- $data = 'data';
- it.rootId = it.resolve.fullPath(it.root.schema.id);
- it.baseId = it.baseId || it.rootId;
- if ($async) {
- it.async = true;
- var $es7 = it.opts.async == 'es7';
- it.yieldAwait = $es7 ? 'await' : 'yield';
- }
- delete it.isTop;
- it.dataPathArr = [undefined];
- out += ' var validate = ';
- if ($async) {
- if ($es7) {
- out += ' (async function ';
- } else {
- if (it.opts.async == 'co*') {
- out += 'co.wrap';
- }
- out += '(function* ';
- }
- } else {
- out += ' (function ';
- }
- out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; var vErrors = null; ';
- out += ' var errors = 0; ';
- out += ' if (rootData === undefined) rootData = data;';
- } else {
- var $lvl = it.level,
- $dataLvl = it.dataLevel,
- $data = 'data' + ($dataLvl || '');
- if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);
- if ($async && !it.async) throw new Error('async schema in sync schema');
- out += ' var errs_' + ($lvl) + ' = errors;';
- }
- var $valid = 'valid' + $lvl,
- $breakOnError = !it.opts.allErrors,
- $closingBraces1 = '',
- $closingBraces2 = '';
- var $typeSchema = it.schema.type,
- $typeIsArray = Array.isArray($typeSchema);
- if ($typeSchema && it.opts.coerceTypes) {
- var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
- if ($coerceToTypes) {
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type',
- $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
- out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
- var $dataType = 'dataType' + $lvl,
- $coerced = 'coerced' + $lvl;
- out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';
- if (it.opts.coerceTypes == 'array') {
- out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; ';
- }
- out += ' var ' + ($coerced) + ' = undefined; ';
- var $bracesCoercion = '';
- var arr1 = $coerceToTypes;
- if (arr1) {
- var $type, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $type = arr1[$i += 1];
- if ($i) {
- out += ' if (' + ($coerced) + ' === undefined) { ';
- $bracesCoercion += '}';
- }
- if (it.opts.coerceTypes == 'array' && $type != 'array') {
- out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
- }
- if ($type == 'string') {
- out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
- } else if ($type == 'number' || $type == 'integer') {
- out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
- if ($type == 'integer') {
- out += ' && !(' + ($data) + ' % 1)';
- }
- out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
- } else if ($type == 'boolean') {
- out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
- } else if ($type == 'null') {
- out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
- } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
- out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
- }
- }
- }
- out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { ';
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
- if (!$dataLvl) {
- out += 'if (' + ($parentData) + ' !== undefined)';
- }
- out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } } ';
- }
- }
- var $refKeywords;
- if (it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'))) {
- if (it.opts.extendRefs == 'fail') {
- throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"');
- } else if (it.opts.extendRefs == 'ignore') {
- $refKeywords = false;
- console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
- } else if (it.opts.extendRefs !== true) {
- console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour');
- }
- }
- if (it.schema.$ref && !$refKeywords) {
- out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
- if ($breakOnError) {
- out += ' } if (errors === ';
- if ($top) {
- out += '0';
- } else {
- out += 'errs_' + ($lvl);
- }
- out += ') { ';
- $closingBraces2 += '}';
- }
- } else {
- var arr2 = it.RULES;
- if (arr2) {
- var $rulesGroup, i2 = -1,
- l2 = arr2.length - 1;
- while (i2 < l2) {
- $rulesGroup = arr2[i2 += 1];
- if ($shouldUseGroup($rulesGroup)) {
- if ($rulesGroup.type) {
- out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
- }
- if (it.opts.useDefaults && !it.compositeRule) {
- if ($rulesGroup.type == 'object' && it.schema.properties) {
- var $schema = it.schema.properties,
- $schemaKeys = Object.keys($schema);
- var arr3 = $schemaKeys;
- if (arr3) {
- var $propertyKey, i3 = -1,
- l3 = arr3.length - 1;
- while (i3 < l3) {
- $propertyKey = arr3[i3 += 1];
- var $sch = $schema[$propertyKey];
- if ($sch.default !== undefined) {
- var $passData = $data + it.util.getProperty($propertyKey);
- out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
- if (it.opts.useDefaults == 'shared') {
- out += ' ' + (it.useDefault($sch.default)) + ' ';
- } else {
- out += ' ' + (JSON.stringify($sch.default)) + ' ';
- }
- out += '; ';
- }
- }
- }
- } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
- var arr4 = it.schema.items;
- if (arr4) {
- var $sch, $i = -1,
- l4 = arr4.length - 1;
- while ($i < l4) {
- $sch = arr4[$i += 1];
- if ($sch.default !== undefined) {
- var $passData = $data + '[' + $i + ']';
- out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
- if (it.opts.useDefaults == 'shared') {
- out += ' ' + (it.useDefault($sch.default)) + ' ';
- } else {
- out += ' ' + (JSON.stringify($sch.default)) + ' ';
- }
- out += '; ';
- }
- }
- }
- }
- }
- var arr5 = $rulesGroup.rules;
- if (arr5) {
- var $rule, i5 = -1,
- l5 = arr5.length - 1;
- while (i5 < l5) {
- $rule = arr5[i5 += 1];
- if ($shouldUseRule($rule)) {
- out += ' ' + ($rule.code(it, $rule.keyword)) + ' ';
- if ($breakOnError) {
- $closingBraces1 += '}';
- }
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces1) + ' ';
- $closingBraces1 = '';
- }
- if ($rulesGroup.type) {
- out += ' } ';
- if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
- var $typeChecked = true;
- out += ' else { ';
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- }
- }
- if ($breakOnError) {
- out += ' if (errors === ';
- if ($top) {
- out += '0';
- } else {
- out += 'errs_' + ($lvl);
- }
- out += ') { ';
- $closingBraces2 += '}';
- }
- }
- }
- }
- }
- if ($typeSchema && !$typeChecked && !$coerceToTypes) {
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type',
- $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
- out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' }';
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces2) + ' ';
- }
- if ($top) {
- if ($async) {
- out += ' if (errors === 0) return true; ';
- out += ' else throw new ValidationError(vErrors); ';
- } else {
- out += ' validate.errors = vErrors; ';
- out += ' return errors === 0; ';
- }
- out += ' }); return validate;';
- } else {
- out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
- }
- out = it.util.cleanUpCode(out);
- if ($top && $breakOnError) {
- out = it.util.cleanUpVarErrors(out, $async);
- }
-
- function $shouldUseGroup($rulesGroup) {
- for (var i = 0; i < $rulesGroup.rules.length; i++)
- if ($shouldUseRule($rulesGroup.rules[i])) return true;
- }
-
- function $shouldUseRule($rule) {
- return it.schema[$rule.keyword] !== undefined || ($rule.keyword == 'properties' && (it.schema.additionalProperties === false || typeof it.schema.additionalProperties == 'object' || (it.schema.patternProperties && Object.keys(it.schema.patternProperties).length) || (it.opts.v5 && it.schema.patternGroups && Object.keys(it.schema.patternGroups).length)));
- }
- return out;
-}
-
-},{}],37:[function(require,module,exports){
-'use strict';
-
-var IDENTIFIER = /^[a-z_$][a-z0-9_$\-]*$/i;
-var customRuleCode = require('./dotjs/custom');
-
-module.exports = {
- add: addKeyword,
- get: getKeyword,
- remove: removeKeyword
-};
-
-/**
- * Define custom keyword
- * @this Ajv
- * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
- * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
- */
-function addKeyword(keyword, definition) {
- /* jshint validthis: true */
- /* eslint no-shadow: 0 */
- var RULES = this.RULES;
-
- if (RULES.keywords[keyword])
- throw new Error('Keyword ' + keyword + ' is already defined');
-
- if (!IDENTIFIER.test(keyword))
- throw new Error('Keyword ' + keyword + ' is not a valid identifier');
-
- if (definition) {
- if (definition.macro && definition.valid !== undefined)
- throw new Error('"valid" option cannot be used with macro keywords');
-
- var dataType = definition.type;
- if (Array.isArray(dataType)) {
- var i, len = dataType.length;
- for (i=0; i<len; i++) checkDataType(dataType[i]);
- for (i=0; i<len; i++) _addRule(keyword, dataType[i], definition);
- } else {
- if (dataType) checkDataType(dataType);
- _addRule(keyword, dataType, definition);
- }
-
- var $data = definition.$data === true && this._opts.v5;
- if ($data && !definition.validate)
- throw new Error('$data support: "validate" function is not defined');
-
- var metaSchema = definition.metaSchema;
- if (metaSchema) {
- if ($data) {
- metaSchema = {
- anyOf: [
- metaSchema,
- { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' }
- ]
- };
- }
- definition.validateSchema = this.compile(metaSchema, true);
- }
- }
-
- RULES.keywords[keyword] = RULES.all[keyword] = true;
-
-
- function _addRule(keyword, dataType, definition) {
- var ruleGroup;
- for (var i=0; i<RULES.length; i++) {
- var rg = RULES[i];
- if (rg.type == dataType) {
- ruleGroup = rg;
- break;
- }
- }
-
- if (!ruleGroup) {
- ruleGroup = { type: dataType, rules: [] };
- RULES.push(ruleGroup);
- }
-
- var rule = {
- keyword: keyword,
- definition: definition,
- custom: true,
- code: customRuleCode
- };
- ruleGroup.rules.push(rule);
- RULES.custom[keyword] = rule;
- }
-
-
- function checkDataType(dataType) {
- if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
- }
-}
-
-
-/**
- * Get keyword
- * @this Ajv
- * @param {String} keyword pre-defined or custom keyword.
- * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
- */
-function getKeyword(keyword) {
- /* jshint validthis: true */
- var rule = this.RULES.custom[keyword];
- return rule ? rule.definition : this.RULES.keywords[keyword] || false;
-}
-
-
-/**
- * Remove keyword
- * @this Ajv
- * @param {String} keyword pre-defined or custom keyword.
- */
-function removeKeyword(keyword) {
- /* jshint validthis: true */
- var RULES = this.RULES;
- delete RULES.keywords[keyword];
- delete RULES.all[keyword];
- delete RULES.custom[keyword];
- for (var i=0; i<RULES.length; i++) {
- var rules = RULES[i].rules;
- for (var j=0; j<rules.length; j++) {
- if (rules[j].keyword == keyword) {
- rules.splice(j, 1);
- break;
- }
- }
- }
-}
-
-},{"./dotjs/custom":21}],38:[function(require,module,exports){
-module.exports={
- "id": "http://json-schema.org/draft-04/schema#",
- "$schema": "http://json-schema.org/draft-04/schema#",
- "description": "Core schema meta-schema",
- "definitions": {
- "schemaArray": {
- "type": "array",
- "minItems": 1,
- "items": { "$ref": "#" }
- },
- "positiveInteger": {
- "type": "integer",
- "minimum": 0
- },
- "positiveIntegerDefault0": {
- "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
- },
- "simpleTypes": {
- "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
- },
- "stringArray": {
- "type": "array",
- "items": { "type": "string" },
- "minItems": 1,
- "uniqueItems": true
- }
- },
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uri"
- },
- "$schema": {
- "type": "string",
- "format": "uri"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "default": {},
- "multipleOf": {
- "type": "number",
- "minimum": 0,
- "exclusiveMinimum": true
- },
- "maximum": {
- "type": "number"
- },
- "exclusiveMaximum": {
- "type": "boolean",
- "default": false
- },
- "minimum": {
- "type": "number"
- },
- "exclusiveMinimum": {
- "type": "boolean",
- "default": false
- },
- "maxLength": { "$ref": "#/definitions/positiveInteger" },
- "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "pattern": {
- "type": "string",
- "format": "regex"
- },
- "additionalItems": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ],
- "default": {}
- },
- "items": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/schemaArray" }
- ],
- "default": {}
- },
- "maxItems": { "$ref": "#/definitions/positiveInteger" },
- "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "uniqueItems": {
- "type": "boolean",
- "default": false
- },
- "maxProperties": { "$ref": "#/definitions/positiveInteger" },
- "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "required": { "$ref": "#/definitions/stringArray" },
- "additionalProperties": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ],
- "default": {}
- },
- "definitions": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "properties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "patternProperties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "dependencies": {
- "type": "object",
- "additionalProperties": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/stringArray" }
- ]
- }
- },
- "enum": {
- "type": "array",
- "minItems": 1,
- "uniqueItems": true
- },
- "type": {
- "anyOf": [
- { "$ref": "#/definitions/simpleTypes" },
- {
- "type": "array",
- "items": { "$ref": "#/definitions/simpleTypes" },
- "minItems": 1,
- "uniqueItems": true
- }
- ]
- },
- "allOf": { "$ref": "#/definitions/schemaArray" },
- "anyOf": { "$ref": "#/definitions/schemaArray" },
- "oneOf": { "$ref": "#/definitions/schemaArray" },
- "not": { "$ref": "#" }
- },
- "dependencies": {
- "exclusiveMaximum": [ "maximum" ],
- "exclusiveMinimum": [ "minimum" ]
- },
- "default": {}
-}
-
-},{}],39:[function(require,module,exports){
-module.exports={
- "id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",
- "$schema": "http://json-schema.org/draft-04/schema#",
- "description": "Core schema meta-schema (v5 proposals)",
- "definitions": {
- "schemaArray": {
- "type": "array",
- "minItems": 1,
- "items": { "$ref": "#" }
- },
- "positiveInteger": {
- "type": "integer",
- "minimum": 0
- },
- "positiveIntegerDefault0": {
- "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
- },
- "simpleTypes": {
- "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
- },
- "stringArray": {
- "type": "array",
- "items": { "type": "string" },
- "minItems": 1,
- "uniqueItems": true
- },
- "$data": {
- "type": "object",
- "required": [ "$data" ],
- "properties": {
- "$data": {
- "type": "string",
- "anyOf": [
- { "format": "relative-json-pointer" },
- { "format": "json-pointer" }
- ]
- }
- },
- "additionalProperties": false
- }
- },
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uri"
- },
- "$schema": {
- "type": "string",
- "format": "uri"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "default": {},
- "multipleOf": {
- "anyOf": [
- {
- "type": "number",
- "minimum": 0,
- "exclusiveMinimum": true
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "maximum": {
- "anyOf": [
- { "type": "number" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "exclusiveMaximum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minimum": {
- "anyOf": [
- { "type": "number" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "exclusiveMinimum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "maxLength": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minLength": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "pattern": {
- "anyOf": [
- {
- "type": "string",
- "format": "regex"
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "additionalItems": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" },
- { "$ref": "#/definitions/$data" }
- ],
- "default": {}
- },
- "items": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/schemaArray" }
- ],
- "default": {}
- },
- "maxItems": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minItems": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "uniqueItems": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "maxProperties": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minProperties": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "required": {
- "anyOf": [
- { "$ref": "#/definitions/stringArray" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "additionalProperties": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" },
- { "$ref": "#/definitions/$data" }
- ],
- "default": {}
- },
- "definitions": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "properties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "patternProperties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "dependencies": {
- "type": "object",
- "additionalProperties": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/stringArray" }
- ]
- }
- },
- "enum": {
- "anyOf": [
- {
- "type": "array",
- "minItems": 1,
- "uniqueItems": true
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "type": {
- "anyOf": [
- { "$ref": "#/definitions/simpleTypes" },
- {
- "type": "array",
- "items": { "$ref": "#/definitions/simpleTypes" },
- "minItems": 1,
- "uniqueItems": true
- }
- ]
- },
- "allOf": { "$ref": "#/definitions/schemaArray" },
- "anyOf": { "$ref": "#/definitions/schemaArray" },
- "oneOf": { "$ref": "#/definitions/schemaArray" },
- "not": { "$ref": "#" },
- "format": {
- "anyOf": [
- { "type": "string" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatMaximum": {
- "anyOf": [
- { "type": "string" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatMinimum": {
- "anyOf": [
- { "type": "string" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatExclusiveMaximum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatExclusiveMinimum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "constant": {
- "anyOf": [
- {},
- { "$ref": "#/definitions/$data" }
- ]
- },
- "contains": { "$ref": "#" },
- "patternGroups": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "required": [ "schema" ],
- "properties": {
- "maximum": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minimum": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "schema": { "$ref": "#" }
- },
- "additionalProperties": false
- },
- "default": {}
- },
- "switch": {
- "type": "array",
- "items": {
- "required": [ "then" ],
- "properties": {
- "if": { "$ref": "#" },
- "then": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ]
- },
- "continue": { "type": "boolean" }
- },
- "additionalProperties": false,
- "dependencies": {
- "continue": [ "if" ]
- }
- }
- }
- },
- "dependencies": {
- "exclusiveMaximum": [ "maximum" ],
- "exclusiveMinimum": [ "minimum" ],
- "formatMaximum": [ "format" ],
- "formatMinimum": [ "format" ],
- "formatExclusiveMaximum": [ "formatMaximum" ],
- "formatExclusiveMinimum": [ "formatMinimum" ]
- },
- "default": {}
-}
-
-},{}],40:[function(require,module,exports){
-'use strict';
-
-var META_SCHEMA_ID = 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json';
-
-module.exports = {
- enable: enableV5,
- META_SCHEMA_ID: META_SCHEMA_ID
-};
-
-
-function enableV5(ajv) {
- var inlineFunctions = {
- 'switch': require('./dotjs/switch'),
- 'constant': require('./dotjs/constant'),
- '_formatLimit': require('./dotjs/_formatLimit'),
- 'patternRequired': require('./dotjs/patternRequired')
- };
-
- if (ajv._opts.meta !== false) {
- var metaSchema = require('./refs/json-schema-v5.json');
- ajv.addMetaSchema(metaSchema, META_SCHEMA_ID);
- }
- _addKeyword('constant');
- ajv.addKeyword('contains', { type: 'array', macro: containsMacro });
-
- _addKeyword('formatMaximum', 'string', inlineFunctions._formatLimit);
- _addKeyword('formatMinimum', 'string', inlineFunctions._formatLimit);
- ajv.addKeyword('formatExclusiveMaximum');
- ajv.addKeyword('formatExclusiveMinimum');
-
- ajv.addKeyword('patternGroups'); // implemented in properties.jst
- _addKeyword('patternRequired', 'object');
- _addKeyword('switch');
-
-
- function _addKeyword(keyword, types, inlineFunc) {
- var definition = {
- inline: inlineFunc || inlineFunctions[keyword],
- statements: true,
- errors: 'full'
- };
- if (types) definition.type = types;
- ajv.addKeyword(keyword, definition);
- }
-}
-
-
-function containsMacro(schema) {
- return {
- not: { items: { not: schema } }
- };
-}
-
-},{"./dotjs/_formatLimit":13,"./dotjs/constant":20,"./dotjs/patternRequired":30,"./dotjs/switch":34,"./refs/json-schema-v5.json":39}],41:[function(require,module,exports){
-
-/**
- * slice() reference.
- */
-
-var slice = Array.prototype.slice;
-
-/**
- * Expose `co`.
- */
-
-module.exports = co['default'] = co.co = co;
-
-/**
- * Wrap the given generator `fn` into a
- * function that returns a promise.
- * This is a separate function so that
- * every `co()` call doesn't create a new,
- * unnecessary closure.
- *
- * @param {GeneratorFunction} fn
- * @return {Function}
- * @api public
- */
-
-co.wrap = function (fn) {
- createPromise.__generatorFunction__ = fn;
- return createPromise;
- function createPromise() {
- return co.call(this, fn.apply(this, arguments));
- }
-};
-
-/**
- * Execute the generator function or a generator
- * and return a promise.
- *
- * @param {Function} fn
- * @return {Promise}
- * @api public
- */
-
-function co(gen) {
- var ctx = this;
- var args = slice.call(arguments, 1)
-
- // we wrap everything in a promise to avoid promise chaining,
- // which leads to memory leak errors.
- // see https://github.com/tj/co/issues/180
- return new Promise(function(resolve, reject) {
- if (typeof gen === 'function') gen = gen.apply(ctx, args);
- if (!gen || typeof gen.next !== 'function') return resolve(gen);
-
- onFulfilled();
-
- /**
- * @param {Mixed} res
- * @return {Promise}
- * @api private
- */
-
- function onFulfilled(res) {
- var ret;
- try {
- ret = gen.next(res);
- } catch (e) {
- return reject(e);
- }
- next(ret);
- }
-
- /**
- * @param {Error} err
- * @return {Promise}
- * @api private
- */
-
- function onRejected(err) {
- var ret;
- try {
- ret = gen.throw(err);
- } catch (e) {
- return reject(e);
- }
- next(ret);
- }
-
- /**
- * Get the next value in the generator,
- * return a promise.
- *
- * @param {Object} ret
- * @return {Promise}
- * @api private
- */
-
- function next(ret) {
- if (ret.done) return resolve(ret.value);
- var value = toPromise.call(ctx, ret.value);
- if (value && isPromise(value)) return value.then(onFulfilled, onRejected);
- return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '
- + 'but the following object was passed: "' + String(ret.value) + '"'));
- }
- });
-}
-
-/**
- * Convert a `yield`ed value into a promise.
- *
- * @param {Mixed} obj
- * @return {Promise}
- * @api private
- */
-
-function toPromise(obj) {
- if (!obj) return obj;
- if (isPromise(obj)) return obj;
- if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);
- if ('function' == typeof obj) return thunkToPromise.call(this, obj);
- if (Array.isArray(obj)) return arrayToPromise.call(this, obj);
- if (isObject(obj)) return objectToPromise.call(this, obj);
- return obj;
-}
-
-/**
- * Convert a thunk to a promise.
- *
- * @param {Function}
- * @return {Promise}
- * @api private
- */
-
-function thunkToPromise(fn) {
- var ctx = this;
- return new Promise(function (resolve, reject) {
- fn.call(ctx, function (err, res) {
- if (err) return reject(err);
- if (arguments.length > 2) res = slice.call(arguments, 1);
- resolve(res);
- });
- });
-}
-
-/**
- * Convert an array of "yieldables" to a promise.
- * Uses `Promise.all()` internally.
- *
- * @param {Array} obj
- * @return {Promise}
- * @api private
- */
-
-function arrayToPromise(obj) {
- return Promise.all(obj.map(toPromise, this));
-}
-
-/**
- * Convert an object of "yieldables" to a promise.
- * Uses `Promise.all()` internally.
- *
- * @param {Object} obj
- * @return {Promise}
- * @api private
- */
-
-function objectToPromise(obj){
- var results = new obj.constructor();
- var keys = Object.keys(obj);
- var promises = [];
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var promise = toPromise.call(this, obj[key]);
- if (promise && isPromise(promise)) defer(promise, key);
- else results[key] = obj[key];
- }
- return Promise.all(promises).then(function () {
- return results;
- });
-
- function defer(promise, key) {
- // predefine the key in the result
- results[key] = undefined;
- promises.push(promise.then(function (res) {
- results[key] = res;
- }));
- }
-}
-
-/**
- * Check if `obj` is a promise.
- *
- * @param {Object} obj
- * @return {Boolean}
- * @api private
- */
-
-function isPromise(obj) {
- return 'function' == typeof obj.then;
-}
-
-/**
- * Check if `obj` is a generator.
- *
- * @param {Mixed} obj
- * @return {Boolean}
- * @api private
- */
-
-function isGenerator(obj) {
- return 'function' == typeof obj.next && 'function' == typeof obj.throw;
-}
-
-/**
- * Check if `obj` is a generator function.
- *
- * @param {Mixed} obj
- * @return {Boolean}
- * @api private
- */
-function isGeneratorFunction(obj) {
- var constructor = obj.constructor;
- if (!constructor) return false;
- if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
- return isGenerator(constructor.prototype);
-}
-
-/**
- * Check for plain object.
- *
- * @param {Mixed} val
- * @return {Boolean}
- * @api private
- */
-
-function isObject(val) {
- return Object == val.constructor;
-}
-
-},{}],42:[function(require,module,exports){
-var json = typeof JSON !== 'undefined' ? JSON : require('jsonify');
-
-module.exports = function (obj, opts) {
- if (!opts) opts = {};
- if (typeof opts === 'function') opts = { cmp: opts };
- var space = opts.space || '';
- if (typeof space === 'number') space = Array(space+1).join(' ');
- var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
- var replacer = opts.replacer || function(key, value) { return value; };
-
- var cmp = opts.cmp && (function (f) {
- return function (node) {
- return function (a, b) {
- var aobj = { key: a, value: node[a] };
- var bobj = { key: b, value: node[b] };
- return f(aobj, bobj);
- };
- };
- })(opts.cmp);
-
- var seen = [];
- return (function stringify (parent, key, node, level) {
- var indent = space ? ('\n' + new Array(level + 1).join(space)) : '';
- var colonSeparator = space ? ': ' : ':';
-
- if (node && node.toJSON && typeof node.toJSON === 'function') {
- node = node.toJSON();
- }
-
- node = replacer.call(parent, key, node);
-
- if (node === undefined) {
- return;
- }
- if (typeof node !== 'object' || node === null) {
- return json.stringify(node);
- }
- if (isArray(node)) {
- var out = [];
- for (var i = 0; i < node.length; i++) {
- var item = stringify(node, i, node[i], level+1) || json.stringify(null);
- out.push(indent + space + item);
- }
- return '[' + out.join(',') + indent + ']';
- }
- else {
- if (seen.indexOf(node) !== -1) {
- if (cycles) return json.stringify('__cycle__');
- throw new TypeError('Converting circular structure to JSON');
- }
- else seen.push(node);
-
- var keys = objectKeys(node).sort(cmp && cmp(node));
- var out = [];
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var value = stringify(node, key, node[key], level+1);
-
- if(!value) continue;
-
- var keyValue = json.stringify(key)
- + colonSeparator
- + value;
- ;
- out.push(indent + space + keyValue);
- }
- seen.splice(seen.indexOf(node), 1);
- return '{' + out.join(',') + indent + '}';
- }
- })({ '': obj }, '', obj, 0);
-};
-
-var isArray = Array.isArray || function (x) {
- return {}.toString.call(x) === '[object Array]';
-};
-
-var objectKeys = Object.keys || function (obj) {
- var has = Object.prototype.hasOwnProperty || function () { return true };
- var keys = [];
- for (var key in obj) {
- if (has.call(obj, key)) keys.push(key);
- }
- return keys;
-};
-
-},{"jsonify":43}],43:[function(require,module,exports){
-exports.parse = require('./lib/parse');
-exports.stringify = require('./lib/stringify');
-
-},{"./lib/parse":44,"./lib/stringify":45}],44:[function(require,module,exports){
-var at, // The index of the current character
- ch, // The current character
- escapee = {
- '"': '"',
- '\\': '\\',
- '/': '/',
- b: '\b',
- f: '\f',
- n: '\n',
- r: '\r',
- t: '\t'
- },
- text,
-
- error = function (m) {
- // Call error when something is wrong.
- throw {
- name: 'SyntaxError',
- message: m,
- at: at,
- text: text
- };
- },
-
- next = function (c) {
- // If a c parameter is provided, verify that it matches the current character.
- if (c && c !== ch) {
- error("Expected '" + c + "' instead of '" + ch + "'");
- }
-
- // Get the next character. When there are no more characters,
- // return the empty string.
-
- ch = text.charAt(at);
- at += 1;
- return ch;
- },
-
- number = function () {
- // Parse a number value.
- var number,
- string = '';
-
- if (ch === '-') {
- string = '-';
- next('-');
- }
- while (ch >= '0' && ch <= '9') {
- string += ch;
- next();
- }
- if (ch === '.') {
- string += '.';
- while (next() && ch >= '0' && ch <= '9') {
- string += ch;
- }
- }
- if (ch === 'e' || ch === 'E') {
- string += ch;
- next();
- if (ch === '-' || ch === '+') {
- string += ch;
- next();
- }
- while (ch >= '0' && ch <= '9') {
- string += ch;
- next();
- }
- }
- number = +string;
- if (!isFinite(number)) {
- error("Bad number");
- } else {
- return number;
- }
- },
-
- string = function () {
- // Parse a string value.
- var hex,
- i,
- string = '',
- uffff;
-
- // When parsing for string values, we must look for " and \ characters.
- if (ch === '"') {
- while (next()) {
- if (ch === '"') {
- next();
- return string;
- } else if (ch === '\\') {
- next();
- if (ch === 'u') {
- uffff = 0;
- for (i = 0; i < 4; i += 1) {
- hex = parseInt(next(), 16);
- if (!isFinite(hex)) {
- break;
- }
- uffff = uffff * 16 + hex;
- }
- string += String.fromCharCode(uffff);
- } else if (typeof escapee[ch] === 'string') {
- string += escapee[ch];
- } else {
- break;
- }
- } else {
- string += ch;
- }
- }
- }
- error("Bad string");
- },
-
- white = function () {
-
-// Skip whitespace.
-
- while (ch && ch <= ' ') {
- next();
- }
- },
-
- word = function () {
-
-// true, false, or null.
-
- switch (ch) {
- case 't':
- next('t');
- next('r');
- next('u');
- next('e');
- return true;
- case 'f':
- next('f');
- next('a');
- next('l');
- next('s');
- next('e');
- return false;
- case 'n':
- next('n');
- next('u');
- next('l');
- next('l');
- return null;
- }
- error("Unexpected '" + ch + "'");
- },
-
- value, // Place holder for the value function.
-
- array = function () {
-
-// Parse an array value.
-
- var array = [];
-
- if (ch === '[') {
- next('[');
- white();
- if (ch === ']') {
- next(']');
- return array; // empty array
- }
- while (ch) {
- array.push(value());
- white();
- if (ch === ']') {
- next(']');
- return array;
- }
- next(',');
- white();
- }
- }
- error("Bad array");
- },
-
- object = function () {
-
-// Parse an object value.
-
- var key,
- object = {};
-
- if (ch === '{') {
- next('{');
- white();
- if (ch === '}') {
- next('}');
- return object; // empty object
- }
- while (ch) {
- key = string();
- white();
- next(':');
- if (Object.hasOwnProperty.call(object, key)) {
- error('Duplicate key "' + key + '"');
- }
- object[key] = value();
- white();
- if (ch === '}') {
- next('}');
- return object;
- }
- next(',');
- white();
- }
- }
- error("Bad object");
- };
-
-value = function () {
-
-// Parse a JSON value. It could be an object, an array, a string, a number,
-// or a word.
-
- white();
- switch (ch) {
- case '{':
- return object();
- case '[':
- return array();
- case '"':
- return string();
- case '-':
- return number();
- default:
- return ch >= '0' && ch <= '9' ? number() : word();
- }
-};
-
-// Return the json_parse function. It will have access to all of the above
-// functions and variables.
-
-module.exports = function (source, reviver) {
- var result;
-
- text = source;
- at = 0;
- ch = ' ';
- result = value();
- white();
- if (ch) {
- error("Syntax error");
- }
-
- // If there is a reviver function, we recursively walk the new structure,
- // passing each name/value pair to the reviver function for possible
- // transformation, starting with a temporary root object that holds the result
- // in an empty key. If there is not a reviver function, we simply return the
- // result.
-
- return typeof reviver === 'function' ? (function walk(holder, key) {
- var k, v, value = holder[key];
- if (value && typeof value === 'object') {
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- }
- }
- }
- return reviver.call(holder, key, value);
- }({'': result}, '')) : result;
-};
-
-},{}],45:[function(require,module,exports){
-var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-function quote(string) {
- // If the string contains no control characters, no quote characters, and no
- // backslash characters, then we can safely slap some quotes around it.
- // Otherwise we must also replace the offending characters with safe escape
- // sequences.
-
- escapable.lastIndex = 0;
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
- var c = meta[a];
- return typeof c === 'string' ? c :
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- }) + '"' : '"' + string + '"';
-}
-
-function str(key, holder) {
- // Produce a string from holder[key].
- var i, // The loop counter.
- k, // The member key.
- v, // The member value.
- length,
- mind = gap,
- partial,
- value = holder[key];
-
- // If the value has a toJSON method, call it to obtain a replacement value.
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
- // If we were called with a replacer function, then call the replacer to
- // obtain a replacement value.
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
- // What happens next depends on the value's type.
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
- // JSON numbers must be finite. Encode non-finite numbers as null.
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
- // If the value is a boolean or null, convert it to a string. Note:
- // typeof null does not produce 'null'. The case is included here in
- // the remote chance that this gets fixed someday.
- return String(value);
-
- case 'object':
- if (!value) return 'null';
- gap += indent;
- partial = [];
-
- // Array.isArray
- if (Object.prototype.toString.apply(value) === '[object Array]') {
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
-
- // Join all of the elements together, separated with commas, and
- // wrap them in brackets.
- v = partial.length === 0 ? '[]' : gap ?
- '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
- '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
- // If the replacer is an array, use it to select the members to be
- // stringified.
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- k = rep[i];
- if (typeof k === 'string') {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
- else {
- // Otherwise, iterate through all of the keys in the object.
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
-
- // Join all of the member texts together, separated with commas,
- // and wrap them in braces.
-
- v = partial.length === 0 ? '{}' : gap ?
- '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
- '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
-}
-
-module.exports = function (value, replacer, space) {
- var i;
- gap = '';
- indent = '';
-
- // If the space parameter is a number, make an indent string containing that
- // many spaces.
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
- }
- // If the space parameter is a string, it will be used as the indent string.
- else if (typeof space === 'string') {
- indent = space;
- }
-
- // If there is a replacer, it must be a function or an array.
- // Otherwise, throw an error.
- rep = replacer;
- if (replacer && typeof replacer !== 'function'
- && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
-
- // Make a fake root object containing our value under the key of ''.
- // Return the result of stringifying the value.
- return str('', {'': value});
-};
-
-},{}],46:[function(require,module,exports){
-(function (global){
-/*! https://mths.be/punycode v1.4.1 by @mathias */
-;(function(root) {
-
- /** Detect free variables */
- var freeExports = typeof exports == 'object' && exports &&
- !exports.nodeType && exports;
- var freeModule = typeof module == 'object' && module &&
- !module.nodeType && module;
- var freeGlobal = typeof global == 'object' && global;
- if (
- freeGlobal.global === freeGlobal ||
- freeGlobal.window === freeGlobal ||
- freeGlobal.self === freeGlobal
- ) {
- root = freeGlobal;
- }
-
- /**
- * The `punycode` object.
- * @name punycode
- * @type Object
- */
- var punycode,
-
- /** Highest positive signed 32-bit float value */
- maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
-
- /** Bootstring parameters */
- base = 36,
- tMin = 1,
- tMax = 26,
- skew = 38,
- damp = 700,
- initialBias = 72,
- initialN = 128, // 0x80
- delimiter = '-', // '\x2D'
-
- /** Regular expressions */
- regexPunycode = /^xn--/,
- regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
- regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
-
- /** Error messages */
- errors = {
- 'overflow': 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- },
-
- /** Convenience shortcuts */
- baseMinusTMin = base - tMin,
- floor = Math.floor,
- stringFromCharCode = String.fromCharCode,
-
- /** Temporary variable */
- key;
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * A generic error utility function.
- * @private
- * @param {String} type The error type.
- * @returns {Error} Throws a `RangeError` with the applicable error message.
- */
- function error(type) {
- throw new RangeError(errors[type]);
- }
-
- /**
- * A generic `Array#map` utility function.
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} callback The function that gets called for every array
- * item.
- * @returns {Array} A new array of values returned by the callback function.
- */
- function map(array, fn) {
- var length = array.length;
- var result = [];
- while (length--) {
- result[length] = fn(array[length]);
- }
- return result;
- }
-
- /**
- * A simple `Array#map`-like wrapper to work with domain name strings or email
- * addresses.
- * @private
- * @param {String} domain The domain name or email address.
- * @param {Function} callback The function that gets called for every
- * character.
- * @returns {Array} A new string of characters returned by the callback
- * function.
- */
- function mapDomain(string, fn) {
- var parts = string.split('@');
- var result = '';
- if (parts.length > 1) {
- // In email addresses, only the domain name should be punycoded. Leave
- // the local part (i.e. everything up to `@`) intact.
- result = parts[0] + '@';
- string = parts[1];
- }
- // Avoid `split(regex)` for IE8 compatibility. See #17.
- string = string.replace(regexSeparators, '\x2E');
- var labels = string.split('.');
- var encoded = map(labels, fn).join('.');
- return result + encoded;
- }
-
- /**
- * Creates an array containing the numeric code points of each Unicode
- * character in the string. While JavaScript uses UCS-2 internally,
- * this function will convert a pair of surrogate halves (each of which
- * UCS-2 exposes as separate characters) into a single code point,
- * matching UTF-16.
- * @see `punycode.ucs2.encode`
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
- * @memberOf punycode.ucs2
- * @name decode
- * @param {String} string The Unicode input string (UCS-2).
- * @returns {Array} The new array of code points.
- */
- function ucs2decode(string) {
- var output = [],
- counter = 0,
- length = string.length,
- value,
- extra;
- while (counter < length) {
- value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- // high surrogate, and there is a next character
- extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- // unmatched surrogate; only append this code unit, in case the next
- // code unit is the high surrogate of a surrogate pair
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
- }
-
- /**
- * Creates a string based on an array of numeric code points.
- * @see `punycode.ucs2.decode`
- * @memberOf punycode.ucs2
- * @name encode
- * @param {Array} codePoints The array of numeric code points.
- * @returns {String} The new Unicode string (UCS-2).
- */
- function ucs2encode(array) {
- return map(array, function(value) {
- var output = '';
- if (value > 0xFFFF) {
- value -= 0x10000;
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
- value = 0xDC00 | value & 0x3FF;
- }
- output += stringFromCharCode(value);
- return output;
- }).join('');
- }
-
- /**
- * Converts a basic code point into a digit/integer.
- * @see `digitToBasic()`
- * @private
- * @param {Number} codePoint The basic numeric code point value.
- * @returns {Number} The numeric value of a basic code point (for use in
- * representing integers) in the range `0` to `base - 1`, or `base` if
- * the code point does not represent a value.
- */
- function basicToDigit(codePoint) {
- if (codePoint - 48 < 10) {
- return codePoint - 22;
- }
- if (codePoint - 65 < 26) {
- return codePoint - 65;
- }
- if (codePoint - 97 < 26) {
- return codePoint - 97;
- }
- return base;
- }
-
- /**
- * Converts a digit/integer into a basic code point.
- * @see `basicToDigit()`
- * @private
- * @param {Number} digit The numeric value of a basic code point.
- * @returns {Number} The basic code point whose value (when used for
- * representing integers) is `digit`, which needs to be in the range
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
- * used; else, the lowercase form is used. The behavior is undefined
- * if `flag` is non-zero and `digit` has no uppercase form.
- */
- function digitToBasic(digit, flag) {
- // 0..25 map to ASCII a..z or A..Z
- // 26..35 map to ASCII 0..9
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
- }
-
- /**
- * Bias adaptation function as per section 3.4 of RFC 3492.
- * https://tools.ietf.org/html/rfc3492#section-3.4
- * @private
- */
- function adapt(delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
- }
-
- /**
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
- * symbols.
- * @memberOf punycode
- * @param {String} input The Punycode string of ASCII-only symbols.
- * @returns {String} The resulting string of Unicode symbols.
- */
- function decode(input) {
- // Don't use UCS-2
- var output = [],
- inputLength = input.length,
- out,
- i = 0,
- n = initialN,
- bias = initialBias,
- basic,
- j,
- index,
- oldi,
- w,
- k,
- digit,
- t,
- /** Cached calculation results */
- baseMinusT;
-
- // Handle the basic code points: let `basic` be the number of input code
- // points before the last delimiter, or `0` if there is none, then copy
- // the first basic code points to the output.
-
- basic = input.lastIndexOf(delimiter);
- if (basic < 0) {
- basic = 0;
- }
-
- for (j = 0; j < basic; ++j) {
- // if it's not a basic code point
- if (input.charCodeAt(j) >= 0x80) {
- error('not-basic');
- }
- output.push(input.charCodeAt(j));
- }
-
- // Main decoding loop: start just after the last delimiter if any basic code
- // points were copied; start at the beginning otherwise.
-
- for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
-
- // `index` is the index of the next character to be consumed.
- // Decode a generalized variable-length integer into `delta`,
- // which gets added to `i`. The overflow checking is easier
- // if we increase `i` as we go, then subtract off its starting
- // value at the end to obtain `delta`.
- for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
-
- if (index >= inputLength) {
- error('invalid-input');
- }
-
- digit = basicToDigit(input.charCodeAt(index++));
-
- if (digit >= base || digit > floor((maxInt - i) / w)) {
- error('overflow');
- }
-
- i += digit * w;
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
-
- if (digit < t) {
- break;
- }
-
- baseMinusT = base - t;
- if (w > floor(maxInt / baseMinusT)) {
- error('overflow');
- }
-
- w *= baseMinusT;
-
- }
-
- out = output.length + 1;
- bias = adapt(i - oldi, out, oldi == 0);
-
- // `i` was supposed to wrap around from `out` to `0`,
- // incrementing `n` each time, so we'll fix that now:
- if (floor(i / out) > maxInt - n) {
- error('overflow');
- }
-
- n += floor(i / out);
- i %= out;
-
- // Insert `n` at position `i` of the output
- output.splice(i++, 0, n);
-
- }
-
- return ucs2encode(output);
- }
-
- /**
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
- * Punycode string of ASCII-only symbols.
- * @memberOf punycode
- * @param {String} input The string of Unicode symbols.
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
- */
- function encode(input) {
- var n,
- delta,
- handledCPCount,
- basicLength,
- bias,
- j,
- m,
- q,
- k,
- t,
- currentValue,
- output = [],
- /** `inputLength` will hold the number of code points in `input`. */
- inputLength,
- /** Cached calculation results */
- handledCPCountPlusOne,
- baseMinusT,
- qMinusT;
-
- // Convert the input in UCS-2 to Unicode
- input = ucs2decode(input);
-
- // Cache the length
- inputLength = input.length;
-
- // Initialize the state
- n = initialN;
- delta = 0;
- bias = initialBias;
-
- // Handle the basic code points
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue < 0x80) {
- output.push(stringFromCharCode(currentValue));
- }
- }
-
- handledCPCount = basicLength = output.length;
-
- // `handledCPCount` is the number of code points that have been handled;
- // `basicLength` is the number of basic code points.
-
- // Finish the basic string - if it is not empty - with a delimiter
- if (basicLength) {
- output.push(delimiter);
- }
-
- // Main encoding loop:
- while (handledCPCount < inputLength) {
-
- // All non-basic code points < n have been handled already. Find the next
- // larger one:
- for (m = maxInt, j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
-
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
- // but guard against overflow
- handledCPCountPlusOne = handledCPCount + 1;
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
- error('overflow');
- }
-
- delta += (m - n) * handledCPCountPlusOne;
- n = m;
-
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
-
- if (currentValue < n && ++delta > maxInt) {
- error('overflow');
- }
-
- if (currentValue == n) {
- // Represent delta as a generalized variable-length integer
- for (q = delta, k = base; /* no condition */; k += base) {
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
- if (q < t) {
- break;
- }
- qMinusT = q - t;
- baseMinusT = base - t;
- output.push(
- stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
- );
- q = floor(qMinusT / baseMinusT);
- }
-
- output.push(stringFromCharCode(digitToBasic(q, 0)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
- delta = 0;
- ++handledCPCount;
- }
- }
-
- ++delta;
- ++n;
-
- }
- return output.join('');
- }
-
- /**
- * Converts a Punycode string representing a domain name or an email address
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
- * it doesn't matter if you call it on a string that has already been
- * converted to Unicode.
- * @memberOf punycode
- * @param {String} input The Punycoded domain name or email address to
- * convert to Unicode.
- * @returns {String} The Unicode representation of the given Punycode
- * string.
- */
- function toUnicode(input) {
- return mapDomain(input, function(string) {
- return regexPunycode.test(string)
- ? decode(string.slice(4).toLowerCase())
- : string;
- });
- }
-
- /**
- * Converts a Unicode string representing a domain name or an email address to
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
- * i.e. it doesn't matter if you call it with a domain that's already in
- * ASCII.
- * @memberOf punycode
- * @param {String} input The domain name or email address to convert, as a
- * Unicode string.
- * @returns {String} The Punycode representation of the given domain name or
- * email address.
- */
- function toASCII(input) {
- return mapDomain(input, function(string) {
- return regexNonASCII.test(string)
- ? 'xn--' + encode(string)
- : string;
- });
- }
-
- /*--------------------------------------------------------------------------*/
-
- /** Define the public API */
- punycode = {
- /**
- * A string representing the current Punycode.js version number.
- * @memberOf punycode
- * @type String
- */
- 'version': '1.4.1',
- /**
- * An object of methods to convert from JavaScript's internal character
- * representation (UCS-2) to Unicode code points, and back.
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
- * @memberOf punycode
- * @type Object
- */
- 'ucs2': {
- 'decode': ucs2decode,
- 'encode': ucs2encode
- },
- 'decode': decode,
- 'encode': encode,
- 'toASCII': toASCII,
- 'toUnicode': toUnicode
- };
-
- /** Expose `punycode` */
- // Some AMD build optimizers, like r.js, check for specific condition patterns
- // like the following:
- if (
- typeof define == 'function' &&
- typeof define.amd == 'object' &&
- define.amd
- ) {
- define('punycode', function() {
- return punycode;
- });
- } else if (freeExports && freeModule) {
- if (module.exports == freeExports) {
- // in Node.js, io.js, or RingoJS v0.8.0+
- freeModule.exports = punycode;
- } else {
- // in Narwhal or RingoJS v0.7.0-
- for (key in punycode) {
- punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
- }
- }
- } else {
- // in Rhino or a web browser
- root.punycode = punycode;
- }
-
-}(this));
-
-}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],47:[function(require,module,exports){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
-
-// If obj.hasOwnProperty has been overridden, then calling
-// obj.hasOwnProperty(prop) will break.
-// See: https://github.com/joyent/node/issues/1707
-function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
-}
-
-module.exports = function(qs, sep, eq, options) {
- sep = sep || '&';
- eq = eq || '=';
- var obj = {};
-
- if (typeof qs !== 'string' || qs.length === 0) {
- return obj;
- }
-
- var regexp = /\+/g;
- qs = qs.split(sep);
-
- var maxKeys = 1000;
- if (options && typeof options.maxKeys === 'number') {
- maxKeys = options.maxKeys;
- }
-
- var len = qs.length;
- // maxKeys <= 0 means that we should not limit keys count
- if (maxKeys > 0 && len > maxKeys) {
- len = maxKeys;
- }
-
- for (var i = 0; i < len; ++i) {
- var x = qs[i].replace(regexp, '%20'),
- idx = x.indexOf(eq),
- kstr, vstr, k, v;
-
- if (idx >= 0) {
- kstr = x.substr(0, idx);
- vstr = x.substr(idx + 1);
- } else {
- kstr = x;
- vstr = '';
- }
-
- k = decodeURIComponent(kstr);
- v = decodeURIComponent(vstr);
-
- if (!hasOwnProperty(obj, k)) {
- obj[k] = v;
- } else if (isArray(obj[k])) {
- obj[k].push(v);
- } else {
- obj[k] = [obj[k], v];
- }
- }
-
- return obj;
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
-
-},{}],48:[function(require,module,exports){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
-
-var stringifyPrimitive = function(v) {
- switch (typeof v) {
- case 'string':
- return v;
-
- case 'boolean':
- return v ? 'true' : 'false';
-
- case 'number':
- return isFinite(v) ? v : '';
-
- default:
- return '';
- }
-};
-
-module.exports = function(obj, sep, eq, name) {
- sep = sep || '&';
- eq = eq || '=';
- if (obj === null) {
- obj = undefined;
- }
-
- if (typeof obj === 'object') {
- return map(objectKeys(obj), function(k) {
- var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
- if (isArray(obj[k])) {
- return map(obj[k], function(v) {
- return ks + encodeURIComponent(stringifyPrimitive(v));
- }).join(sep);
- } else {
- return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
- }
- }).join(sep);
-
- }
-
- if (!name) return '';
- return encodeURIComponent(stringifyPrimitive(name)) + eq +
- encodeURIComponent(stringifyPrimitive(obj));
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
-
-function map (xs, f) {
- if (xs.map) return xs.map(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- res.push(f(xs[i], i));
- }
- return res;
-}
-
-var objectKeys = Object.keys || function (obj) {
- var res = [];
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
- }
- return res;
-};
-
-},{}],49:[function(require,module,exports){
-'use strict';
-
-exports.decode = exports.parse = require('./decode');
-exports.encode = exports.stringify = require('./encode');
-
-},{"./decode":47,"./encode":48}],50:[function(require,module,exports){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
-
-var punycode = require('punycode');
-var util = require('./util');
-
-exports.parse = urlParse;
-exports.resolve = urlResolve;
-exports.resolveObject = urlResolveObject;
-exports.format = urlFormat;
-
-exports.Url = Url;
-
-function Url() {
- this.protocol = null;
- this.slashes = null;
- this.auth = null;
- this.host = null;
- this.port = null;
- this.hostname = null;
- this.hash = null;
- this.search = null;
- this.query = null;
- this.pathname = null;
- this.path = null;
- this.href = null;
-}
-
-// Reference: RFC 3986, RFC 1808, RFC 2396
-
-// define these here so at least they only have to be
-// compiled once on the first module load.
-var protocolPattern = /^([a-z0-9.+-]+:)/i,
- portPattern = /:[0-9]*$/,
-
- // Special case for a simple path URL
- simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
-
- // RFC 2396: characters reserved for delimiting URLs.
- // We actually just auto-escape these.
- delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
-
- // RFC 2396: characters not allowed for various reasons.
- unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
-
- // Allowed by RFCs, but cause of XSS attacks. Always escape these.
- autoEscape = ['\''].concat(unwise),
- // Characters that are never ever allowed in a hostname.
- // Note that any invalid chars are also handled, but these
- // are the ones that are *expected* to be seen, so we fast-path
- // them.
- nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
- hostEndingChars = ['/', '?', '#'],
- hostnameMaxLen = 255,
- hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
- hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
- // protocols that can allow "unsafe" and "unwise" chars.
- unsafeProtocol = {
- 'javascript': true,
- 'javascript:': true
- },
- // protocols that never have a hostname.
- hostlessProtocol = {
- 'javascript': true,
- 'javascript:': true
- },
- // protocols that always contain a // bit.
- slashedProtocol = {
- 'http': true,
- 'https': true,
- 'ftp': true,
- 'gopher': true,
- 'file': true,
- 'http:': true,
- 'https:': true,
- 'ftp:': true,
- 'gopher:': true,
- 'file:': true
- },
- querystring = require('querystring');
-
-function urlParse(url, parseQueryString, slashesDenoteHost) {
- if (url && util.isObject(url) && url instanceof Url) return url;
-
- var u = new Url;
- u.parse(url, parseQueryString, slashesDenoteHost);
- return u;
-}
-
-Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
- if (!util.isString(url)) {
- throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
- }
-
- // Copy chrome, IE, opera backslash-handling behavior.
- // Back slashes before the query string get converted to forward slashes
- // See: https://code.google.com/p/chromium/issues/detail?id=25916
- var queryIndex = url.indexOf('?'),
- splitter =
- (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
- uSplit = url.split(splitter),
- slashRegex = /\\/g;
- uSplit[0] = uSplit[0].replace(slashRegex, '/');
- url = uSplit.join(splitter);
-
- var rest = url;
-
- // trim before proceeding.
- // This is to support parse stuff like " http://foo.com \n"
- rest = rest.trim();
-
- if (!slashesDenoteHost && url.split('#').length === 1) {
- // Try fast path regexp
- var simplePath = simplePathPattern.exec(rest);
- if (simplePath) {
- this.path = rest;
- this.href = rest;
- this.pathname = simplePath[1];
- if (simplePath[2]) {
- this.search = simplePath[2];
- if (parseQueryString) {
- this.query = querystring.parse(this.search.substr(1));
- } else {
- this.query = this.search.substr(1);
- }
- } else if (parseQueryString) {
- this.search = '';
- this.query = {};
- }
- return this;
- }
- }
-
- var proto = protocolPattern.exec(rest);
- if (proto) {
- proto = proto[0];
- var lowerProto = proto.toLowerCase();
- this.protocol = lowerProto;
- rest = rest.substr(proto.length);
- }
-
- // figure out if it's got a host
- // user@server is *always* interpreted as a hostname, and url
- // resolution will treat //foo/bar as host=foo,path=bar because that's
- // how the browser resolves relative URLs.
- if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
- var slashes = rest.substr(0, 2) === '//';
- if (slashes && !(proto && hostlessProtocol[proto])) {
- rest = rest.substr(2);
- this.slashes = true;
- }
- }
-
- if (!hostlessProtocol[proto] &&
- (slashes || (proto && !slashedProtocol[proto]))) {
-
- // there's a hostname.
- // the first instance of /, ?, ;, or # ends the host.
- //
- // If there is an @ in the hostname, then non-host chars *are* allowed
- // to the left of the last @ sign, unless some host-ending character
- // comes *before* the @-sign.
- // URLs are obnoxious.
- //
- // ex:
- // http://a@b@c/ => user:a@b host:c
- // http://a@b?@c => user:a host:c path:/?@c
-
- // v0.12 TODO(isaacs): This is not quite how Chrome does things.
- // Review our test case against browsers more comprehensively.
-
- // find the first instance of any hostEndingChars
- var hostEnd = -1;
- for (var i = 0; i < hostEndingChars.length; i++) {
- var hec = rest.indexOf(hostEndingChars[i]);
- if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
- hostEnd = hec;
- }
-
- // at this point, either we have an explicit point where the
- // auth portion cannot go past, or the last @ char is the decider.
- var auth, atSign;
- if (hostEnd === -1) {
- // atSign can be anywhere.
- atSign = rest.lastIndexOf('@');
- } else {
- // atSign must be in auth portion.
- // http://a@b/c@d => host:b auth:a path:/c@d
- atSign = rest.lastIndexOf('@', hostEnd);
- }
-
- // Now we have a portion which is definitely the auth.
- // Pull that off.
- if (atSign !== -1) {
- auth = rest.slice(0, atSign);
- rest = rest.slice(atSign + 1);
- this.auth = decodeURIComponent(auth);
- }
-
- // the host is the remaining to the left of the first non-host char
- hostEnd = -1;
- for (var i = 0; i < nonHostChars.length; i++) {
- var hec = rest.indexOf(nonHostChars[i]);
- if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
- hostEnd = hec;
- }
- // if we still have not hit it, then the entire thing is a host.
- if (hostEnd === -1)
- hostEnd = rest.length;
-
- this.host = rest.slice(0, hostEnd);
- rest = rest.slice(hostEnd);
-
- // pull out port.
- this.parseHost();
-
- // we've indicated that there is a hostname,
- // so even if it's empty, it has to be present.
- this.hostname = this.hostname || '';
-
- // if hostname begins with [ and ends with ]
- // assume that it's an IPv6 address.
- var ipv6Hostname = this.hostname[0] === '[' &&
- this.hostname[this.hostname.length - 1] === ']';
-
- // validate a little.
- if (!ipv6Hostname) {
- var hostparts = this.hostname.split(/\./);
- for (var i = 0, l = hostparts.length; i < l; i++) {
- var part = hostparts[i];
- if (!part) continue;
- if (!part.match(hostnamePartPattern)) {
- var newpart = '';
- for (var j = 0, k = part.length; j < k; j++) {
- if (part.charCodeAt(j) > 127) {
- // we replace non-ASCII char with a temporary placeholder
- // we need this to make sure size of hostname is not
- // broken by replacing non-ASCII by nothing
- newpart += 'x';
- } else {
- newpart += part[j];
- }
- }
- // we test again with ASCII char only
- if (!newpart.match(hostnamePartPattern)) {
- var validParts = hostparts.slice(0, i);
- var notHost = hostparts.slice(i + 1);
- var bit = part.match(hostnamePartStart);
- if (bit) {
- validParts.push(bit[1]);
- notHost.unshift(bit[2]);
- }
- if (notHost.length) {
- rest = '/' + notHost.join('.') + rest;
- }
- this.hostname = validParts.join('.');
- break;
- }
- }
- }
- }
-
- if (this.hostname.length > hostnameMaxLen) {
- this.hostname = '';
- } else {
- // hostnames are always lower case.
- this.hostname = this.hostname.toLowerCase();
- }
-
- if (!ipv6Hostname) {
- // IDNA Support: Returns a punycoded representation of "domain".
- // It only converts parts of the domain name that
- // have non-ASCII characters, i.e. it doesn't matter if
- // you call it with a domain that already is ASCII-only.
- this.hostname = punycode.toASCII(this.hostname);
- }
-
- var p = this.port ? ':' + this.port : '';
- var h = this.hostname || '';
- this.host = h + p;
- this.href += this.host;
-
- // strip [ and ] from the hostname
- // the host field still retains them, though
- if (ipv6Hostname) {
- this.hostname = this.hostname.substr(1, this.hostname.length - 2);
- if (rest[0] !== '/') {
- rest = '/' + rest;
- }
- }
- }
-
- // now rest is set to the post-host stuff.
- // chop off any delim chars.
- if (!unsafeProtocol[lowerProto]) {
-
- // First, make 100% sure that any "autoEscape" chars get
- // escaped, even if encodeURIComponent doesn't think they
- // need to be.
- for (var i = 0, l = autoEscape.length; i < l; i++) {
- var ae = autoEscape[i];
- if (rest.indexOf(ae) === -1)
- continue;
- var esc = encodeURIComponent(ae);
- if (esc === ae) {
- esc = escape(ae);
- }
- rest = rest.split(ae).join(esc);
- }
- }
-
-
- // chop off from the tail first.
- var hash = rest.indexOf('#');
- if (hash !== -1) {
- // got a fragment string.
- this.hash = rest.substr(hash);
- rest = rest.slice(0, hash);
- }
- var qm = rest.indexOf('?');
- if (qm !== -1) {
- this.search = rest.substr(qm);
- this.query = rest.substr(qm + 1);
- if (parseQueryString) {
- this.query = querystring.parse(this.query);
- }
- rest = rest.slice(0, qm);
- } else if (parseQueryString) {
- // no query string, but parseQueryString still requested
- this.search = '';
- this.query = {};
- }
- if (rest) this.pathname = rest;
- if (slashedProtocol[lowerProto] &&
- this.hostname && !this.pathname) {
- this.pathname = '/';
- }
-
- //to support http.request
- if (this.pathname || this.search) {
- var p = this.pathname || '';
- var s = this.search || '';
- this.path = p + s;
- }
-
- // finally, reconstruct the href based on what has been validated.
- this.href = this.format();
- return this;
-};
-
-// format a parsed object into a url string
-function urlFormat(obj) {
- // ensure it's an object, and not a string url.
- // If it's an obj, this is a no-op.
- // this way, you can call url_format() on strings
- // to clean up potentially wonky urls.
- if (util.isString(obj)) obj = urlParse(obj);
- if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
- return obj.format();
-}
-
-Url.prototype.format = function() {
- var auth = this.auth || '';
- if (auth) {
- auth = encodeURIComponent(auth);
- auth = auth.replace(/%3A/i, ':');
- auth += '@';
- }
-
- var protocol = this.protocol || '',
- pathname = this.pathname || '',
- hash = this.hash || '',
- host = false,
- query = '';
-
- if (this.host) {
- host = auth + this.host;
- } else if (this.hostname) {
- host = auth + (this.hostname.indexOf(':') === -1 ?
- this.hostname :
- '[' + this.hostname + ']');
- if (this.port) {
- host += ':' + this.port;
- }
- }
-
- if (this.query &&
- util.isObject(this.query) &&
- Object.keys(this.query).length) {
- query = querystring.stringify(this.query);
- }
-
- var search = this.search || (query && ('?' + query)) || '';
-
- if (protocol && protocol.substr(-1) !== ':') protocol += ':';
-
- // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
- // unless they had them to begin with.
- if (this.slashes ||
- (!protocol || slashedProtocol[protocol]) && host !== false) {
- host = '//' + (host || '');
- if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
- } else if (!host) {
- host = '';
- }
-
- if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
- if (search && search.charAt(0) !== '?') search = '?' + search;
-
- pathname = pathname.replace(/[?#]/g, function(match) {
- return encodeURIComponent(match);
- });
- search = search.replace('#', '%23');
-
- return protocol + host + pathname + search + hash;
-};
-
-function urlResolve(source, relative) {
- return urlParse(source, false, true).resolve(relative);
-}
-
-Url.prototype.resolve = function(relative) {
- return this.resolveObject(urlParse(relative, false, true)).format();
-};
-
-function urlResolveObject(source, relative) {
- if (!source) return relative;
- return urlParse(source, false, true).resolveObject(relative);
-}
-
-Url.prototype.resolveObject = function(relative) {
- if (util.isString(relative)) {
- var rel = new Url();
- rel.parse(relative, false, true);
- relative = rel;
- }
-
- var result = new Url();
- var tkeys = Object.keys(this);
- for (var tk = 0; tk < tkeys.length; tk++) {
- var tkey = tkeys[tk];
- result[tkey] = this[tkey];
- }
-
- // hash is always overridden, no matter what.
- // even href="" will remove it.
- result.hash = relative.hash;
-
- // if the relative url is empty, then there's nothing left to do here.
- if (relative.href === '') {
- result.href = result.format();
- return result;
- }
-
- // hrefs like //foo/bar always cut to the protocol.
- if (relative.slashes && !relative.protocol) {
- // take everything except the protocol from relative
- var rkeys = Object.keys(relative);
- for (var rk = 0; rk < rkeys.length; rk++) {
- var rkey = rkeys[rk];
- if (rkey !== 'protocol')
- result[rkey] = relative[rkey];
- }
-
- //urlParse appends trailing / to urls like http://www.example.com
- if (slashedProtocol[result.protocol] &&
- result.hostname && !result.pathname) {
- result.path = result.pathname = '/';
- }
-
- result.href = result.format();
- return result;
- }
-
- if (relative.protocol && relative.protocol !== result.protocol) {
- // if it's a known url protocol, then changing
- // the protocol does weird things
- // first, if it's not file:, then we MUST have a host,
- // and if there was a path
- // to begin with, then we MUST have a path.
- // if it is file:, then the host is dropped,
- // because that's known to be hostless.
- // anything else is assumed to be absolute.
- if (!slashedProtocol[relative.protocol]) {
- var keys = Object.keys(relative);
- for (var v = 0; v < keys.length; v++) {
- var k = keys[v];
- result[k] = relative[k];
- }
- result.href = result.format();
- return result;
- }
-
- result.protocol = relative.protocol;
- if (!relative.host && !hostlessProtocol[relative.protocol]) {
- var relPath = (relative.pathname || '').split('/');
- while (relPath.length && !(relative.host = relPath.shift()));
- if (!relative.host) relative.host = '';
- if (!relative.hostname) relative.hostname = '';
- if (relPath[0] !== '') relPath.unshift('');
- if (relPath.length < 2) relPath.unshift('');
- result.pathname = relPath.join('/');
- } else {
- result.pathname = relative.pathname;
- }
- result.search = relative.search;
- result.query = relative.query;
- result.host = relative.host || '';
- result.auth = relative.auth;
- result.hostname = relative.hostname || relative.host;
- result.port = relative.port;
- // to support http.request
- if (result.pathname || result.search) {
- var p = result.pathname || '';
- var s = result.search || '';
- result.path = p + s;
- }
- result.slashes = result.slashes || relative.slashes;
- result.href = result.format();
- return result;
- }
-
- var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
- isRelAbs = (
- relative.host ||
- relative.pathname && relative.pathname.charAt(0) === '/'
- ),
- mustEndAbs = (isRelAbs || isSourceAbs ||
- (result.host && relative.pathname)),
- removeAllDots = mustEndAbs,
- srcPath = result.pathname && result.pathname.split('/') || [],
- relPath = relative.pathname && relative.pathname.split('/') || [],
- psychotic = result.protocol && !slashedProtocol[result.protocol];
-
- // if the url is a non-slashed url, then relative
- // links like ../.. should be able
- // to crawl up to the hostname, as well. This is strange.
- // result.protocol has already been set by now.
- // Later on, put the first path part into the host field.
- if (psychotic) {
- result.hostname = '';
- result.port = null;
- if (result.host) {
- if (srcPath[0] === '') srcPath[0] = result.host;
- else srcPath.unshift(result.host);
- }
- result.host = '';
- if (relative.protocol) {
- relative.hostname = null;
- relative.port = null;
- if (relative.host) {
- if (relPath[0] === '') relPath[0] = relative.host;
- else relPath.unshift(relative.host);
- }
- relative.host = null;
- }
- mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
- }
-
- if (isRelAbs) {
- // it's absolute.
- result.host = (relative.host || relative.host === '') ?
- relative.host : result.host;
- result.hostname = (relative.hostname || relative.hostname === '') ?
- relative.hostname : result.hostname;
- result.search = relative.search;
- result.query = relative.query;
- srcPath = relPath;
- // fall through to the dot-handling below.
- } else if (relPath.length) {
- // it's relative
- // throw away the existing file, and take the new path instead.
- if (!srcPath) srcPath = [];
- srcPath.pop();
- srcPath = srcPath.concat(relPath);
- result.search = relative.search;
- result.query = relative.query;
- } else if (!util.isNullOrUndefined(relative.search)) {
- // just pull out the search.
- // like href='?foo'.
- // Put this after the other two cases because it simplifies the booleans
- if (psychotic) {
- result.hostname = result.host = srcPath.shift();
- //occationaly the auth can get stuck only in host
- //this especially happens in cases like
- //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
- var authInHost = result.host && result.host.indexOf('@') > 0 ?
- result.host.split('@') : false;
- if (authInHost) {
- result.auth = authInHost.shift();
- result.host = result.hostname = authInHost.shift();
- }
- }
- result.search = relative.search;
- result.query = relative.query;
- //to support http.request
- if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
- result.path = (result.pathname ? result.pathname : '') +
- (result.search ? result.search : '');
- }
- result.href = result.format();
- return result;
- }
-
- if (!srcPath.length) {
- // no path at all. easy.
- // we've already handled the other stuff above.
- result.pathname = null;
- //to support http.request
- if (result.search) {
- result.path = '/' + result.search;
- } else {
- result.path = null;
- }
- result.href = result.format();
- return result;
- }
-
- // if a url ENDs in . or .., then it must get a trailing slash.
- // however, if it ends in anything else non-slashy,
- // then it must NOT get a trailing slash.
- var last = srcPath.slice(-1)[0];
- var hasTrailingSlash = (
- (result.host || relative.host || srcPath.length > 1) &&
- (last === '.' || last === '..') || last === '');
-
- // strip single dots, resolve double dots to parent dir
- // if the path tries to go above the root, `up` ends up > 0
- var up = 0;
- for (var i = srcPath.length; i >= 0; i--) {
- last = srcPath[i];
- if (last === '.') {
- srcPath.splice(i, 1);
- } else if (last === '..') {
- srcPath.splice(i, 1);
- up++;
- } else if (up) {
- srcPath.splice(i, 1);
- up--;
- }
- }
-
- // if the path is allowed to go above the root, restore leading ..s
- if (!mustEndAbs && !removeAllDots) {
- for (; up--; up) {
- srcPath.unshift('..');
- }
- }
-
- if (mustEndAbs && srcPath[0] !== '' &&
- (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
- srcPath.unshift('');
- }
-
- if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
- srcPath.push('');
- }
-
- var isAbsolute = srcPath[0] === '' ||
- (srcPath[0] && srcPath[0].charAt(0) === '/');
-
- // put the host back
- if (psychotic) {
- result.hostname = result.host = isAbsolute ? '' :
- srcPath.length ? srcPath.shift() : '';
- //occationaly the auth can get stuck only in host
- //this especially happens in cases like
- //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
- var authInHost = result.host && result.host.indexOf('@') > 0 ?
- result.host.split('@') : false;
- if (authInHost) {
- result.auth = authInHost.shift();
- result.host = result.hostname = authInHost.shift();
- }
- }
-
- mustEndAbs = mustEndAbs || (result.host && srcPath.length);
-
- if (mustEndAbs && !isAbsolute) {
- srcPath.unshift('');
- }
-
- if (!srcPath.length) {
- result.pathname = null;
- result.path = null;
- } else {
- result.pathname = srcPath.join('/');
- }
-
- //to support request.http
- if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
- result.path = (result.pathname ? result.pathname : '') +
- (result.search ? result.search : '');
- }
- result.auth = relative.auth || result.auth;
- result.slashes = result.slashes || relative.slashes;
- result.href = result.format();
- return result;
-};
-
-Url.prototype.parseHost = function() {
- var host = this.host;
- var port = portPattern.exec(host);
- if (port) {
- port = port[0];
- if (port !== ':') {
- this.port = port.substr(1);
- }
- host = host.substr(0, host.length - port.length);
- }
- if (host) this.hostname = host;
-};
-
-},{"./util":51,"punycode":46,"querystring":49}],51:[function(require,module,exports){
-'use strict';
-
-module.exports = {
- isString: function(arg) {
- return typeof(arg) === 'string';
- },
- isObject: function(arg) {
- return typeof(arg) === 'object' && arg !== null;
- },
- isNull: function(arg) {
- return arg === null;
- },
- isNullOrUndefined: function(arg) {
- return arg == null;
- }
-};
-
-},{}],"ajv":[function(require,module,exports){
-'use strict';
-
-var compileSchema = require('./compile')
- , resolve = require('./compile/resolve')
- , Cache = require('./cache')
- , SchemaObject = require('./compile/schema_obj')
- , stableStringify = require('json-stable-stringify')
- , formats = require('./compile/formats')
- , rules = require('./compile/rules')
- , v5 = require('./v5')
- , util = require('./compile/util')
- , async = require('./async')
- , co = require('co');
-
-module.exports = Ajv;
-
-Ajv.prototype.compileAsync = async.compile;
-
-var customKeyword = require('./keyword');
-Ajv.prototype.addKeyword = customKeyword.add;
-Ajv.prototype.getKeyword = customKeyword.get;
-Ajv.prototype.removeKeyword = customKeyword.remove;
-Ajv.ValidationError = require('./compile/validation_error');
-
-var META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';
-var SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i;
-function SCHEMA_URI_FORMAT_FUNC(str) {
- return SCHEMA_URI_FORMAT.test(str);
-}
-
-var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
-
-/**
- * Creates validator instance.
- * Usage: `Ajv(opts)`
- * @param {Object} opts optional options
- * @return {Object} ajv instance
- */
-function Ajv(opts) {
- if (!(this instanceof Ajv)) return new Ajv(opts);
- var self = this;
-
- opts = this._opts = util.copy(opts) || {};
- this._schemas = {};
- this._refs = {};
- this._fragments = {};
- this._formats = formats(opts.format);
- this._cache = opts.cache || new Cache;
- this._loadingSchemas = {};
- this._compilations = [];
- this.RULES = rules();
-
- // this is done on purpose, so that methods are bound to the instance
- // (without using bind) so that they can be used without the instance
- this.validate = validate;
- this.compile = compile;
- this.addSchema = addSchema;
- this.addMetaSchema = addMetaSchema;
- this.validateSchema = validateSchema;
- this.getSchema = getSchema;
- this.removeSchema = removeSchema;
- this.addFormat = addFormat;
- this.errorsText = errorsText;
-
- this._addSchema = _addSchema;
- this._compile = _compile;
-
- opts.loopRequired = opts.loopRequired || Infinity;
- if (opts.async || opts.transpile) async.setup(opts);
- if (opts.beautify === true) opts.beautify = { indent_size: 2 };
- if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
- this._metaOpts = getMetaSchemaOptions();
-
- if (opts.formats) addInitialFormats();
- addDraft4MetaSchema();
- if (opts.v5) v5.enable(this);
- if (typeof opts.meta == 'object') addMetaSchema(opts.meta);
- addInitialSchemas();
-
-
- /**
- * Validate data using schema
- * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
- * @param {String|Object} schemaKeyRef key, ref or schema object
- * @param {Any} data to be validated
- * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
- */
- function validate(schemaKeyRef, data) {
- var v;
- if (typeof schemaKeyRef == 'string') {
- v = getSchema(schemaKeyRef);
- if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
- } else {
- var schemaObj = _addSchema(schemaKeyRef);
- v = schemaObj.validate || _compile(schemaObj);
- }
-
- var valid = v(data);
- if (v.$async === true)
- return self._opts.async == '*' ? co(valid) : valid;
- self.errors = v.errors;
- return valid;
- }
-
-
- /**
- * Create validating function for passed schema.
- * @param {Object} schema schema object
- * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
- * @return {Function} validating function
- */
- function compile(schema, _meta) {
- var schemaObj = _addSchema(schema, undefined, _meta);
- return schemaObj.validate || _compile(schemaObj);
- }
-
-
- /**
- * Adds schema to the instance.
- * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
- * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
- * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
- * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
- */
- function addSchema(schema, key, _skipValidation, _meta) {
- if (Array.isArray(schema)){
- for (var i=0; i<schema.length; i++) addSchema(schema[i], undefined, _skipValidation, _meta);
- return;
- }
- // can key/id have # inside?
- key = resolve.normalizeId(key || schema.id);
- checkUnique(key);
- self._schemas[key] = _addSchema(schema, _skipValidation, _meta, true);
- }
-
-
- /**
- * Add schema that will be used to validate other schemas
- * options in META_IGNORE_OPTIONS are alway set to false
- * @param {Object} schema schema object
- * @param {String} key optional schema key
- * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
- */
- function addMetaSchema(schema, key, skipValidation) {
- addSchema(schema, key, skipValidation, true);
- }
-
-
- /**
- * Validate schema
- * @param {Object} schema schema to validate
- * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
- * @return {Boolean} true if schema is valid
- */
- function validateSchema(schema, throwOrLogError) {
- var $schema = schema.$schema || self._opts.defaultMeta || defaultMeta();
- var currentUriFormat = self._formats.uri;
- self._formats.uri = typeof currentUriFormat == 'function'
- ? SCHEMA_URI_FORMAT_FUNC
- : SCHEMA_URI_FORMAT;
- var valid;
- try { valid = validate($schema, schema); }
- finally { self._formats.uri = currentUriFormat; }
- if (!valid && throwOrLogError) {
- var message = 'schema is invalid: ' + errorsText();
- if (self._opts.validateSchema == 'log') console.error(message);
- else throw new Error(message);
- }
- return valid;
- }
-
-
- function defaultMeta() {
- var meta = self._opts.meta;
- self._opts.defaultMeta = typeof meta == 'object'
- ? meta.id || meta
- : self._opts.v5
- ? v5.META_SCHEMA_ID
- : META_SCHEMA_ID;
- return self._opts.defaultMeta;
- }
-
-
- /**
- * Get compiled schema from the instance by `key` or `ref`.
- * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
- * @return {Function} schema validating function (with property `schema`).
- */
- function getSchema(keyRef) {
- var schemaObj = _getSchemaObj(keyRef);
- switch (typeof schemaObj) {
- case 'object': return schemaObj.validate || _compile(schemaObj);
- case 'string': return getSchema(schemaObj);
- case 'undefined': return _getSchemaFragment(keyRef);
- }
- }
-
-
- function _getSchemaFragment(ref) {
- var res = resolve.schema.call(self, { schema: {} }, ref);
- if (res) {
- var schema = res.schema
- , root = res.root
- , baseId = res.baseId;
- var v = compileSchema.call(self, schema, root, undefined, baseId);
- self._fragments[ref] = new SchemaObject({
- ref: ref,
- fragment: true,
- schema: schema,
- root: root,
- baseId: baseId,
- validate: v
- });
- return v;
- }
- }
-
-
- function _getSchemaObj(keyRef) {
- keyRef = resolve.normalizeId(keyRef);
- return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
- }
-
-
- /**
- * Remove cached schema(s).
- * If no parameter is passed all schemas but meta-schemas are removed.
- * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
- * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
- * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
- */
- function removeSchema(schemaKeyRef) {
- if (schemaKeyRef instanceof RegExp) {
- _removeAllSchemas(self._schemas, schemaKeyRef);
- _removeAllSchemas(self._refs, schemaKeyRef);
- return;
- }
- switch (typeof schemaKeyRef) {
- case 'undefined':
- _removeAllSchemas(self._schemas);
- _removeAllSchemas(self._refs);
- self._cache.clear();
- return;
- case 'string':
- var schemaObj = _getSchemaObj(schemaKeyRef);
- if (schemaObj) self._cache.del(schemaObj.jsonStr);
- delete self._schemas[schemaKeyRef];
- delete self._refs[schemaKeyRef];
- return;
- case 'object':
- var jsonStr = stableStringify(schemaKeyRef);
- self._cache.del(jsonStr);
- var id = schemaKeyRef.id;
- if (id) {
- id = resolve.normalizeId(id);
- delete self._schemas[id];
- delete self._refs[id];
- }
- }
- }
-
-
- function _removeAllSchemas(schemas, regex) {
- for (var keyRef in schemas) {
- var schemaObj = schemas[keyRef];
- if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
- self._cache.del(schemaObj.jsonStr);
- delete schemas[keyRef];
- }
- }
- }
-
-
- function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
- if (typeof schema != 'object') throw new Error('schema should be object');
- var jsonStr = stableStringify(schema);
- var cached = self._cache.get(jsonStr);
- if (cached) return cached;
-
- shouldAddSchema = shouldAddSchema || self._opts.addUsedSchema !== false;
-
- var id = resolve.normalizeId(schema.id);
- if (id && shouldAddSchema) checkUnique(id);
-
- var willValidate = self._opts.validateSchema !== false && !skipValidation;
- var recursiveMeta;
- if (willValidate && !(recursiveMeta = schema.id && schema.id == schema.$schema))
- validateSchema(schema, true);
-
- var localRefs = resolve.ids.call(self, schema);
-
- var schemaObj = new SchemaObject({
- id: id,
- schema: schema,
- localRefs: localRefs,
- jsonStr: jsonStr,
- meta: meta
- });
-
- if (id[0] != '#' && shouldAddSchema) self._refs[id] = schemaObj;
- self._cache.put(jsonStr, schemaObj);
-
- if (willValidate && recursiveMeta) validateSchema(schema, true);
-
- return schemaObj;
- }
-
-
- function _compile(schemaObj, root) {
- if (schemaObj.compiling) {
- schemaObj.validate = callValidate;
- callValidate.schema = schemaObj.schema;
- callValidate.errors = null;
- callValidate.root = root ? root : callValidate;
- if (schemaObj.schema.$async === true)
- callValidate.$async = true;
- return callValidate;
- }
- schemaObj.compiling = true;
-
- var currentOpts;
- if (schemaObj.meta) {
- currentOpts = self._opts;
- self._opts = self._metaOpts;
- }
-
- var v;
- try { v = compileSchema.call(self, schemaObj.schema, root, schemaObj.localRefs); }
- finally {
- schemaObj.compiling = false;
- if (schemaObj.meta) self._opts = currentOpts;
- }
-
- schemaObj.validate = v;
- schemaObj.refs = v.refs;
- schemaObj.refVal = v.refVal;
- schemaObj.root = v.root;
- return v;
-
-
- function callValidate() {
- var _validate = schemaObj.validate;
- var result = _validate.apply(null, arguments);
- callValidate.errors = _validate.errors;
- return result;
- }
- }
-
-
- /**
- * Convert array of error message objects to string
- * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
- * @param {Object} options optional options with properties `separator` and `dataVar`.
- * @return {String} human readable string with all errors descriptions
- */
- function errorsText(errors, options) {
- errors = errors || self.errors;
- if (!errors) return 'No errors';
- options = options || {};
- var separator = options.separator === undefined ? ', ' : options.separator;
- var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
-
- var text = '';
- for (var i=0; i<errors.length; i++) {
- var e = errors[i];
- if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
- }
- return text.slice(0, -separator.length);
- }
-
-
- /**
- * Add custom format
- * @param {String} name format name
- * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
- */
- function addFormat(name, format) {
- if (typeof format == 'string') format = new RegExp(format);
- self._formats[name] = format;
- }
-
-
- function addDraft4MetaSchema() {
- if (self._opts.meta !== false) {
- var metaSchema = require('./refs/json-schema-draft-04.json');
- addMetaSchema(metaSchema, META_SCHEMA_ID, true);
- self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
- }
- }
-
-
- function addInitialSchemas() {
- var optsSchemas = self._opts.schemas;
- if (!optsSchemas) return;
- if (Array.isArray(optsSchemas)) addSchema(optsSchemas);
- else for (var key in optsSchemas) addSchema(optsSchemas[key], key);
- }
-
-
- function addInitialFormats() {
- for (var name in self._opts.formats) {
- var format = self._opts.formats[name];
- addFormat(name, format);
- }
- }
-
-
- function checkUnique(id) {
- if (self._schemas[id] || self._refs[id])
- throw new Error('schema with key or id "' + id + '" already exists');
- }
-
-
- function getMetaSchemaOptions() {
- var metaOpts = util.copy(self._opts);
- for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
- delete metaOpts[META_IGNORE_OPTIONS[i]];
- return metaOpts;
- }
-}
-
-},{"./async":1,"./cache":2,"./compile":6,"./compile/formats":5,"./compile/resolve":7,"./compile/rules":8,"./compile/schema_obj":9,"./compile/util":11,"./compile/validation_error":12,"./keyword":37,"./refs/json-schema-draft-04.json":38,"./v5":40,"co":41,"json-stable-stringify":42}]},{},[])("ajv")
-}); \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js b/node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js
deleted file mode 100644
index cee0fee6c..000000000
--- a/node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* ajv 4.11.8: Another JSON Schema Validator */
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.Ajv=e()}}(function(){var e;return function e(r,t,a){function s(i,n){if(!t[i]){if(!r[i]){var l="function"==typeof require&&require;if(!n&&l)return l(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[i]={exports:{}};r[i][0].call(h.exports,function(e){var t=r[i][1][e];return s(t||e)},h,h.exports,e,r,t,a)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<a.length;i++)s(a[i]);return s}({1:[function(e,r,t){"use strict";function a(e,r){!1!==r&&(r=!0);var t,s=e.async,o=e.transpile;switch(typeof o){case"string":var i=m[o];if(!i)throw new Error("bad transpiler: "+o);return e._transpileFunc=i(e,r);case"undefined":case"boolean":if("string"==typeof s){if(!(t=p[s]))throw new Error("bad async mode: "+s);return e.transpile=t(e,r)}for(var n=0;n<v.length;n++){var l=v[n];if(a(l,!1))return d.copy(l,e),e.transpile}throw new Error("generators, nodent and regenerator are not available");case"function":return e._transpileFunc=e.transpile;default:throw new Error("bad transpiler: "+o)}}function s(e,r){try{return new Function("(function*(){})()")(),!0}catch(e){if(r)throw new Error("generators not supported")}}function o(e,r){try{return new Function("(async function(){})()")(),!0}catch(e){if(r)throw new Error("es7 async functions not supported")}}function i(r,t){try{if(!u){u=e("regenerator"),u.runtime()}return r.async&&!0!==r.async||(r.async="es7"),n}catch(e){if(t)throw new Error("regenerator not available")}}function n(e){return u.compile(e).code}function l(r,t){try{if(!f){f=e("nodent")({log:!1,dontInstallRequireHook:!0})}return"es7"!=r.async&&(r.async&&!0!==r.async&&console.warn("nodent transpiles only es7 async functions"),r.async="es7"),c}catch(e){if(t)throw new Error("nodent not available")}}function c(e){return f.compile(e,"",{promises:!0,sourcemap:!1}).code}function h(e,r){function t(e,r,a){function o(e,t){if(!a)return r(e,t);setTimeout(function(){r(e,t)})}var i;try{i=s.compile(e)}catch(a){return void(a.missingSchema?function(a){function o(a,o){if(a)return r(a);if(!s._refs[i]&&!s._schemas[i])try{s.addSchema(o,i)}catch(e){return void r(e)}t(e,r)}var i=a.missingSchema;if(s._refs[i]||s._schemas[i])return r(new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved"));var n=s._loadingSchemas[i];n?"function"==typeof n?s._loadingSchemas[i]=[n,o]:n[n.length]=o:(s._loadingSchemas[i]=o,s._opts.loadSchema(i,function(e,r){var t=s._loadingSchemas[i];if(delete s._loadingSchemas[i],"function"==typeof t)t(e,r);else for(var a=0;a<t.length;a++)t[a](e,r)}))}(a):o(a))}o(null,i)}var a,s=this;try{a=this._addSchema(e)}catch(e){return void setTimeout(function(){r(e)})}if(a.validate)setTimeout(function(){r(null,a.validate)});else{if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");t(e,r,!0)}}r.exports={setup:a,compile:h};var u,f,d=e("./compile/util"),p={"*":s,"co*":s,es7:o},m={nodent:l,regenerator:i},v=[{async:"co*"},{async:"es7",transpile:"nodent"},{async:"co*",transpile:"regenerator"}]},{"./compile/util":11}],2:[function(e,r,t){"use strict";var a=r.exports=function(){this._cache={}};a.prototype.put=function(e,r){this._cache[e]=r},a.prototype.get=function(e){return this._cache[e]},a.prototype.del=function(e){delete this._cache[e]},a.prototype.clear=function(){this._cache={}}},{}],3:[function(e,r,t){"use strict";r.exports={$ref:e("../dotjs/ref"),allOf:e("../dotjs/allOf"),anyOf:e("../dotjs/anyOf"),dependencies:e("../dotjs/dependencies"),enum:e("../dotjs/enum"),format:e("../dotjs/format"),items:e("../dotjs/items"),maximum:e("../dotjs/_limit"),minimum:e("../dotjs/_limit"),maxItems:e("../dotjs/_limitItems"),minItems:e("../dotjs/_limitItems"),maxLength:e("../dotjs/_limitLength"),minLength:e("../dotjs/_limitLength"),maxProperties:e("../dotjs/_limitProperties"),minProperties:e("../dotjs/_limitProperties"),multipleOf:e("../dotjs/multipleOf"),not:e("../dotjs/not"),oneOf:e("../dotjs/oneOf"),pattern:e("../dotjs/pattern"),properties:e("../dotjs/properties"),required:e("../dotjs/required"),uniqueItems:e("../dotjs/uniqueItems"),validate:e("../dotjs/validate")}},{"../dotjs/_limit":14,"../dotjs/_limitItems":15,"../dotjs/_limitLength":16,"../dotjs/_limitProperties":17,"../dotjs/allOf":18,"../dotjs/anyOf":19,"../dotjs/dependencies":22,"../dotjs/enum":23,"../dotjs/format":24,"../dotjs/items":25,"../dotjs/multipleOf":26,"../dotjs/not":27,"../dotjs/oneOf":28,"../dotjs/pattern":29,"../dotjs/properties":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":35,"../dotjs/validate":36}],4:[function(e,r,t){"use strict";r.exports=function e(r,t){if(r===t)return!0;var a,s=Array.isArray(r),o=Array.isArray(t);if(s&&o){if(r.length!=t.length)return!1;for(a=0;a<r.length;a++)if(!e(r[a],t[a]))return!1;return!0}if(s!=o)return!1;if(r&&t&&"object"==typeof r&&"object"==typeof t){var i=Object.keys(r);if(i.length!==Object.keys(t).length)return!1;var n=r instanceof Date,l=t instanceof Date;if(n&&l)return r.getTime()==t.getTime();if(n!=l)return!1;var c=r instanceof RegExp,h=t instanceof RegExp;if(c&&h)return r.toString()==t.toString();if(c!=h)return!1;for(a=0;a<i.length;a++)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=0;a<i.length;a++)if(!e(r[i[a]],t[i[a]]))return!1;return!0}return!1}},{}],5:[function(e,r,t){"use strict";function a(e){e="full"==e?"full":"fast";var r=d.copy(a[e]);for(var t in a.compare)r[t]={validate:r[t],compare:a.compare[t]};return r}function s(e){var r=e.match(p);if(!r)return!1;var t=+r[1],a=+r[2];return t>=1&&t<=12&&a>=1&&a<=m[t]}function o(e,r){var t=e.match(v);if(!t)return!1;var a=t[1],s=t[2],o=t[3],i=t[5];return a<=23&&s<=59&&o<=59&&(!r||i)}function i(e){var r=e.split(b);return 2==r.length&&s(r[0])&&o(r[1],!0)}function n(e){return e.length<=255&&y.test(e)}function l(e){return w.test(e)&&g.test(e)}function c(e){try{return new RegExp(e),!0}catch(e){return!1}}function h(e,r){if(e&&r)return e>r?1:e<r?-1:e===r?0:void 0}function u(e,r){if(e&&r&&(e=e.match(v),r=r.match(v),e&&r))return e=e[1]+e[2]+e[3]+(e[4]||""),r=r[1]+r[2]+r[3]+(r[4]||""),e>r?1:e<r?-1:e===r?0:void 0}function f(e,r){if(e&&r){e=e.split(b),r=r.split(b);var t=h(e[0],r[0]);if(void 0!==t)return t||u(e[1],r[1])}}var d=e("./util"),p=/^\d\d\d\d-(\d\d)-(\d\d)$/,m=[0,31,29,31,30,31,30,31,31,30,31,30,31],v=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,y=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,g=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,P=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,E=/^(?:\/(?:[^~\/]|~0|~1)*)*$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:y,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c,uuid:P,"json-pointer":E,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/},a.full={date:s,time:o,"date-time":i,uri:l,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c,uuid:P,"json-pointer":E,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/},a.compare={date:h,time:u,"date-time":f};var b=/t|\s/i,w=/\/|\:/},{"./util":11}],6:[function(e,r,t){"use strict";function a(){if(void 0===d){try{d=e("js-beautify").js_beautify}catch(e){d=!1}}}function s(e,r,t,n){function j(){var e=N.validate,r=e.apply(null,arguments);return j.errors=e.errors,r}function S(e,t,o,i){var n=!t||t&&t.schema==e;if(t.schema!=r.schema)return s.call(k,e,t,o,i);var v=!0===e.$async;v&&!q.transpile&&y.setup(q);var j=g({isTop:!0,schema:e,isRoot:n,baseId:i,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:H,validate:g,util:m,resolve:p,resolveRef:$,usePattern:R,useDefault:I,useCustomRule:A,opts:q,formats:F,self:k});j=f(D,h)+f(Q,l)+f(V,c)+f(U,u)+j,q.beautify&&(a(),d?j=d(j,q.beautify):console.error('"npm install js-beautify" to use beautify option'));var S,x,_=q._transpileFunc;try{x=v&&_?_(j):j;S=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",x)(k,H,F,r,D,V,U,P,b,E,w),D[0]=S}catch(e){throw console.error("Error compiling schema, function code:",x),e}return S.schema=e,S.errors=null,S.refs=L,S.refVal=D,S.root=n?S:t,v&&(S.$async=!0),T&&(S.sourceCode=j),!0===q.sourceCode&&(S.source={patterns:Q,defaults:V}),S}function $(e,a,o){a=p.url(e,a);var i,n,l=L[a];if(void 0!==l)return i=D[l],n="refVal["+l+"]",O(i,n);if(!o&&r.refs){var c=r.refs[a];if(void 0!==c)return i=r.refVal[c],n=x(a,i),O(i,n)}n=x(a);var h=p.call(k,S,r,a);if(!h){var u=t&&t[a];u&&(h=p.inlineRef(u,q.inlineRefs)?u:s.call(k,u,r,t,e))}return h?(_(a,h),O(h,n)):void 0}function x(e,r){var t=D.length;return D[t]=r,L[e]=t,"refVal"+t}function _(e,r){D[L[e]]=r}function O(e,r){return"object"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function R(e){var r=C[e];return void 0===r&&(r=C[e]=Q.length,Q[r]=e),"pattern"+r}function I(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return m.toQuotedString(e);case"object":if(null===e)return"null";var r=v(e),t=z[r];return void 0===t&&(t=z[r]=V.length,V[t]=e),"default"+t}}function A(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==k._opts.validateSchema){if(!s(r)){var o="keyword schema is invalid: "+k.errorsText(s.errors);if("log"!=k._opts.validateSchema)throw new Error(o);console.error(o)}}var i,n=e.definition.compile,l=e.definition.inline,c=e.definition.macro;n?i=n.call(k,r,t,a):c?(i=c.call(k,r,t,a),!1!==q.validateSchema&&k.validateSchema(i,!0)):i=l?l.call(k,a,e.keyword,r,t):e.definition.validate;var h=U.length;return U[h]=i,{code:"customRule"+h,validate:i}}var k=this,q=this._opts,D=[void 0],L={},Q=[],C={},V=[],z={},U=[],T=!1!==q.sourceCode;r=r||{schema:e,refVal:D,refs:L};var M=o.call(this,e,r,n),N=this._compilations[M.index];if(M.compiling)return N.callValidate=j;var F=this._formats,H=this.RULES;try{var J=S(e,r,t,n);N.validate=J;var G=N.callValidate;return G&&(G.schema=J.schema,G.errors=null,G.refs=J.refs,G.refVal=J.refVal,G.root=J.root,G.$async=J.$async,T&&(G.sourceCode=J.sourceCode)),J}finally{i.call(this,e,r,n)}}function o(e,r,t){var a=n.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function i(e,r,t){var a=n.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function n(e,r,t){for(var a=0;a<this._compilations.length;a++){var s=this._compilations[a];if(s.schema==e&&s.root==r&&s.baseId==t)return a}return-1}function l(e,r){return"var pattern"+e+" = new RegExp("+m.toQuotedString(r[e])+");"}function c(e){return"var default"+e+" = defaults["+e+"];"}function h(e,r){return r[e]?"var refVal"+e+" = refVal["+e+"];":""}function u(e){return"var customRule"+e+" = customRules["+e+"];"}function f(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var d,p=e("./resolve"),m=e("./util"),v=e("json-stable-stringify"),y=e("../async"),g=e("../dotjs/validate"),P=e("co"),E=m.ucs2length,b=e("./equal"),w=e("./validation_error");r.exports=s},{"../async":1,"../dotjs/validate":36,"./equal":4,"./resolve":7,"./util":11,"./validation_error":12,co:41,"json-stable-stringify":42}],7:[function(e,r,t){"use strict";function a(e,r,t){var o=this._refs[t];if("string"==typeof o){if(!this._refs[o])return a.call(this,e,r,o);o=this._refs[o]}if((o=o||this._schemas[t])instanceof g)return n(o.schema,this._opts.inlineRefs)?o.schema:o.validate||this._compile(o);var i,l,c,h=s.call(this,r,t);return h&&(i=h.schema,r=h.root,c=h.baseId),i instanceof g?l=i.validate||e.call(this,i.schema,r,void 0,c):i&&(l=n(i,this._opts.inlineRefs)?i:e.call(this,i,r,void 0,c)),l}function s(e,r){var t=m.parse(r,!1,!0),a=u(t),s=h(e.schema.id);if(a!==s){var n=f(a),l=this._refs[n];if("string"==typeof l)return o.call(this,e,l,t);if(l instanceof g)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[n])instanceof g))return;if(l.validate||this._compile(l),n==f(r))return{schema:l,root:e,baseId:s};e=l}if(!e.schema)return;s=h(e.schema.id)}return i.call(this,t,s,e.schema,e)}function o(e,r,t){var a=s.call(this,e,r);if(a){var o=a.schema,n=a.baseId;return e=a.root,o.id&&(n=d(n,o.id)),i.call(this,t,n,o,e)}}function i(e,r,t,a){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var o=e.hash.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(n=y.unescapeFragment(n),!(t=t[n]))break;if(t.id&&!P[n]&&(r=d(r,t.id)),t.$ref){var l=d(r,t.$ref),c=s.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return t&&t!=a.schema?{schema:t,root:a,baseId:r}:void 0}}function n(e,r){return!1!==r&&(void 0===r||!0===r?l(e):r?c(e)<=r:void 0)}function l(e){var r;if(Array.isArray(e)){for(var t=0;t<e.length;t++)if("object"==typeof(r=e[t])&&!l(r))return!1}else for(var a in e){if("$ref"==a)return!1;if("object"==typeof(r=e[a])&&!l(r))return!1}return!0}function c(e){var r,t=0;if(Array.isArray(e)){for(var a=0;a<e.length;a++)if(r=e[a],"object"==typeof r&&(t+=c(r)),t==1/0)return 1/0}else for(var s in e){if("$ref"==s)return 1/0;if(E[s])t++;else if(r=e[s],"object"==typeof r&&(t+=c(r)+1),t==1/0)return 1/0}return t}function h(e,r){return!1!==r&&(e=f(e)),u(m.parse(e,!1,!0))}function u(e){var r=e.protocol||"//"==e.href.slice(0,2)?"//":"";return(e.protocol||"")+r+(e.host||"")+(e.path||"")+"#"}function f(e){return e?e.replace(b,""):""}function d(e,r){return r=f(r),m.resolve(e,r)}function p(e){function r(e,t,s){if(Array.isArray(e))for(var o=0;o<e.length;o++)r.call(this,e[o],t+"/"+o,s);else if(e&&"object"==typeof e){if("string"==typeof e.id){var i=s=s?m.resolve(s,e.id):e.id;i=f(i);var n=this._refs[i];if("string"==typeof n&&(n=this._refs[n]),n&&n.schema){if(!v(e,n.schema))throw new Error('id "'+i+'" resolves to more than one schema')}else if(i!=f(t))if("#"==i[0]){if(a[i]&&!v(e,a[i]))throw new Error('id "'+i+'" resolves to more than one schema');a[i]=e}else this._refs[i]=t}for(var l in e)r.call(this,e[l],t+"/"+y.escapeFragment(l),s)}}var t=f(e.id),a={};return r.call(this,e,h(t,!1),t),a}var m=e("url"),v=e("./equal"),y=e("./util"),g=e("./schema_obj");r.exports=a,a.normalizeId=f,a.fullPath=h,a.url=d,a.ids=p,a.inlineRef=n,a.schema=s;var P=y.toHash(["properties","patternProperties","enum","dependencies","definitions"]),E=y.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),b=/#\/?$/},{"./equal":4,"./schema_obj":9,"./util":11,url:50}],8:[function(e,r,t){"use strict";var a=e("./_rules"),s=e("./util").toHash;r.exports=function(){var e=[{type:"number",rules:["maximum","minimum","multipleOf"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","properties"]},{rules:["$ref","enum","not","anyOf","oneOf","allOf"]}],r=["type","additionalProperties","patternProperties"],t=["additionalItems","$schema","id","title","description","default"],o=["number","integer","string","array","object","boolean","null"];return e.all=s(r),e.forEach(function(t){t.rules=t.rules.map(function(t){return r.push(t),e.all[t]={keyword:t,code:a[t]}})}),e.keywords=s(r.concat(t)),e.types=s(o),e.custom={},e}},{"./_rules":3,"./util":11}],9:[function(e,r,t){"use strict";function a(e){s.copy(e,this)}var s=e("./util");r.exports=a},{"./util":11}],10:[function(e,r,t){"use strict";r.exports=function(e){for(var r,t=0,a=e.length,s=0;s<a;)t++,(r=e.charCodeAt(s++))>=55296&&r<=56319&&s<a&&56320==(64512&(r=e.charCodeAt(s)))&&s++;return t}},{}],11:[function(e,r,t){"use strict";function a(e,r){r=r||{};for(var t in e)r[t]=e[t];return r}function s(e,r,t){var a=t?" !== ":" === ",s=t?" || ":" && ",o=t?"!":"",i=t?"":"!";switch(e){case"null":return r+a+"null";case"array":return o+"Array.isArray("+r+")";case"object":return"("+o+r+s+"typeof "+r+a+'"object"'+s+i+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+a+'"number"'+s+i+"("+r+" % 1)"+s+r+a+r+")";default:return"typeof "+r+a+'"'+e+'"'}}function o(e,r){switch(e.length){case 1:return s(e[0],r,!0);default:var t="",a=n(e);a.array&&a.object&&(t=a.null?"(":"(!"+r+" || ",t+="typeof "+r+' !== "object")',delete a.null,delete a.array,delete a.object),a.number&&delete a.integer;for(var o in a)t+=(t?" && ":"")+s(o,r,!0);return t}}function i(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var s=r[a];$[s]?t[t.length]=s:"array"===e&&"array"===s&&(t[t.length]=s)}if(t.length)return t}else{if($[r])return[r];if("array"===e&&"array"===r)return["array"]}}function n(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}function l(e){return"number"==typeof e?"["+e+"]":x.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(_,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function h(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0}function u(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")}function f(e){return e.replace(O,"").replace(R,"").replace(I,"if (!($1))")}function d(e,r){var t=e.match(A);return t&&2===t.length?r?e.replace(q,"").replace(Q,C):e.replace(k,"").replace(D,L):e}function p(e,r){for(var t in e)if(r[t])return!0}function m(e,r,t){for(var a in e)if(a!=t&&r[a])return!0}function v(e){return"'"+c(e)+"'"}function y(e,r,t,a){return E(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")}function g(e,r,t){return E(e,v(t?"/"+j(r):l(r)))}function P(e,r,t){var a,s,o,i;if(""===e)return"rootData";if("/"==e[0]){if(!V.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,o="rootData"}else{if(!(i=e.match(z)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(s=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(o="data"+(r-a||""),!s)return o}for(var n=o,c=s.split("/"),h=0;h<c.length;h++){var u=c[h];u&&(o+=l(S(u)),n+=" && "+o)}return n}function E(e,r){return'""'==e?r:(e+" + "+r).replace(/' \+ '/g,"")}function b(e){return S(decodeURIComponent(e))}function w(e){return encodeURIComponent(j(e))}function j(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function S(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}r.exports={copy:a,checkDataType:s,checkDataTypes:o,coerceToTypes:i,toHash:n,getProperty:l,escapeQuotes:c,ucs2length:e("./ucs2length"),varOccurences:h,varReplace:u,cleanUpCode:f,cleanUpVarErrors:d,schemaHasRules:p,schemaHasRulesExcept:m,stableStringify:e("json-stable-stringify"),toQuotedString:v,getPathExpr:y,getPath:g,getData:P,unescapeFragment:b,escapeFragment:w,escapeJsonPointer:j};var $=n(["string","number","integer","boolean","null"]),x=/^[a-z$_][a-z$_0-9]*$/i,_=/'|\\/g,O=/else\s*{\s*}/g,R=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,I=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,A=/[^v\.]errors/g,k=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,q=/var errors = 0;|var vErrors = null;/g,D="return errors === 0;",L="validate.errors = null; return true;",Q=/if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,C="return true;",V=/^\/(?:[^~]|~0|~1)*$/,z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/},{"./ucs2length":10,"json-stable-stringify":42}],12:[function(e,r,t){"use strict";function a(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}r.exports=a,a.prototype=Object.create(Error.prototype),a.prototype.constructor=a},{}],13:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s;if(a+="var "+u+" = undefined;",!1===e.opts.format)return a+=" "+u+" = true; ";var f=e.schema.format,d=e.opts.v5&&f.$data,p="";if(d){var m=e.util.getData(f.$data,o,e.dataPathArr),v="format"+s,y="compare"+s;a+=" var "+v+" = formats["+m+"] , "+y+" = "+v+" && "+v+".compare;"}else{var v=e.formats[f];if(!v||!v.compare)return a+=" "+u+" = true; ";var y="formats"+e.util.getProperty(f)+".compare"}var g,P="formatMaximum"==r,E="formatExclusive"+(P?"Maximum":"Minimum"),b=e.schema[E],w=e.opts.v5&&b&&b.$data,j=P?"<":">",S="result"+s,$=e.opts.v5&&i&&i.$data;if($?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",g="schema"+s):g=i,w){var x=e.util.getData(b.$data,o,e.dataPathArr),_="exclusive"+s,O="op"+s,R="' + "+O+" + '";a+=" var schemaExcl"+s+" = "+x+"; ",x="schemaExcl"+s,a+=" if (typeof "+x+" != 'boolean' && "+x+" !== undefined) { "+u+" = false; ";var t=E,I=I||[];I.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(t||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(p+="}",a+=" else { "),$&&(a+=" if ("+g+" === undefined) "+u+" = true; else if (typeof "+g+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+S+" = "+y+"("+h+", ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" ); if ("+S+" === undefined) "+u+" = false; var "+_+" = "+x+" === true; if ("+u+" === undefined) { "+u+" = "+_+" ? "+S+" "+j+" 0 : "+S+" "+j+"= 0; } if (!"+u+") var op"+s+" = "+_+" ? '"+j+"' : '"+j+"=';"}else{var _=!0===b,R=j;_||(R+="=");var O="'"+R+"'";$&&(a+=" if ("+g+" === undefined) "+u+" = true; else if (typeof "+g+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+S+" = "+y+"("+h+", ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" ); if ("+S+" === undefined) "+u+" = false; if ("+u+" === undefined) "+u+" = "+S+" "+j,_||(a+="="),a+=" 0;"}a+=p+"if (!"+u+") { ";var t=r,I=I||[];I.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(t||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+O+", limit: ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" , exclusive: "+_+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be "+R+' "',a+=$?"' + "+g+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=$?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;return a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="}"}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maximum"==r,p=d?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=e.opts.v5&&m&&m.$data,y=d?"<":">",g=d?">":"<";if(v){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,b="op"+o,w="' + "+b+" + '";s+=" var schemaExcl"+o+" = "+P+"; ",P="schemaExcl"+o,s+=" var exclusive"+o+"; if (typeof "+P+" != 'boolean' && typeof "+P+" != 'undefined') { ";var t=p,j=j||[];j.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var S=s;s=j.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ((exclusive"+o+" = "+P+" === true) ? "+u+" "+g+"= "+a+" : "+u+" "+g+" "+a+") || "+u+" !== "+u+") { var op"+o+" = exclusive"+o+" ? '"+y+"' : '"+y+"=';"}else{var E=!0===m,w=y;E||(w+="=");var b="'"+w+"'";s+=" if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+" "+g,E&&(s+="="),s+=" "+a+" || "+u+" !== "+u+") {"}var t=r,j=j||[];j.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+b+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+w+" ",s+=f?"' + "+a:n+"'"),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var S=s;return s=j.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",h&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxItems"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+".length "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxLength"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+u+".length ":" ucs2length("+u+") ",s+=" "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,
-s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxProperties"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+u+").length "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],18:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,h=n.baseId,u=!0,f=a;if(f)for(var d,p=-1,m=f.length-1;p<m;)d=f[p+=1],e.util.schemaHasRules(d,e.RULES.all)&&(u=!1,n.schema=d,n.schemaPath=s+"["+p+"]",n.errSchemaPath=o+"/"+p,t+=" "+e.validate(n)+" ",n.baseId=h,i&&(t+=" if ("+c+") { ",l+="}"));return i&&(t+=u?" if (true) { ":" "+l.slice(0,-1)+" "),t=e.util.cleanUpCode(t)}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level;if(o.every(function(r){return e.util.schemaHasRules(r,e.RULES.all)})){var m=f.baseId;t+=" var "+u+" = errors; var "+h+" = false; ";var v=e.compositeRule;e.compositeRule=f.compositeRule=!0;var y=o;if(y)for(var g,P=-1,E=y.length-1;P<E;)g=y[P+=1],f.schema=g,f.schemaPath=i+"["+P+"]",f.errSchemaPath=n+"/"+P,t+=" "+e.validate(f)+" ",f.baseId=m,t+=" "+h+" = "+h+" || "+p+"; if (!"+h+") { ",d+="}";e.compositeRule=f.compositeRule=v,t+=" "+d+" if (!"+h+") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } "),t=e.util.cleanUpCode(t)}else l&&(t+=" if (true) { ");return t}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u=e.opts.v5&&o&&o.$data;u&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; "),u||(t+=" var schema"+a+" = validate.schema"+i+";"),t+="var "+h+" = equal("+c+", schema"+a+"); if (!"+h+") { ";var f=f||[];f.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'constant' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to constant' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var d=t;return t=f.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+d+"]); ":" validate.errors = ["+d+"]; return false; ":" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }"}},{}],21:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f="valid"+o,d="errs__"+o,p=e.opts.v5&&n&&n.$data;p?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var m,v,y,g,P,E=this,b="definition"+o,w=E.definition;if(p&&w.$data){P="keywordValidate"+o;var j=w.validateSchema;s+=" var "+b+" = RULES.custom['"+r+"'].definition; var "+P+" = "+b+".validate;"}else g=e.useCustomRule(E,n,e.schema,e),a="validate.schema"+l,P=g.code,m=w.compile,v=w.inline,y=w.macro;var S=P+".errors",$="i"+o,x="ruleErr"+o,_=w.async;if(_&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(s+=S+" = null;"),s+="var "+d+" = errors;var "+f+";",j&&(s+=" "+f+" = "+b+".validateSchema("+a+"); if ("+f+") {"),v)s+=w.statements?" "+g.validate+" ":" "+f+" = "+g.validate+"; ";else if(y){var O=e.util.copy(e);O.level++;var R="valid"+O.level;O.schema=g.validate,O.schemaPath="";var I=e.compositeRule;e.compositeRule=O.compositeRule=!0;var A=e.validate(O).replace(/validate\.schema/g,P);e.compositeRule=O.compositeRule=I,s+=" "+A}else{var k=k||[];k.push(s),s="",s+=" "+P+".call( ",s+=e.opts.passContext?"this":"self",s+=m||!1===w.schema?" , "+u+" ":" , "+a+" , "+u+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var q=i?"data"+(i-1||""):"parentData",D=i?e.dataPathArr[i]:"parentDataProperty";s+=" , "+q+" , "+D+" , rootData ) ";var L=s;s=k.pop(),!1===w.errors?(s+=" "+f+" = ",_&&(s+=""+e.yieldAwait),s+=L+"; "):_?(S="customErrors"+o,s+=" var "+S+" = null; try { "+f+" = "+e.yieldAwait+L+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+S+" = e.errors; else throw e; } "):s+=" "+S+" = null; "+f+" = "+L+"; "}if(w.modifying&&(s+=" "+u+" = "+q+"["+D+"];"),j&&(s+=" }"),w.valid)h&&(s+=" if (true) { ");else{s+=" if ( ",void 0===w.valid?(s+=" !",s+=y?""+R:""+f):s+=" "+!w.valid+" ",s+=") { ",t=E.keyword;var k=k||[];k.push(s),s="";var k=k||[];k.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var Q=s;s=k.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+Q+"]); ":" validate.errors = ["+Q+"]; return false; ":" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var C=s;s=k.pop(),v?w.errors?"full"!=w.errors&&(s+=" for (var "+$+"="+d+"; "+$+"<errors; "+$+"++) { var "+x+" = vErrors["+$+"]; if ("+x+".dataPath === undefined) "+x+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+x+".schemaPath === undefined) { "+x+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(s+=" "+x+".schema = "+a+"; "+x+".data = "+u+"; "),s+=" } "):!1===w.errors?s+=" "+C+" ":(s+=" if ("+d+" == errors) { "+C+" } else { for (var "+$+"="+d+"; "+$+"<errors; "+$+"++) { var "+x+" = vErrors["+$+"]; if ("+x+".dataPath === undefined) "+x+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+x+".schemaPath === undefined) { "+x+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(s+=" "+x+".schema = "+a+"; "+x+".data = "+u+"; "),s+=" } } "):y?(s+=" var err = ",!1!==e.createErrors?(s+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(s+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; ")):!1===w.errors?s+=" "+C+" ":(s+=" if (Array.isArray("+S+")) { if (vErrors === null) vErrors = "+S+"; else vErrors = vErrors.concat("+S+"); errors = vErrors.length; for (var "+$+"="+d+"; "+$+"<errors; "+$+"++) { var "+x+" = vErrors["+$+"]; if ("+x+".dataPath === undefined) "+x+".dataPath = (dataPath || '') + "+e.errorPath+"; "+x+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(s+=" "+x+".schema = "+a+"; "+x+".data = "+u+"; "),s+=" } } else { "+C+" } "),s+=" } ",h&&(s+=" else { ")}return s}},{}],22:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="errs__"+a,u=e.util.copy(e),f="";u.level++;var d="valid"+u.level,p={},m={};for(P in o){var v=o[P],y=Array.isArray(v)?m:p;y[P]=v}t+="var "+h+" = errors;";var g=e.errorPath;t+="var missing"+a+";";for(var P in m){if(y=m[P],t+=" if ("+c+e.util.getProperty(P)+" !== undefined ",l){t+=" && ( ";var E=y;if(E)for(var b,w=-1,j=E.length-1;w<j;){b=E[w+=1],w&&(t+=" || ");var S=e.util.getProperty(b);t+=" ( "+c+S+" === undefined && (missing"+a+" = "+e.util.toQuotedString(e.opts.jsonPointers?b:S)+") ) "}t+=")) { ";var $="missing"+a,x="' + "+$+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(g,$,!0):g+" + "+$);var _=_||[];_.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+x+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),t+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var O=t;t=_.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{t+=" ) { ";var R=y;if(R)for(var I,A=-1,k=R.length-1;A<k;){I=R[A+=1];var S=e.util.getProperty(I),x=e.util.escapeQuotes(I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(g,I,e.opts.jsonPointers)),t+=" if ("+c+S+" === undefined) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+x+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),t+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}t+=" } ",l&&(f+="}",t+=" else { ")}e.errorPath=g;var q=u.baseId;for(var P in p){var v=p[P];e.util.schemaHasRules(v,e.RULES.all)&&(t+=" "+d+" = true; if ("+c+e.util.getProperty(P)+" !== undefined) { ",u.schema=v,u.schemaPath=i+e.util.getProperty(P),u.errSchemaPath=n+"/"+e.util.escapeFragment(P),t+=" "+e.validate(u)+" ",u.baseId=q,t+=" } ",l&&(t+=" if ("+d+") { ",f+="}"))}return l&&(t+=" "+f+" if ("+h+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],23:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u=e.opts.v5&&o&&o.$data;u&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");var f="i"+a,d="schema"+a;u||(t+=" var "+d+" = validate.schema"+i+";"),t+="var "+h+";",u&&(t+=" if (schema"+a+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+a+")) "+h+" = false; else {"),t+=h+" = false;for (var "+f+"=0; "+f+"<"+d+".length; "+f+"++) if (equal("+c+", "+d+"["+f+"])) { "+h+" = true; break; }",u&&(t+=" } "),t+=" if (!"+h+") { ";var p=p||[];p.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { allowedValues: schema"+a+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var m=t;return t=p.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }",l&&(t+=" else { "),t}},{}],24:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||"");if(!1===e.opts.format)return l&&(t+=" if (true) { "),t;var h,u=e.opts.v5&&o&&o.$data;u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+a):h=o;var f=e.opts.unknownFormats,d=Array.isArray(f);if(u){var p="format"+a;t+=" var "+p+" = formats["+h+"]; var isObject"+a+" = typeof "+p+" == 'object' && !("+p+" instanceof RegExp) && "+p+".validate; if (isObject"+a+") { ",e.async&&(t+=" var async"+a+" = "+p+".async; "),t+=" "+p+" = "+p+".validate; } if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),t+=" (",(!0===f||d)&&(t+=" ("+h+" && !"+p+" ",d&&(t+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),t+=") || "),t+=" ("+p+" && !(typeof "+p+" == 'function' ? ",t+=e.async?" (async"+a+" ? "+e.yieldAwait+" "+p+"("+c+") : "+p+"("+c+")) ":" "+p+"("+c+") ",t+=" : "+p+".test("+c+"))))) {"}else{var p=e.formats[o];if(!p){if(!0===f||d&&-1==f.indexOf(o))throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"');return d||(console.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),"ignore"!==f&&console.warn("In the next major version it will throw exception. See option unknownFormats for more information")),l&&(t+=" if (true) { "),t}var m="object"==typeof p&&!(p instanceof RegExp)&&p.validate;if(m){var v=!0===p.async;p=p.validate}if(v){if(!e.async)throw new Error("async format in sync schema");var y="formats"+e.util.getProperty(o)+".validate";t+=" if (!("+e.yieldAwait+" "+y+"("+c+"))) { "}else{t+=" if (! ";var y="formats"+e.util.getProperty(o);m&&(y+=".validate"),t+="function"==typeof p?" "+y+"("+c+") ":" "+y+".test("+c+") ",t+=") { "}}var g=g||[];g.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { format: ",t+=u?""+h:""+e.util.toQuotedString(o),t+=" } ",!1!==e.opts.messages&&(t+=" , message: 'should match format \"",t+=u?"' + "+h+" + '":""+e.util.escapeQuotes(o),t+="\"' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+e.util.toQuotedString(o),t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var P=t;return t=g.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+P+"]); ":" validate.errors = ["+P+"]; return false; ":" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",l&&(t+=" else { "),t}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level,m="i"+a,v=f.dataLevel=e.dataLevel+1,y="data"+v,g=e.baseId;if(t+="var "+u+" = errors;var "+h+";",Array.isArray(o)){var P=e.schema.additionalItems;if(!1===P){t+=" "+h+" = "+c+".length <= "+o.length+"; ";var E=n;n=e.errSchemaPath+"/additionalItems",t+=" if (!"+h+") { ";var b=b||[];b.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var w=t;t=b.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",n=E,l&&(d+="}",t+=" else { ")}var j=o;if(j)for(var S,$=-1,x=j.length-1;$<x;)if(S=j[$+=1],e.util.schemaHasRules(S,e.RULES.all)){t+=" "+p+" = true; if ("+c+".length > "+$+") { ";var _=c+"["+$+"]";f.schema=S,f.schemaPath=i+"["+$+"]",f.errSchemaPath=n+"/"+$,f.errorPath=e.util.getPathExpr(e.errorPath,$,e.opts.jsonPointers,!0),f.dataPathArr[v]=$;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}if("object"==typeof P&&e.util.schemaHasRules(P,e.RULES.all)){f.schema=P,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",t+=" "+p+" = true; if ("+c+".length > "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var _=c+"["+m+"]";f.dataPathArr[v]=m;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",l&&(t+=" if (!"+p+") break; "),t+=" } } ",l&&(t+=" if ("+p+") { ",d+="}")}}else if(e.util.schemaHasRules(o,e.RULES.all)){f.schema=o,f.schemaPath=i,f.errSchemaPath=n,t+=" for (var "+m+" = 0; "+m+" < "+c+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var _=c+"["+m+"]";f.dataPathArr[v]=m;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",l&&(t+=" if (!"+p+") break; "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i&&i.$data;u?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",t="schema"+s):t=i,a+="var division"+s+";if (",u&&(a+=" "+t+" !== undefined && ( typeof "+t+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+t+", ",a+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",u&&(a+=" ) "),a+=" ) { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+t+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be multiple of ",a+=u?"' + "+t:i+"'"),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var d=a;return a=f.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+d+"]); ":" validate.errors = ["+d+"]; return false; ":" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="errs__"+a,u=e.util.copy(e);u.level++;var f="valid"+u.level;if(e.util.schemaHasRules(o,e.RULES.all)){u.schema=o,u.schemaPath=i,u.errSchemaPath=n,t+=" var "+h+" = errors; ";var d=e.compositeRule;e.compositeRule=u.compositeRule=!0,u.createErrors=!1;var p;u.opts.allErrors&&(p=u.opts.allErrors,u.opts.allErrors=!1),t+=" "+e.validate(u)+" ",u.createErrors=!0,p&&(u.opts.allErrors=p),e.compositeRule=u.compositeRule=d,t+=" if ("+f+") { ";var m=m||[];m.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var v=t;t=m.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } ")}else t+=" var err = ",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(t+=" if (false) { ");return t}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level;t+="var "+u+" = errors;var prevValid"+a+" = false;var "+h+" = false;";var m=f.baseId,v=e.compositeRule;e.compositeRule=f.compositeRule=!0;var y=o;if(y)for(var g,P=-1,E=y.length-1;P<E;)g=y[P+=1],e.util.schemaHasRules(g,e.RULES.all)?(f.schema=g,f.schemaPath=i+"["+P+"]",f.errSchemaPath=n+"/"+P,t+=" "+e.validate(f)+" ",f.baseId=m):t+=" var "+p+" = true; ",P&&(t+=" if ("+p+" && prevValid"+a+") "+h+" = false; else { ",d+="}"),t+=" if ("+p+") "+h+" = prevValid"+a+" = true;";e.compositeRule=f.compositeRule=v,t+=d+"if (!"+h+") { ";var b=b||[];b.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var w=t;return t=b.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; }",e.opts.allErrors&&(t+=" } "),t}},{}],29:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i&&i.$data;u?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",t="schema"+s):t=i;var f=u?"(new RegExp("+t+"))":e.usePattern(i);a+="if ( ",u&&(a+=" ("+t+" !== undefined && typeof "+t+" != 'string') || "),a+=" !"+f+".test("+h+") ) { ";var d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { pattern: ",a+=u?""+t:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match pattern \"",a+=u?"' + "+t+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var p=a;return a=d.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="key"+a,f="patternMatched"+a,d="",p=e.opts.ownProperties;t+="var "+h+" = true;";var m=o;if(m)for(var v,y=-1,g=m.length-1;y<g;){v=m[y+=1],t+=" var "+f+" = false; for (var "+u+" in "+c+") { ",p&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+u+")) continue; "),t+=" "+f+" = "+e.usePattern(v)+".test("+u+"); if ("+f+") break; } ";var P=e.util.escapeQuotes(v);t+=" if (!"+f+") { "+h+" = false; var err = ",!1!==e.createErrors?(t+=" { keyword: 'patternRequired' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingPattern: '"+P+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have property matching pattern \\'"+P+"\\'' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ",l&&(d+="}",t+=" else { ")}return t+=""+d}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level,m="key"+a,v=f.dataLevel=e.dataLevel+1,y="data"+v,g=Object.keys(o||{}),P=e.schema.patternProperties||{},E=Object.keys(P),b=e.schema.additionalProperties,w=g.length||E.length,j=!1===b,S="object"==typeof b&&Object.keys(b).length,$=e.opts.removeAdditional,x=j||S||$,_=e.opts.ownProperties,O=e.baseId,R=e.schema.required;if(R&&(!e.opts.v5||!R.$data)&&R.length<e.opts.loopRequired)var I=e.util.toHash(R);if(e.opts.v5)var A=e.schema.patternGroups||{},k=Object.keys(A);if(t+="var "+u+" = errors;var "+p+" = true;",x){if(t+=" for (var "+m+" in "+c+") { ",_&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+m+")) continue; "),w){if(t+=" var isAdditional"+a+" = !(false ",g.length)if(g.length>5)t+=" || validate.schema"+i+"["+m+"] ";else{var q=g;if(q)for(var D,L=-1,Q=q.length-1;L<Q;)D=q[L+=1],t+=" || "+m+" == "+e.util.toQuotedString(D)+" "}if(E.length){var C=E;if(C)for(var V,z=-1,U=C.length-1;z<U;)V=C[z+=1],t+=" || "+e.usePattern(V)+".test("+m+") "}if(e.opts.v5&&k&&k.length){var T=k;if(T)for(var M,z=-1,N=T.length-1;z<N;)M=T[z+=1],t+=" || "+e.usePattern(M)+".test("+m+") "}t+=" ); if (isAdditional"+a+") { "}if("all"==$)t+=" delete "+c+"["+m+"]; ";else{var F=e.errorPath,H="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),j)if($)t+=" delete "+c+"["+m+"]; ";else{t+=" "+p+" = false; ";var J=n;n=e.errSchemaPath+"/additionalProperties";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { additionalProperty: '"+H+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n=J,l&&(t+=" break; ")}else if(S)if("failing"==$){t+=" var "+u+" = errors; ";var B=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=b,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",t+=" if (!"+p+") { errors = "+u+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+m+"]; } ",e.compositeRule=f.compositeRule=B}else{f.schema=b,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",l&&(t+=" if (!"+p+") break; ")}e.errorPath=F}w&&(t+=" } "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}var W=e.opts.useDefaults&&!e.compositeRule;if(g.length){var X=g;if(X)for(var D,ee=-1,re=X.length-1;ee<re;){D=X[ee+=1];var te=o[D];if(e.util.schemaHasRules(te,e.RULES.all)){var ae=e.util.getProperty(D),Z=c+ae,se=W&&void 0!==te.default;f.schema=te,f.schemaPath=i+ae,f.errSchemaPath=n+"/"+e.util.escapeFragment(D),f.errorPath=e.util.getPath(e.errorPath,D,e.opts.jsonPointers),f.dataPathArr[v]=e.util.toQuotedString(D);var Y=e.validate(f);if(f.baseId=O,e.util.varOccurences(Y,y)<2){Y=e.util.varReplace(Y,y,Z);var oe=Z}else{var oe=y;t+=" var "+y+" = "+Z+"; "}if(se)t+=" "+Y+" ";else{if(I&&I[D]){t+=" if ("+oe+" === undefined) { "+p+" = false; ";var F=e.errorPath,J=n,ie=e.util.escapeQuotes(D);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(F,D,e.opts.jsonPointers)),n=e.errSchemaPath+"/required";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+ie+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+ie+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n=J,e.errorPath=F,t+=" } else { "}else t+=l?" if ("+oe+" === undefined) { "+p+" = true; } else { ":" if ("+oe+" !== undefined) { "
-;t+=" "+Y+" } "}}l&&(t+=" if ("+p+") { ",d+="}")}}var ne=E;if(ne)for(var V,le=-1,ce=ne.length-1;le<ce;){V=ne[le+=1];var te=P[V];if(e.util.schemaHasRules(te,e.RULES.all)){f.schema=te,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(V),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(V),t+=" for (var "+m+" in "+c+") { ",_&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+m+")) continue; "),t+=" if ("+e.usePattern(V)+".test("+m+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",l&&(t+=" if (!"+p+") break; "),t+=" } ",l&&(t+=" else "+p+" = true; "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}}if(e.opts.v5){var he=k;if(he)for(var M,ue=-1,fe=he.length-1;ue<fe;){M=he[ue+=1];var de=A[M],te=de.schema;if(e.util.schemaHasRules(te,e.RULES.all)){f.schema=te,f.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(M)+".schema",f.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(M)+"/schema",t+=" var pgPropCount"+a+" = 0; for (var "+m+" in "+c+") { ",_&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+m+")) continue; "),t+=" if ("+e.usePattern(M)+".test("+m+")) { pgPropCount"+a+"++; ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",l&&(t+=" if (!"+p+") break; "),t+=" } ",l&&(t+=" else "+p+" = true; "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}");var pe=de.minimum,me=de.maximum;if(void 0!==pe||void 0!==me){t+=" var "+h+" = true; ";var J=n;if(void 0!==pe){var ve=pe,ye="minimum",ge="less";t+=" "+h+" = pgPropCount"+a+" >= "+pe+"; ",n=e.errSchemaPath+"/patternGroups/minimum",t+=" if (!"+h+") { ";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",void 0!==me&&(t+=" else ")}if(void 0!==me){var ve=me,ye="maximum",ge="more";t+=" "+h+" = pgPropCount"+a+" <= "+me+"; ",n=e.errSchemaPath+"/patternGroups/maximum",t+=" if (!"+h+") { ";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } "}n=J,l&&(t+=" if ("+h+") { ",d+="}")}}}}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],32:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),u="valid"+o;if("#"==n||"#/"==n)e.isRoot?(t=e.async,a="validate"):(t=!0===e.root.schema.$async,a="root.refVal[0]");else{var f=e.resolveRef(e.baseId,n,e.isRoot);if(void 0===f){var d="can't resolve reference "+n+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(d);var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(n)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var v=new Error(d);throw v.missingRef=e.resolve.url(e.baseId,n),v.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(v.missingRef)),v}console.log(d),c&&(s+=" if (true) { ")}}else if(f.inline){var y=e.util.copy(e);y.level++;var g="valid"+y.level;y.schema=f.schema,y.schemaPath="",y.errSchemaPath=n;var P=e.validate(y).replace(/validate\.schema/g,f.code);s+=" "+P+" ",c&&(s+=" if ("+g+") { ")}else t=!0===f.$async,a=f.code}if(a){var p=p||[];p.push(s),s="",s+=e.opts.passContext?" "+a+".call(this, ":" "+a+"( ",s+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);s+=" , "+(i?"data"+(i-1||""):"parentData")+" , "+(i?e.dataPathArr[i]:"parentDataProperty")+", rootData) ";var E=s;if(s=p.pop(),t){if(!e.async)throw new Error("async schema referenced by sync schema");s+=" try { ",c&&(s+="var "+u+" ="),s+=" "+e.yieldAwait+" "+E+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",c&&(s+=" if ("+u+") { ")}else s+=" if (!"+E+") { if (vErrors === null) vErrors = "+a+".errors; else vErrors = vErrors.concat("+a+".errors); errors = vErrors.length; } ",c&&(s+=" else { ")}return s}},{}],33:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u=e.opts.v5&&o&&o.$data;u&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");var f="schema"+a;if(!u)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],p=o;if(p)for(var m,v=-1,y=p.length-1;v<y;){m=p[v+=1];var g=e.schema.properties[m];g&&e.util.schemaHasRules(g,e.RULES.all)||(d[d.length]=m)}}else var d=o;if(u||d.length){var P=e.errorPath,E=u||d.length>=e.opts.loopRequired;if(l)if(t+=" var missing"+a+"; ",E){u||(t+=" var "+f+" = validate.schema"+i+"; ");var b="i"+a,w="schema"+a+"["+b+"]",j="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,w,e.opts.jsonPointers)),t+=" var "+h+" = true; ",u&&(t+=" if (schema"+a+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+a+")) "+h+" = false; else {"),t+=" for (var "+b+" = 0; "+b+" < "+f+".length; "+b+"++) { "+h+" = "+c+"["+f+"["+b+"]] !== undefined; if (!"+h+") break; } ",u&&(t+=" } "),t+=" if (!"+h+") { ";var S=S||[];S.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var $=t;t=S.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else{t+=" if ( ";var x=d;if(x)for(var _,b=-1,O=x.length-1;b<O;){_=x[b+=1],b&&(t+=" || ");var R=e.util.getProperty(_);t+=" ( "+c+R+" === undefined && (missing"+a+" = "+e.util.toQuotedString(e.opts.jsonPointers?_:R)+") ) "}t+=") { ";var w="missing"+a,j="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,w,!0):P+" + "+w);var S=S||[];S.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var $=t;t=S.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else if(E){u||(t+=" var "+f+" = validate.schema"+i+"; ");var b="i"+a,w="schema"+a+"["+b+"]",j="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,w,e.opts.jsonPointers)),u&&(t+=" if ("+f+" && !Array.isArray("+f+")) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+f+" !== undefined) { "),t+=" for (var "+b+" = 0; "+b+" < "+f+".length; "+b+"++) { if ("+c+"["+f+"["+b+"]] === undefined) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",u&&(t+=" } ")}else{var I=d;if(I)for(var A,k=-1,q=I.length-1;k<q;){A=I[k+=1];var R=e.util.getProperty(A),j=e.util.escapeQuotes(A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,A,e.opts.jsonPointers)),t+=" if ("+c+R+" === undefined) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else l&&(t+=" if (true) {");return t}},{}],34:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p,m="valid"+f.level,v="ifPassed"+e.level,y=f.baseId;t+="var "+v+";";var g=o;if(g)for(var P,E=-1,b=g.length-1;E<b;){if(P=g[E+=1],E&&!p&&(t+=" if (!"+v+") { ",d+="}"),P.if&&e.util.schemaHasRules(P.if,e.RULES.all)){t+=" var "+u+" = errors; ";var w=e.compositeRule;if(e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.schema=P.if,f.schemaPath=i+"["+E+"].if",f.errSchemaPath=n+"/"+E+"/if",t+=" "+e.validate(f)+" ",f.baseId=y,f.createErrors=!0,e.compositeRule=f.compositeRule=w,t+=" "+v+" = "+m+"; if ("+v+") { ","boolean"==typeof P.then){if(!1===P.then){var j=j||[];j.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { caseIndex: "+E+" } ",!1!==e.opts.messages&&(t+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var S=t;t=j.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}t+=" var "+m+" = "+P.then+"; "}else f.schema=P.then,f.schemaPath=i+"["+E+"].then",f.errSchemaPath=n+"/"+E+"/then",t+=" "+e.validate(f)+" ",f.baseId=y;t+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } } "}else if(t+=" "+v+" = true; ","boolean"==typeof P.then){if(!1===P.then){var j=j||[];j.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { caseIndex: "+E+" } ",!1!==e.opts.messages&&(t+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var S=t;t=j.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}t+=" var "+m+" = "+P.then+"; "}else f.schema=P.then,f.schemaPath=i+"["+E+"].then",f.errSchemaPath=n+"/"+E+"/then",t+=" "+e.validate(f)+" ",f.baseId=y;p=P.continue}return t+=d+"var "+h+" = "+m+"; ",t=e.util.cleanUpCode(t)}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i&&i.$data;if(f?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",t="schema"+s):t=i,(i||f)&&!1!==e.opts.uniqueItems){f&&(a+=" var "+u+"; if ("+t+" === false || "+t+" === undefined) "+u+" = true; else if (typeof "+t+" != 'boolean') "+u+" = false; else { "),a+=" var "+u+" = true; if ("+h+".length > 1) { var i = "+h+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+u+" = false; break outer; } } } } ",f&&(a+=" } "),a+=" if (!"+u+") { ";var d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var p=a;a=d.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a}},{}],36:[function(e,r,t){"use strict";r.exports=function(e,r){function t(r){return void 0!==e.schema[r.keyword]||"properties"==r.keyword&&(!1===e.schema.additionalProperties||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length||e.opts.v5&&e.schema.patternGroups&&Object.keys(e.schema.patternGroups).length)}var a="",s=!0===e.schema.$async;if(e.isTop){var o=e.isTop,i=e.level=0,n=e.dataLevel=0,l="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,s){e.async=!0;var c="es7"==e.opts.async;e.yieldAwait=c?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],a+=" var validate = ",s?c?a+=" (async function ":("co*"==e.opts.async&&(a+="co.wrap"),a+="(function* "):a+=" (function ",a+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data;"}else{var i=e.level,n=e.dataLevel,l="data"+(n||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+i+" = errors;"}var h="valid"+i,u=!e.opts.allErrors,f="",d="",p=e.schema.type,m=Array.isArray(p);if(p&&e.opts.coerceTypes){var v=e.util.coerceToTypes(e.opts.coerceTypes,p);if(v){var y=e.schemaPath+".type",g=e.errSchemaPath+"/type",P=m?"checkDataTypes":"checkDataType";a+=" if ("+e.util[P](p,l,!0)+") { ";var E="dataType"+i,b="coerced"+i;a+=" var "+E+" = typeof "+l+"; ","array"==e.opts.coerceTypes&&(a+=" if ("+E+" == 'object' && Array.isArray("+l+")) "+E+" = 'array'; "),a+=" var "+b+" = undefined; ";var w="",j=v;if(j)for(var S,$=-1,x=j.length-1;$<x;)S=j[$+=1],$&&(a+=" if ("+b+" === undefined) { ",w+="}"),"array"==e.opts.coerceTypes&&"array"!=S&&(a+=" if ("+E+" == 'array' && "+l+".length == 1) { "+b+" = "+l+" = "+l+"[0]; "+E+" = typeof "+l+"; } "),"string"==S?a+=" if ("+E+" == 'number' || "+E+" == 'boolean') "+b+" = '' + "+l+"; else if ("+l+" === null) "+b+" = ''; ":"number"==S||"integer"==S?(a+=" if ("+E+" == 'boolean' || "+l+" === null || ("+E+" == 'string' && "+l+" && "+l+" == +"+l+" ","integer"==S&&(a+=" && !("+l+" % 1)"),a+=")) "+b+" = +"+l+"; "):"boolean"==S?a+=" if ("+l+" === 'false' || "+l+" === 0 || "+l+" === null) "+b+" = false; else if ("+l+" === 'true' || "+l+" === 1) "+b+" = true; ":"null"==S?a+=" if ("+l+" === '' || "+l+" === 0 || "+l+" === false) "+b+" = null; ":"array"==e.opts.coerceTypes&&"array"==S&&(a+=" if ("+E+" == 'string' || "+E+" == 'number' || "+E+" == 'boolean' || "+l+" == null) "+b+" = ["+l+"]; ");a+=" "+w+" if ("+b+" === undefined) { ";var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { type: '",a+=m?""+p.join(","):""+p,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=m?""+p.join(","):""+p,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),a+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ";var R=n?"data"+(n-1||""):"parentData",I=n?e.dataPathArr[n]:"parentDataProperty";a+=" "+l+" = "+b+"; ",n||(a+="if ("+R+" !== undefined)"),a+=" "+R+"["+I+"] = "+b+"; } } "}}var A;if(e.schema.$ref&&(A=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"))){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'"');"ignore"==e.opts.extendRefs?(A=!1,console.log('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')):!0!==e.opts.extendRefs&&console.log('$ref: all keywords used in schema at path "'+e.errSchemaPath+'". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour')}if(e.schema.$ref&&!A)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",u&&(a+=" } if (errors === ",a+=o?"0":"errs_"+i,a+=") { ",d+="}");else{var k=e.RULES;if(k)for(var q,D=-1,L=k.length-1;D<L;)if(q=k[D+=1],function(e){for(var r=0;r<e.rules.length;r++)if(t(e.rules[r]))return!0}(q)){if(q.type&&(a+=" if ("+e.util.checkDataType(q.type,l)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==q.type&&e.schema.properties){var Q=e.schema.properties,C=Object.keys(Q),V=C;if(V)for(var z,U=-1,T=V.length-1;U<T;){z=V[U+=1];var M=Q[z];if(void 0!==M.default){var N=l+e.util.getProperty(z);a+=" if ("+N+" === undefined) "+N+" = ",a+="shared"==e.opts.useDefaults?" "+e.useDefault(M.default)+" ":" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==q.type&&Array.isArray(e.schema.items)){var F=e.schema.items;if(F)for(var M,$=-1,H=F.length-1;$<H;)if(M=F[$+=1],void 0!==M.default){var N=l+"["+$+"]";a+=" if ("+N+" === undefined) "+N+" = ",a+="shared"==e.opts.useDefaults?" "+e.useDefault(M.default)+" ":" "+JSON.stringify(M.default)+" ",a+="; "}}var J=q.rules;if(J)for(var G,K=-1,B=J.length-1;K<B;)G=J[K+=1],t(G)&&(a+=" "+G.code(e,G.keyword)+" ",u&&(f+="}"));if(u&&(a+=" "+f+" ",f=""),q.type&&(a+=" } ",p&&p===q.type&&!v)){var Z=!0;a+=" else { ";var y=e.schemaPath+".type",g=e.errSchemaPath+"/type",_=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { type: '",a+=m?""+p.join(","):""+p,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=m?""+p.join(","):""+p,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),a+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}u&&(a+=" if (errors === ",a+=o?"0":"errs_"+i,a+=") { ",d+="}")}}if(p&&!Z&&!v){var y=e.schemaPath+".type",g=e.errSchemaPath+"/type",P=m?"checkDataTypes":"checkDataType";a+=" if ("+e.util[P](p,l,!0)+") { ";var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { type: '",a+=m?""+p.join(","):""+p,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=m?""+p.join(","):""+p,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),a+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }"}return u&&(a+=" "+d+" "),o?(s?(a+=" if (errors === 0) return true; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }); return validate;"):a+=" var "+h+" = errors === errs_"+i+";",a=e.util.cleanUpCode(a),o&&u&&(a=e.util.cleanUpVarErrors(a,s)),a}},{}],37:[function(e,r,t){"use strict";function a(e,r){function t(e,r,t){for(var a,o=0;o<s.length;o++){var i=s[o];if(i.type==r){a=i;break}}a||(a={type:r,rules:[]},s.push(a));var l={keyword:e,definition:t,custom:!0,code:n};a.rules.push(l),s.custom[e]=l}function a(e){if(!s.types[e])throw new Error("Unknown type "+e)}var s=this.RULES;if(s.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!i.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){if(r.macro&&void 0!==r.valid)throw new Error('"valid" option cannot be used with macro keywords');var o=r.type;if(Array.isArray(o)){var l,c=o.length;for(l=0;l<c;l++)a(o[l]);for(l=0;l<c;l++)t(e,o[l],r)}else o&&a(o),t(e,o,r);var h=!0===r.$data&&this._opts.v5;if(h&&!r.validate)throw new Error('$data support: "validate" function is not defined');var u=r.metaSchema;u&&(h&&(u={anyOf:[u,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data"}]}),r.validateSchema=this.compile(u,!0))}s.keywords[e]=s.all[e]=!0}function s(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1}function o(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,s=0;s<a.length;s++)if(a[s].keyword==e){a.splice(s,1);break}}var i=/^[a-z_$][a-z0-9_$\-]*$/i,n=e("./dotjs/custom");r.exports={add:a,get:s,remove:o}},{"./dotjs/custom":21}],38:[function(e,r,t){r.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}},{}],39:[function(e,r,t){r.exports={id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema (v5 proposals)",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},$data:{type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{anyOf:[{type:"number",minimum:0,exclusiveMinimum:!0},{$ref:"#/definitions/$data"}]},maximum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMaximum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMinimum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},maxLength:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minLength:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},pattern:{anyOf:[{type:"string",format:"regex"},{$ref:"#/definitions/$data"}]},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minItems:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},uniqueItems:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},maxProperties:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minProperties:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},required:{anyOf:[{$ref:"#/definitions/stringArray"},{$ref:"#/definitions/$data"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{anyOf:[{type:"array",minItems:1,uniqueItems:!0},{$ref:"#/definitions/$data"}]},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"},format:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMaximum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMinimum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatExclusiveMaximum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},formatExclusiveMinimum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},constant:{anyOf:[{},{$ref:"#/definitions/$data"}]},contains:{$ref:"#"},patternGroups:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},schema:{$ref:"#"}},additionalProperties:!1},default:{}},switch:{type:"array",items:{required:["then"],properties:{if:{$ref:"#"},then:{anyOf:[{type:"boolean"},{$ref:"#"}]},continue:{type:"boolean"}},additionalProperties:!1,dependencies:{continue:["if"]}}}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"],formatMaximum:["format"],formatMinimum:["format"],formatExclusiveMaximum:["formatMaximum"],formatExclusiveMinimum:["formatMinimum"]},default:{}}},{}],40:[function(e,r,t){"use strict";function a(r){function t(e,t,s){var o={inline:s||a[e],statements:!0,errors:"full"};t&&(o.type=t),r.addKeyword(e,o)}var a={switch:e("./dotjs/switch"),constant:e("./dotjs/constant"),_formatLimit:e("./dotjs/_formatLimit"),patternRequired:e("./dotjs/patternRequired")};if(!1!==r._opts.meta){var i=e("./refs/json-schema-v5.json");r.addMetaSchema(i,o)}t("constant"),r.addKeyword("contains",{type:"array",macro:s}),t("formatMaximum","string",a._formatLimit),t("formatMinimum","string",a._formatLimit),r.addKeyword("formatExclusiveMaximum"),r.addKeyword("formatExclusiveMinimum"),r.addKeyword("patternGroups"),t("patternRequired","object"),t("switch")}function s(e){return{not:{items:{not:e}}}}var o="https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json";r.exports={enable:a,META_SCHEMA_ID:o}},{"./dotjs/_formatLimit":13,"./dotjs/constant":20,"./dotjs/patternRequired":30,"./dotjs/switch":34,"./refs/json-schema-v5.json":39}],
-41:[function(e,r,t){function a(e){var r=this,t=f.call(arguments,1);return new Promise(function(a,o){function i(r){var t;try{t=e.next(r)}catch(e){return o(e)}c(t)}function n(r){var t;try{t=e.throw(r)}catch(e){return o(e)}c(t)}function c(e){if(e.done)return a(e.value);var t=s.call(r,e.value);return t&&l(t)?t.then(i,n):n(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}if("function"==typeof e&&(e=e.apply(r,t)),!e||"function"!=typeof e.next)return a(e);i()})}function s(e){return e?l(e)?e:h(e)||c(e)?a.call(this,e):"function"==typeof e?o.call(this,e):Array.isArray(e)?i.call(this,e):u(e)?n.call(this,e):e:e}function o(e){var r=this;return new Promise(function(t,a){e.call(r,function(e,r){if(e)return a(e);arguments.length>2&&(r=f.call(arguments,1)),t(r)})})}function i(e){return Promise.all(e.map(s,this))}function n(e){for(var r=new e.constructor,t=Object.keys(e),a=[],o=0;o<t.length;o++){var i=t[o],n=s.call(this,e[i]);n&&l(n)?function(e,t){r[t]=void 0,a.push(e.then(function(e){r[t]=e}))}(n,i):r[i]=e[i]}return Promise.all(a).then(function(){return r})}function l(e){return"function"==typeof e.then}function c(e){return"function"==typeof e.next&&"function"==typeof e.throw}function h(e){var r=e.constructor;return!!r&&("GeneratorFunction"===r.name||"GeneratorFunction"===r.displayName||c(r.prototype))}function u(e){return Object==e.constructor}var f=Array.prototype.slice;r.exports=a.default=a.co=a,a.wrap=function(e){function r(){return a.call(this,e.apply(this,arguments))}return r.__generatorFunction__=e,r}},{}],42:[function(e,r,t){var a="undefined"!=typeof JSON?JSON:e("jsonify");r.exports=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t=r.space||"";"number"==typeof t&&(t=Array(t+1).join(" "));var i="boolean"==typeof r.cycles&&r.cycles,n=r.replacer||function(e,r){return r},l=r.cmp&&function(e){return function(r){return function(t,a){return e({key:t,value:r[t]},{key:a,value:r[a]})}}}(r.cmp),c=[];return function e(r,h,u,f){var d=t?"\n"+new Array(f+1).join(t):"",p=t?": ":":";if(u&&u.toJSON&&"function"==typeof u.toJSON&&(u=u.toJSON()),void 0!==(u=n.call(r,h,u))){if("object"!=typeof u||null===u)return a.stringify(u);if(s(u)){for(var m=[],v=0;v<u.length;v++){var y=e(u,v,u[v],f+1)||a.stringify(null);m.push(d+t+y)}return"["+m.join(",")+d+"]"}if(-1!==c.indexOf(u)){if(i)return a.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}c.push(u);for(var g=o(u).sort(l&&l(u)),m=[],v=0;v<g.length;v++){var h=g[v],P=e(u,h,u[h],f+1);if(P){var E=a.stringify(h)+p+P;m.push(d+t+E)}}return c.splice(c.indexOf(u),1),"{"+m.join(",")+d+"}"}}({"":e},"",e,0)};var s=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var r=Object.prototype.hasOwnProperty||function(){return!0},t=[];for(var a in e)r.call(e,a)&&t.push(a);return t}},{jsonify:43}],43:[function(e,r,t){t.parse=e("./lib/parse"),t.stringify=e("./lib/stringify")},{"./lib/parse":44,"./lib/stringify":45}],44:[function(e,r,t){var a,s,o,i,n={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},l=function(e){throw{name:"SyntaxError",message:e,at:a,text:o}},c=function(e){return e&&e!==s&&l("Expected '"+e+"' instead of '"+s+"'"),s=o.charAt(a),a+=1,s},h=function(){var e,r="";for("-"===s&&(r="-",c("-"));s>="0"&&s<="9";)r+=s,c();if("."===s)for(r+=".";c()&&s>="0"&&s<="9";)r+=s;if("e"===s||"E"===s)for(r+=s,c(),"-"!==s&&"+"!==s||(r+=s,c());s>="0"&&s<="9";)r+=s,c();if(e=+r,isFinite(e))return e;l("Bad number")},u=function(){var e,r,t,a="";if('"'===s)for(;c();){if('"'===s)return c(),a;if("\\"===s)if(c(),"u"===s){for(t=0,r=0;r<4&&(e=parseInt(c(),16),isFinite(e));r+=1)t=16*t+e;a+=String.fromCharCode(t)}else{if("string"!=typeof n[s])break;a+=n[s]}else a+=s}l("Bad string")},f=function(){for(;s&&s<=" ";)c()},d=function(){switch(s){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}l("Unexpected '"+s+"'")},p=function(){var e=[];if("["===s){if(c("["),f(),"]"===s)return c("]"),e;for(;s;){if(e.push(i()),f(),"]"===s)return c("]"),e;c(","),f()}}l("Bad array")},m=function(){var e,r={};if("{"===s){if(c("{"),f(),"}"===s)return c("}"),r;for(;s;){if(e=u(),f(),c(":"),Object.hasOwnProperty.call(r,e)&&l('Duplicate key "'+e+'"'),r[e]=i(),f(),"}"===s)return c("}"),r;c(","),f()}}l("Bad object")};i=function(){switch(f(),s){case"{":return m();case"[":return p();case'"':return u();case"-":return h();default:return s>="0"&&s<="9"?h():d()}},r.exports=function(e,r){var t;return o=e,a=0,s=" ",t=i(),f(),s&&l("Syntax error"),"function"==typeof r?function e(t,a){var s,o,i=t[a];if(i&&"object"==typeof i)for(s in i)Object.prototype.hasOwnProperty.call(i,s)&&(o=e(i,s),void 0!==o?i[s]=o:delete i[s]);return r.call(t,a,i)}({"":t},""):t}},{}],45:[function(e,r,t){function a(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,function(e){var r=c[e];return"string"==typeof r?r:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function s(e,r){var t,l,c,h,u,f=o,d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof n&&(d=n.call(r,e,d)),typeof d){case"string":return a(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(o+=i,u=[],"[object Array]"===Object.prototype.toString.apply(d)){for(h=d.length,t=0;t<h;t+=1)u[t]=s(t,d)||"null";return c=0===u.length?"[]":o?"[\n"+o+u.join(",\n"+o)+"\n"+f+"]":"["+u.join(",")+"]",o=f,c}if(n&&"object"==typeof n)for(h=n.length,t=0;t<h;t+=1)"string"==typeof(l=n[t])&&(c=s(l,d))&&u.push(a(l)+(o?": ":":")+c);else for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(c=s(l,d))&&u.push(a(l)+(o?": ":":")+c);return c=0===u.length?"{}":o?"{\n"+o+u.join(",\n"+o)+"\n"+f+"}":"{"+u.join(",")+"}",o=f,c}}var o,i,n,l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};r.exports=function(e,r,t){var a;if(o="",i="","number"==typeof t)for(a=0;a<t;a+=1)i+=" ";else"string"==typeof t&&(i=t);if(n=r,r&&"function"!=typeof r&&("object"!=typeof r||"number"!=typeof r.length))throw new Error("JSON.stringify");return s("",{"":e})}},{}],46:[function(r,t,a){(function(r){!function(s){function o(e){throw new RangeError(D[e])}function i(e,r){for(var t=e.length,a=[];t--;)a[t]=r(e[t]);return a}function n(e,r){var t=e.split("@"),a="";return t.length>1&&(a=t[0]+"@",e=t[1]),e=e.replace(q,"."),a+i(e.split("."),r).join(".")}function l(e){for(var r,t,a=[],s=0,o=e.length;s<o;)r=e.charCodeAt(s++),r>=55296&&r<=56319&&s<o?(t=e.charCodeAt(s++),56320==(64512&t)?a.push(((1023&r)<<10)+(1023&t)+65536):(a.push(r),s--)):a.push(r);return a}function c(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=C(e>>>10&1023|55296),e=56320|1023&e),r+=C(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:j}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function f(e,r,t){var a=0;for(e=t?Q(e/_):e>>1,e+=Q(e/r);e>L*$>>1;a+=j)e=Q(e/L);return Q(a+(L+1)*e/(e+x))}function d(e){var r,t,a,s,i,n,l,u,d,p,m=[],v=e.length,y=0,g=R,P=O;for(t=e.lastIndexOf(I),t<0&&(t=0),a=0;a<t;++a)e.charCodeAt(a)>=128&&o("not-basic"),m.push(e.charCodeAt(a));for(s=t>0?t+1:0;s<v;){for(i=y,n=1,l=j;s>=v&&o("invalid-input"),u=h(e.charCodeAt(s++)),(u>=j||u>Q((w-y)/n))&&o("overflow"),y+=u*n,d=l<=P?S:l>=P+$?$:l-P,!(u<d);l+=j)p=j-d,n>Q(w/p)&&o("overflow"),n*=p;r=m.length+1,P=f(y-i,r,0==i),Q(y/r)>w-g&&o("overflow"),g+=Q(y/r),y%=r,m.splice(y++,0,g)}return c(m)}function p(e){var r,t,a,s,i,n,c,h,d,p,m,v,y,g,P,E=[];for(e=l(e),v=e.length,r=R,t=0,i=O,n=0;n<v;++n)(m=e[n])<128&&E.push(C(m));for(a=s=E.length,s&&E.push(I);a<v;){for(c=w,n=0;n<v;++n)(m=e[n])>=r&&m<c&&(c=m);for(y=a+1,c-r>Q((w-t)/y)&&o("overflow"),t+=(c-r)*y,r=c,n=0;n<v;++n)if(m=e[n],m<r&&++t>w&&o("overflow"),m==r){for(h=t,d=j;p=d<=i?S:d>=i+$?$:d-i,!(h<p);d+=j)P=h-p,g=j-p,E.push(C(u(p+P%g,0))),h=Q(P/g);E.push(C(u(h,0))),i=f(t,y,a==s),t=0,++a}++t,++r}return E.join("")}function m(e){return n(e,function(e){return A.test(e)?d(e.slice(4).toLowerCase()):e})}function v(e){return n(e,function(e){return k.test(e)?"xn--"+p(e):e})}var y="object"==typeof a&&a&&!a.nodeType&&a,g="object"==typeof t&&t&&!t.nodeType&&t,P="object"==typeof r&&r;P.global!==P&&P.window!==P&&P.self!==P||(s=P);var E,b,w=2147483647,j=36,S=1,$=26,x=38,_=700,O=72,R=128,I="-",A=/^xn--/,k=/[^\x20-\x7E]/,q=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=j-S,Q=Math.floor,C=String.fromCharCode;if(E={version:"1.4.1",ucs2:{decode:l,encode:c},decode:d,encode:p,toASCII:v,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return E});else if(y&&g)if(t.exports==y)g.exports=E;else for(b in E)E.hasOwnProperty(b)&&(y[b]=E[b]);else s.punycode=E}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;e=e.split(r);var n=1e3;o&&"number"==typeof o.maxKeys&&(n=o.maxKeys);var l=e.length;n>0&&l>n&&(l=n);for(var c=0;c<l;++c){var h,u,f,d,p=e[c].replace(/\+/g,"%20"),m=p.indexOf(t);m>=0?(h=p.substr(0,m),u=p.substr(m+1)):(h=p,u=""),f=decodeURIComponent(h),d=decodeURIComponent(u),a(i,f)?s(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],48:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a<e.length;a++)t.push(r(e[a],a));return t}var s=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};r.exports=function(e,r,t,n){return r=r||"&",t=t||"=",null===e&&(e=void 0),"object"==typeof e?a(i(e),function(i){var n=encodeURIComponent(s(i))+t;return o(e[i])?a(e[i],function(e){return n+encodeURIComponent(s(e))}).join(r):n+encodeURIComponent(s(e[i]))}).join(r):n?encodeURIComponent(s(n))+t+encodeURIComponent(s(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=Object.keys||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r}},{}],49:[function(e,r,t){"use strict";t.decode=t.parse=e("./decode"),t.encode=t.stringify=e("./encode")},{"./decode":47,"./encode":48}],50:[function(e,r,t){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function s(e,r,t){if(e&&c.isObject(e)&&e instanceof a)return e;var s=new a;return s.parse(e,r,t),s}function o(e){return c.isString(e)&&(e=s(e)),e instanceof a?e.format():a.prototype.format.call(e)}function i(e,r){return s(e,!1,!0).resolve(r)}function n(e,r){return e?s(e,!1,!0).resolveObject(r):r}var l=e("punycode"),c=e("./util");t.parse=s,t.resolve=i,t.resolveObject=n,t.format=o,t.Url=a;var h=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],g={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=e("querystring");a.prototype.parse=function(e,r,t){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",o=e.split(s);o[0]=o[0].replace(/\\/g,"/"),e=o.join(s);var i=e;if(i=i.trim(),!t&&1===e.split("#").length){var n=f.exec(i);if(n)return this.path=i,this.href=i,this.pathname=n[1],n[2]?(this.search=n[2],this.query=r?b.parse(this.search.substr(1)):this.search.substr(1)):r&&(this.search="",this.query={}),this}var u=h.exec(i);if(u){u=u[0];var d=u.toLowerCase();this.protocol=d,i=i.substr(u.length)}if(t||u||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===i.substr(0,2);!p||u&&P[u]||(i=i.substr(2),this.slashes=!0)}if(!P[u]&&(p||u&&!E[u])){for(var w=-1,j=0;j<y.length;j++){var S=i.indexOf(y[j]);-1!==S&&(-1===w||S<w)&&(w=S)}var $,x;x=-1===w?i.lastIndexOf("@"):i.lastIndexOf("@",w),-1!==x&&($=i.slice(0,x),i=i.slice(x+1),this.auth=decodeURIComponent($)),w=-1;for(var j=0;j<v.length;j++){var S=i.indexOf(v[j]);-1!==S&&(-1===w||S<w)&&(w=S)}-1===w&&(w=i.length),this.host=i.slice(0,w),i=i.slice(w),this.parseHost(),this.hostname=this.hostname||"";var _="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!_)for(var O=this.hostname.split(/\./),j=0,R=O.length;j<R;j++){var I=O[j];if(I&&!I.match(/^[+a-z0-9A-Z_-]{0,63}$/)){for(var A="",k=0,q=I.length;k<q;k++)I.charCodeAt(k)>127?A+="x":A+=I[k];if(!A.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var D=O.slice(0,j),L=O.slice(j+1),Q=I.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);Q&&(D.push(Q[1]),L.unshift(Q[2])),L.length&&(i="/"+L.join(".")+i),this.hostname=D.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),_||(this.hostname=l.toASCII(this.hostname));var C=this.port?":"+this.port:"";this.host=(this.hostname||"")+C,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!g[d])for(var j=0,R=m.length;j<R;j++){var V=m[j];if(-1!==i.indexOf(V)){var z=encodeURIComponent(V);z===V&&(z=escape(V)),i=i.split(V).join(z)}}var U=i.indexOf("#");-1!==U&&(this.hash=i.substr(U),i=i.slice(0,U));var T=i.indexOf("?");if(-1!==T?(this.search=i.substr(T),this.query=i.substr(T+1),r&&(this.query=b.parse(this.query)),i=i.slice(0,T)):r&&(this.search="",this.query={}),i&&(this.pathname=i),E[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var C=this.pathname||"";this.path=C+(this.search||"")}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var r=this.protocol||"",t=this.pathname||"",a=this.hash||"",s=!1,o="";this.host?s=e+this.host:this.hostname&&(s=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(o=b.stringify(this.query));var i=this.search||o&&"?"+o||"";return r&&":"!==r.substr(-1)&&(r+=":"),this.slashes||(!r||E[r])&&!1!==s?(s="//"+(s||""),t&&"/"!==t.charAt(0)&&(t="/"+t)):s||(s=""),a&&"#"!==a.charAt(0)&&(a="#"+a),i&&"?"!==i.charAt(0)&&(i="?"+i),t=t.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),i=i.replace("#","%23"),r+s+t+i+a},a.prototype.resolve=function(e){return this.resolveObject(s(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(c.isString(e)){var r=new a;r.parse(e,!1,!0),e=r}for(var t=new a,s=Object.keys(this),o=0;o<s.length;o++){var i=s[o];t[i]=this[i]}if(t.hash=e.hash,""===e.href)return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var n=Object.keys(e),l=0;l<n.length;l++){var h=n[l];"protocol"!==h&&(t[h]=e[h])}return E[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!E[e.protocol]){for(var u=Object.keys(e),f=0;f<u.length;f++){var d=u[f];t[d]=e[d]}return t.href=t.format(),t}if(t.protocol=e.protocol,e.host||P[e.protocol])t.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),t.pathname=p.join("/")}if(t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,t.pathname||t.search){t.path=(t.pathname||"")+(t.search||"")}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var m=t.pathname&&"/"===t.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=v||m||t.host&&e.pathname,g=y,b=t.pathname&&t.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],w=t.protocol&&!E[t.protocol];if(w&&(t.hostname="",t.port=null,t.host&&(""===b[0]?b[0]=t.host:b.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),y=y&&(""===p[0]||""===b[0])),v)t.host=e.host||""===e.host?e.host:t.host,t.hostname=e.hostname||""===e.hostname?e.hostname:t.hostname,t.search=e.search,t.query=e.query,b=p;else if(p.length)b||(b=[]),b.pop(),b=b.concat(p),t.search=e.search,t.query=e.query;else if(!c.isNullOrUndefined(e.search)){if(w){t.hostname=t.host=b.shift();var j=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");j&&(t.auth=j.shift(),t.host=t.hostname=j.shift())}return t.search=e.search,t.query=e.query,c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!b.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var S=b.slice(-1)[0],$=(t.host||e.host||b.length>1)&&("."===S||".."===S)||""===S,x=0,_=b.length;_>=0;_--)S=b[_],"."===S?b.splice(_,1):".."===S?(b.splice(_,1),x++):x&&(b.splice(_,1),x--);if(!y&&!g)for(;x--;x)b.unshift("..");!y||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),$&&"/"!==b.join("/").substr(-1)&&b.push("");var O=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(w){t.hostname=t.host=O?"":b.length?b.shift():"";var j=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");j&&(t.auth=j.shift(),t.host=t.hostname=j.shift())}return y=y||t.host&&b.length,y&&!O&&b.unshift(""),b.length?t.pathname=b.join("/"):(t.pathname=null,t.path=null),c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=u.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":51,punycode:46,querystring:49}],51:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],ajv:[function(e,r,t){"use strict";function a(e){return g.test(e)}function s(r){function t(e,r){var t;if("string"==typeof e){if(!(t=S(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=R(e);t=a.validate||I(a)}var s=t(r);return!0===t.$async?"*"==D._opts.async?m(s):s:(D.errors=t.errors,s)}function v(e,r){var t=R(e,void 0,r);return t.validate||I(t)}function E(e,r,t,a){if(Array.isArray(e))for(var s=0;s<e.length;s++)E(e[s],void 0,t,a);else r=i.normalizeId(r||e.id),q(r),D._schemas[r]=R(e,t,a,!0)}function b(e,r,t){E(e,r,t,!0)}function w(e,r){var s=e.$schema||D._opts.defaultMeta||j(),o=D._formats.uri;D._formats.uri="function"==typeof o?a:g;var i;try{i=t(s,e)}finally{D._formats.uri=o}if(!i&&r){var n="schema is invalid: "+A();if("log"!=D._opts.validateSchema)throw new Error(n);console.error(n)}return i}function j(){var e=D._opts.meta;return D._opts.defaultMeta="object"==typeof e?e.id||e:D._opts.v5?f.META_SCHEMA_ID:y}function S(e){var r=x(e);switch(typeof r){case"object":return r.validate||I(r);case"string":return S(r);case"undefined":return $(e)}}function $(e){var r=i.schema.call(D,{schema:{}},e);if(r){var t=r.schema,a=r.root,s=r.baseId,n=o.call(D,t,a,void 0,s);return D._fragments[e]=new l({ref:e,fragment:!0,schema:t,root:a,baseId:s,validate:n}),n}}function x(e){return e=i.normalizeId(e),D._schemas[e]||D._refs[e]||D._fragments[e]}function _(e){if(e instanceof RegExp)return O(D._schemas,e),void O(D._refs,e);switch(typeof e){case"undefined":return O(D._schemas),O(D._refs),void D._cache.clear();case"string":var r=x(e);return r&&D._cache.del(r.jsonStr),delete D._schemas[e],void delete D._refs[e];case"object":var t=c(e);D._cache.del(t);var a=e.id;a&&(a=i.normalizeId(a),delete D._schemas[a],delete D._refs[a])}}function O(e,r){for(var t in e){var a=e[t];a.meta||r&&!r.test(t)||(D._cache.del(a.jsonStr),delete e[t])}}function R(e,r,t,a){if("object"!=typeof e)throw new Error("schema should be object");var s=c(e),o=D._cache.get(s);if(o)return o;a=a||!1!==D._opts.addUsedSchema;var n=i.normalizeId(e.id);n&&a&&q(n);var h,u=!1!==D._opts.validateSchema&&!r;u&&!(h=e.id&&e.id==e.$schema)&&w(e,!0);var f=i.ids.call(D,e),d=new l({id:n,schema:e,localRefs:f,jsonStr:s,meta:t});return"#"!=n[0]&&a&&(D._refs[n]=d),D._cache.put(s,d),u&&h&&w(e,!0),d}function I(e,r){function t(){var r=e.validate,a=r.apply(null,arguments);return t.errors=r.errors,a}if(e.compiling)return e.validate=t,t.schema=e.schema,t.errors=null,t.root=r||t,!0===e.schema.$async&&(t.$async=!0),t;e.compiling=!0;var a;e.meta&&(a=D._opts,D._opts=D._metaOpts);var s;try{s=o.call(D,e.schema,r,e.localRefs)}finally{e.compiling=!1,e.meta&&(D._opts=a)}return e.validate=s,e.refs=s.refs,e.refVal=s.refVal,e.root=s.root,s}function A(e,r){if(!(e=e||D.errors))return"No errors";r=r||{};for(var t=void 0===r.separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o<e.length;o++){var i=e[o];i&&(s+=a+i.dataPath+" "+i.message+t)}return s.slice(0,-t.length)}function k(e,r){"string"==typeof r&&(r=new RegExp(r)),D._formats[e]=r}function q(e){if(D._schemas[e]||D._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}if(!(this instanceof s))return new s(r);var D=this;r=this._opts=d.copy(r)||{},this._schemas={},this._refs={},this._fragments={},this._formats=h(r.format),this._cache=r.cache||new n,this._loadingSchemas={},this._compilations=[],this.RULES=u(),this.validate=t,this.compile=v,this.addSchema=E,this.addMetaSchema=b,this.validateSchema=w,this.getSchema=S,this.removeSchema=_,this.addFormat=k,this.errorsText=A,this._addSchema=R,this._compile=I,r.loopRequired=r.loopRequired||1/0,(r.async||r.transpile)&&p.setup(r),!0===r.beautify&&(r.beautify={indent_size:2}),"property"==r.errorDataPath&&(r._errorDataPathProperty=!0),this._metaOpts=function(){for(var e=d.copy(D._opts),r=0;r<P.length;r++)delete e[P[r]];return e}(),r.formats&&function(){for(var e in D._opts.formats)k(e,D._opts.formats[e])}(),function(){!1!==D._opts.meta&&(b(e("./refs/json-schema-draft-04.json"),y,!0),D._refs["http://json-schema.org/schema"]=y)}(),r.v5&&f.enable(this),"object"==typeof r.meta&&b(r.meta),function(){var e=D._opts.schemas;if(e)if(Array.isArray(e))E(e);else for(var r in e)E(e[r],r)}()}var o=e("./compile"),i=e("./compile/resolve"),n=e("./cache"),l=e("./compile/schema_obj"),c=e("json-stable-stringify"),h=e("./compile/formats"),u=e("./compile/rules"),f=e("./v5"),d=e("./compile/util"),p=e("./async"),m=e("co");r.exports=s,s.prototype.compileAsync=p.compile;var v=e("./keyword");s.prototype.addKeyword=v.add,s.prototype.getKeyword=v.get,s.prototype.removeKeyword=v.remove,s.ValidationError=e("./compile/validation_error");var y="http://json-schema.org/draft-04/schema",g=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,P=["removeAdditional","useDefaults","coerceTypes"]},{"./async":1,"./cache":2,"./compile":6,"./compile/formats":5,"./compile/resolve":7,"./compile/rules":8,"./compile/schema_obj":9,"./compile/util":11,"./compile/validation_error":12,"./keyword":37,"./refs/json-schema-draft-04.json":38,"./v5":40,co:41,"json-stable-stringify":42}]},{},[])("ajv")});
-//# sourceMappingURL=ajv.min.js.map \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js.map b/node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js.map
deleted file mode 100644
index 69073a99d..000000000
--- a/node_modules/node-gyp/node_modules/ajv/dist/ajv.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["/Users/evgenypoberezkin/JSON/ajv-v4/dist/ajv.bundle.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","Ajv","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","setupAsync","opts","required","check","async","transpile","get","TRANSPILE","_transpileFunc","ASYNC","MODES","_opts","util","copy","checkGenerators","Function","checkAsyncFunction","getRegenerator","regenerator","runtime","regeneratorTranspile","compile","getNodent","nodent","log","dontInstallRequireHook","console","warn","nodentTranspile","promises","sourcemap","compileAsync","schema","callback","_compileAsync","firstCall","deferCallback","err","validate","setTimeout","missingSchema","schemaLoaded","sch","_refs","ref","_schemas","addSchema","missingRef","_callbacks","_loadingSchemas","loadSchema","schemaObj","_addSchema","setup","*","co*","es7","./compile/util","2","Cache","_cache","prototype","put","key","value","del","clear","3","$ref","allOf","anyOf","dependencies","enum","format","items","maximum","minimum","maxItems","minItems","maxLength","minLength","maxProperties","minProperties","multipleOf","not","oneOf","pattern","properties","uniqueItems","../dotjs/_limit","../dotjs/_limitItems","../dotjs/_limitLength","../dotjs/_limitProperties","../dotjs/allOf","../dotjs/anyOf","../dotjs/dependencies","../dotjs/enum","../dotjs/format","../dotjs/items","../dotjs/multipleOf","../dotjs/not","../dotjs/oneOf","../dotjs/pattern","../dotjs/properties","../dotjs/ref","../dotjs/required","../dotjs/uniqueItems","../dotjs/validate","4","equal","b","arrA","Array","isArray","arrB","keys","Object","dateA","Date","dateB","getTime","regexpA","RegExp","regexpB","toString","hasOwnProperty","5","formats","mode","formatDefs","fName","compare","date","str","matches","match","DATE","month","day","DAYS","time","full","TIME","hour","minute","second","timeZone","date_time","dateTime","split","DATE_TIME_SEPARATOR","hostname","HOSTNAME","test","uri","NOT_URI_FRAGMENT","URI","regex","compareDate","d1","d2","compareTime","t1","t2","compareDateTime","dt1","dt2","res","undefined","UUID","JSON_POINTER","fast","date-time","email","ipv4","ipv6","uuid","json-pointer","relative-json-pointer","./util","6","loadBeautify","beautify","js_beautify","root","localRefs","baseId","callValidate","compilation","result","apply","arguments","errors","localCompile","_schema","_root","isRoot","$async","sourceCode","validateGenerator","isTop","schemaPath","errSchemaPath","errorPath","RULES","resolve","resolveRef","usePattern","useDefault","useCustomRule","vars","refVal","refValCode","patterns","patternCode","defaults","defaultCode","customRules","customRuleCode","error","validateCode","co","ucs2length","ValidationError","refs","keepSourceCode","source","url","_refVal","refCode","refIndex","resolvedRef","rootRefId","addLocalRef","v","localSchema","inlineRef","inlineRefs","replaceLocalRef","refId","inline","regexStr","index","patternsHash","toQuotedString","valueStr","stableStringify","defaultsHash","rule","parentSchema","it","validateSchema","definition","message","errorsText","macro","keyword","c","checkCompiling","_compilations","compiling","_formats","cv","endCompiling","compIndex","splice","arr","statement","../async","./equal","./resolve","./validation_error","json-stable-stringify","7","SchemaObject","_compile","resolveSchema","p","parse","refPath","_getFullPath","getFullPath","id","normalizeId","resolveRecursive","getJsonPointer","parsedRef","resolveUrl","hash","slice","parts","part","unescapeFragment","PREVENT_SCOPE_CHANGE","limit","checkNoRef","countKeys","item","count","Infinity","SIMPLE_INLINED","normalize","protocolSeparator","protocol","href","host","path","replace","TRAILING_SLASH_HASH","resolveIds","_resolveIds","fullPath","escapeFragment","ids","toHash","./schema_obj","8","ruleModules","type","rules","ALL","KEYWORDS","TYPES","all","forEach","group","map","push","keywords","concat","types","custom","./_rules","9","obj","10","len","pos","charCodeAt","11","to","checkDataType","dataType","data","negate","EQUAL","AND","OK","NOT","checkDataTypes","dataTypes","array","object","null","number","integer","coerceToTypes","optionCoerceTypes","COERCE_TO_TYPES","getProperty","IDENTIFIER","escapeQuotes","SINGLE_QUOTE","varOccurences","dataVar","varReplace","expr","cleanUpCode","out","EMPTY_ELSE","EMPTY_IF_NO_ELSE","EMPTY_IF_WITH_ELSE","cleanUpVarErrors","ERRORS_REGEXP","REMOVE_ERRORS_ASYNC","RETURN_ASYNC","RETURN_TRUE_ASYNC","REMOVE_ERRORS","RETURN_VALID","RETURN_TRUE","schemaHasRules","schemaHasRulesExcept","exceptKeyword","getPathExpr","currentPath","jsonPointers","isNumber","joinPaths","getPath","prop","escapeJsonPointer","getData","$data","lvl","paths","up","jsonPointer","RELATIVE_JSON_POINTER","segments","segment","unescapeJsonPointer","decodeURIComponent","encodeURIComponent","./ucs2length","12","ajv","validation","create","constructor","13","$keyword","$errorKeyword","$lvl","level","$dataLvl","dataLevel","$schema","$schemaPath","$errSchemaPath","$breakOnError","allErrors","$valid","$schemaFormat","$isDataFormat","v5","$closingBraces","$schemaValueFormat","dataPathArr","$format","$compare","$schemaValue","$isMax","$exclusiveKeyword","$schemaExcl","$isDataExcl","$op","$result","$isData","$schemaValueExcl","$exclusive","$opExpr","$opStr","$$outStack","createErrors","messages","verbose","__err","pop","compositeRule","14","$notOp","15","16","unicode","17","18","$it","$nextValid","$currentBaseId","$allSchemasEmpty","arr1","$sch","$i","l1","19","$errs","every","$wasComposite","20","21","$compile","$inline","$macro","$ruleValidate","$validateCode","$rule","$definition","$rDef","$validateSchema","$ruleErrs","$ruleErr","$asyncKeyword","statements","$code","passContext","$parentData","$parentDataProperty","def_callRuleValidate","modifying","valid","def_customError","22","$schemaDeps","$propertyDeps","$property","$deps","$currentErrorPath","_$property","$prop","$propertyPath","$missingProperty","_errorDataPathProperty","join","arr2","$reqProperty","i2","l2","23","$vSchema","24","$unknownFormats","unknownFormats","$allowUnknown","indexOf","$isObject","$formatRef","25","$idx","$dataNxt","$nextData","$additionalItems","additionalItems","$currErrSchemaPath","$passData","26","multipleOfPrecision","27","$allErrorsOption","28","29","$regexp","30","$key","$matched","$ownProperties","ownProperties","$pProperty","i1","$missingPattern","31","$schemaKeys","$pProperties","patternProperties","$pPropertyKeys","$aProperties","additionalProperties","$someProperties","$noAdditional","$additionalIsSchema","$removeAdditional","removeAdditional","$checkAdditional","$required","loopRequired","$requiredHash","$pgProperties","patternGroups","$pgPropertyKeys","$propertyKey","arr3","$pgProperty","l3","$additionalProperty","$useDefaults","useDefaults","arr4","i4","l4","$hasDefault","default","$useData","arr5","i5","l5","arr6","i6","l6","$pgSchema","$pgMin","$pgMax","$limit","$reason","$moreOrLess","32","$refCode","$refVal","$message","missingRefs","$error","__callValidate","33","$propertySch","$loopRequired","i3","34","$shouldContinue","$ifPassed","$caseIndex","if","then","continue","35","36","$shouldUseRule","$top","rootId","$es7","yieldAwait","$closingBraces1","$closingBraces2","$typeSchema","$typeIsArray","coerceTypes","$coerceToTypes","$method","$dataType","$coerced","$bracesCoercion","$type","$refKeywords","extendRefs","$rulesGroup","JSON","stringify","$typeChecked","37","addKeyword","_addRule","ruleGroup","rg","metaSchema","getKeyword","removeKeyword","j","add","remove","./dotjs/custom","38","description","definitions","schemaArray","positiveInteger","positiveIntegerDefault0","simpleTypes","stringArray","title","exclusiveMinimum","exclusiveMaximum","39","formatMaximum","formatMinimum","formatExclusiveMaximum","formatExclusiveMinimum","constant","contains","switch","40","enableV5","_addKeyword","inlineFunc","inlineFunctions","_formatLimit","patternRequired","meta","addMetaSchema","META_SCHEMA_ID","containsMacro","enable","./dotjs/_formatLimit","./dotjs/constant","./dotjs/patternRequired","./dotjs/switch","./refs/json-schema-v5.json","41","gen","ctx","args","Promise","reject","onFulfilled","ret","next","onRejected","throw","done","toPromise","isPromise","TypeError","String","isGeneratorFunction","isGenerator","thunkToPromise","arrayToPromise","isObject","objectToPromise","fn","results","promise","name","displayName","val","wrap","createPromise","__generatorFunction__","42","json","cmp","space","cycles","replacer","node","seen","parent","indent","colonSeparator","toJSON","objectKeys","sort","keyValue","","x","has","jsonify","43","./lib/parse","./lib/stringify","44","at","ch","text","escapee","\"","\\","/","m","charAt","string","isFinite","hex","uffff","parseInt","fromCharCode","white","word","reviver","walk","holder","k","45","quote","escapable","lastIndex","partial","mind","gap","rep","\b","\t","\n","\f","\r","46","RangeError","mapDomain","regexSeparators","ucs2decode","extra","output","counter","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","floor","damp","baseMinusTMin","tMax","skew","decode","input","basic","oldi","w","baseMinusT","inputLength","initialN","bias","initialBias","lastIndexOf","delimiter","maxInt","tMin","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","toLowerCase","toASCII","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","punycode","overflow","not-basic","invalid-input","Math","version","ucs2","47","qs","sep","eq","options","maxKeys","kstr","vstr","idx","substr","xs","48","stringifyPrimitive","ks","49","./decode","./encode","50","Url","slashes","auth","port","search","query","pathname","urlParse","parseQueryString","slashesDenoteHost","urlFormat","isString","urlResolve","relative","urlResolveObject","resolveObject","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","rest","trim","simplePath","exec","proto","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","unshift","ae","esc","escape","qm","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","isAbsolute","51","arg","SCHEMA_URI_FORMAT_FUNC","SCHEMA_URI_FORMAT","schemaKeyRef","getSchema","_meta","_skipValidation","checkUnique","skipValidation","throwOrLogError","defaultMeta","currentUriFormat","keyRef","_getSchemaObj","_getSchemaFragment","compileSchema","_fragments","fragment","removeSchema","_removeAllSchemas","jsonStr","schemas","shouldAddSchema","cached","addUsedSchema","recursiveMeta","willValidate","_validate","currentOpts","_metaOpts","separator","dataPath","addFormat","cache","indent_size","errorDataPath","metaOpts","META_IGNORE_OPTIONS","optsSchemas","customKeyword","./async","./cache","./compile","./compile/formats","./compile/resolve","./compile/rules","./compile/schema_obj","./compile/validation_error","./keyword","./refs/json-schema-draft-04.json","./v5"],"mappings":"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","file":"ajv.min.js"} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/ajv/dist/nodent.min.js b/node_modules/node-gyp/node_modules/ajv/dist/nodent.min.js
deleted file mode 100644
index c54c5f55b..000000000
--- a/node_modules/node-gyp/node_modules/ajv/dist/nodent.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* nodent 3.0.17: NoDent - Asynchronous Javascript language extensions */
-require=function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!a&&u)return u(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return i(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){t.exports=function(t){switch(parseInt(t.version)){case 2:case 3:t.plugins.asyncawait=e("./acorn-v3");break;case 4:case 5:t.plugins.asyncawait=e("./acorn-v4");break;default:throw new Error("acorn-es7-plugin requires Acorn v2, 3, 4 or 5")}return t}},{"./acorn-v3":2,"./acorn-v4":3}],2:[function(e,t,n){function r(e,t){return e.lineStart>=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(p,"$1 $3")),e.test(r)}function s(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}function o(e,t){var n=function(){};e.extend("initialContext",function(r){return function(){return this.options.ecmaVersion<7&&(n=function(t){e.raise(t.start,"async/await keywords only available when ecmaVersion>=7")}),this.reservedWords=new RegExp(this.reservedWords.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrict=new RegExp(this.reservedWordsStrict.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrictBind=new RegExp(this.reservedWordsStrictBind.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.inAsyncFunction=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),r.apply(this,arguments)}}),e.extend("shouldParseExportStatement",function(e){return function(){return!("name"!==this.type.label||"async"!==this.value||!i(c,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(c,this,!0)){var a=this.inAsyncFunction;try{this.inAsyncFunction=!0,this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=a}}else if("object"==typeof t&&t.asyncExits&&i(u,this)){this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.inAsyncFunction&&"await"===n.name&&0===arguments.length&&this.raise(n.start,"'await' is reserved within async functions"),n}}),e.extend("parseExprAtom",function(e){return function(i){var o,u=this.start,c=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return o=this.parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),n(h),h;if(this.input.slice(p.end).match(l))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,o=s(this,u-4).parseExprSubscripts(),o.end<=u))return o=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:a}}};if(o=s(this,this.start,m,!0).parseExpression(),"SequenceExpression"===o.type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),"FunctionExpression"===o.type||"FunctionDeclaration"===o.type||"ArrowFunctionExpression"===o.type)return o=s(this,this.start,m).parseExpression(),"SequenceExpression"===o.type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),o.async=!0,o.start=u,o.loc&&(o.loc.start=c),o.range&&(o.range[0]=u),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(o),o}catch(e){if(e!==a)throw e}finally{this.inAsyncFunction=f}}return p}}),e.extend("finishNodeAt",function(e){return function(t,n,r,i){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("finishNode",function(e){return function(t,n){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}});e.extend("parsePropertyName",function(e){return function(t){var i=(t.key&&t.key.name,e.apply(this,arguments));return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(l)||(h.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set <member>(value)' cannot be be async"),i=e.apply(this,arguments),"Identifier"===i.type&&"set"===i.name&&this.raise(i.start,"'set <member>(value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}var a={},u=/^async[\t ]+(return|throw)/,c=/^async[\t ]+function/,l=/^\s*[():;]/,p=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,h=/\s*(get|set)\s*\(/;t.exports=o},{}],3:[function(e,t,n){function r(e,t){return e.lineStart>=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(c,"$1 $3")),e.test(r)}function s(e,t,n){var r=new e.constructor(e.options,e.input,t);if(n)for(var i in n)r[i]=n[i];var s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}function o(e,t){t&&"object"==typeof t||(t={}),e.extend("parse",function(n){return function(){return this.inAsync=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),n.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label&&t.asyncExits&&i(a,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=o),u.range&&(u.range[0]=s),u}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(n){return"module"===this.options.sourceType&&this.options.ecmaVersion>=8&&t.awaitAnywhere?e.call(this,!0):e.apply(this,arguments)}}),e.extend("parseExprAtom",function(e){var n={};return function(r){var i,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if(i=s(this,o-4,c).parseExprSubscripts(),i.end<=o)return i=s(this,o,c).parseExprSubscripts(),u.argument=i,u=this.finishNodeAt(u,"AwaitExpression",i.end,i.loc&&i.loc.end),this.pos=i.end,this.end=i.end,this.endLoc=i.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var i=t.key&&t.key.name,s=e.apply(this,arguments);"get"===this.value&&(t.__maybeStaticAsyncGetter=!0);return n[this.value]?s:("Identifier"!==s.type||"async"!==s.name&&"async"!==i||r(this,s.end)||this.input.slice(s.end).match(u)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===s.name?this.raise(s.start,"'set <member>(value)' cannot be be async"):(this.__isAsyncProp=!0,s=e.apply(this,arguments),"Identifier"===s.type&&"set"===s.name&&this.raise(s.start,"'set <member>(value)' cannot be be async")),s)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}var a=/^async[\t ]+(return|throw)/,u=/^\s*[):;]/,c=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=o},{}],4:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function s(e){var t,n,i,s,o,a,u=e.length;o=r(e),a=new p(3*u/4-o),i=o>0?u-4:u;var c=0;for(t=0,n=0;t<i;t+=4,n+=3)s=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],a[c++]=s>>16&255,a[c++]=s>>8&255,a[c++]=255&s;return 2===o?(s=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[c++]=255&s):1===o&&(s=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[c++]=s>>8&255,a[c++]=255&s),a}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function a(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(o(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,i="",s=[],o=0,u=n-r;o<u;o+=16383)s.push(a(e,o,o+16383>u?u:o+16383));return 1===r?(t=e[n-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),s.push(i),s.join("")}n.byteLength=i,n.toByteArray=s,n.fromByteArray=u;for(var c=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f<d;++f)c[f]=h[f],l[h.charCodeAt(f)]=f;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],5:[function(e,t,n){},{}],6:[function(e,t,n){"use strict";function r(e){if(e>H)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,n):"string"==typeof e?c(e,t):h(e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function a(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}function u(e){return o(e),r(e<0?0:0|f(e))}function c(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,t),s=r(n),o=s.write(e,t);return o!==n&&(s=s.slice(0,o)),s}function l(e){for(var t=e.length<0?0:0|f(e.length),n=r(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),r.__proto__=i.prototype,r}function h(e){if(i.isBuffer(e)){var t=0|f(e.length),n=r(t);return 0===n.length?n:(e.copy(n,0,0,t),n)}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||G(e.length)?r(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(e){if(e>=H)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function y(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;c<a;c++)if(s(e,c)===s(t,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*o}else-1!==l&&(c-=c-l),l=-1}else for(n+u>a&&(n=a-u),c=n;c>=0;c--){for(var p=!0,h=0;h<u;h++)if(s(e,c+h)!==s(t,h)){p=!1;break}if(p)return c}return-1}function x(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if(G(a))return o;e[n+o]=a}return o}function w(e,t,n,r){return W(V(t,e.length-n),e,n,r)}function E(e,t,n,r){return W(q(t),e,n,r)}function S(e,t,n,r){return E(e,t,n,r)}function k(e,t,n,r){return W(z(t),e,n,r)}function A(e,t,n,r){return W(U(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s=e[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,c,l,p;switch(a){case 1:s<128&&(o=s);break;case 2:u=e[i+1],128==(192&u)&&(p=(31&s)<<6|63&u)>127&&(o=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&s)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return L(r)}function L(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Z));return n}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function T(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=D(e[s]);return i}function F(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function $(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Y.write(e,t,n,r,52,8),n+8}function j(e){if(e=M(e).replace(Q,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function M(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function U(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}function z(e){return J.toByteArray(j(e))}function W(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e){return e!==e}var J=e("base64-js"),Y=e("ieee754");n.Buffer=i,n.SlowBuffer=d,n.INSPECT_MAX_BYTES=50;var H=2147483647;n.kMaxLength=H,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return a(e,t,n)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s<o;++s)if(e[s]!==t[s]){n=e[s],r=t[s];break}return n<r?-1:r<n?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var o=e[n];if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,s),s+=o.length}return r},i.byteLength=y,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):m.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,n,r,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){o=c[p],a=l[p];break}return o<a?-1:a<o?1:0},i.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},i.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},i.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=i.prototype,r},i.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},i.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||$(e,4,this.length),Y.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||$(e,4,this.length),Y.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||$(e,8,this.length),Y.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||$(e,8,this.length),Y.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},i.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},i.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=i.isBuffer(e)?e:new i(e,r),u=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%u]}return this};var Q=/[^+\/0-9A-Za-z-_]/g},{"base64-js":4,ieee754:7}],7:[function(e,t,n){n.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+p],p+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,p=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+p>=1?h/u:h*Math.pow(2,1-p),t*u>=2&&(o++,u/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*u-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+f]=255&o,f+=d,o/=256,c-=8);e[n+f-d]|=128*y}},{}],8:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var n=this;return new e(function(e,r){function i(t,n){var o;try{if(o=t.call(s,n),o.done){if(o.value!==e){if(o.value&&o.value===o.value.then)return o.value(e,r);e&&e(o.value),e=null}return}o.value.then?o.value.then(function(e){i(s.next,e)},function(e){i(s.throw,e)}):i(s.next,o.value)}catch(e){return r&&r(e),void(r=null)}}var s=n.call(t,e,r);i(s.next)})}}var i=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{
-if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":9,"./zousan":10}],9:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(e,t){this.resolve=e,this.reject=t}function s(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function o(e){this._resolver=e,this.then=s}return n.prototype={resolve:r,reject:r,then:i},o.resolve=function(e){return o.isThenable(e)?e:{then:function(t){return t(e)}}},o.isThenable=e,o}},{}],10:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n<i;n++)r(t.c[n],e)})}},reject:function(e){if(void 0===this.state){this.state=i,this.v=e;var t=this.c;t&&s(function(){for(var n=0,r=t.length;n<r;n++)i(t[n],e)})}},then:function(e,t){var r=new n,i={y:e,n:t,p:r};if(void 0===this.state)this.c?this.c.push(i):this.c=[i];else{var o=this.state,a=this.v;s(function(){o(i,a)})}return r}},n.resolve=function(e){if(e&&e instanceof n)return e;var t=new n;return t.resolve(e),t},n.reject=function(e){if(e&&e instanceof n)return e;var t=new n;return t.reject(e),t},n.version="2.3.3-nodent",n}}).call(this,e("_process"))},{_process:31}],11:[function(e,t,n){t.exports=function(e,t,n,r){var i=[[],[]],s=[/(.*)(<script[^>]*>)(.*)/i,/(.*)(<\/script>)(.*)/i],o=0,a=!0;t=t.split("\n");for(var u=0;u<t.length;){var c=s[o].exec(t[u]);c&&0==o&&c[2].match("src=")&&(c=null),c?(1==o?(i[o].push(c[1]),pr=e.compile(i[1].join("\n"),n,3,r.compiler).code,a&&r.runtime&&(a=!1,r.runtime&&i[0].push("Function.prototype.$asyncbind = "+e.$asyncbind.toString()+";\n")),i[0].push(pr),i[1]=[],o=0,i[o].push(c[2])):(i[o].push(c[1]),i[o].push(c[2]),o=1),t[u]=c[3]):i[o].push(t[u++])}return i[0].join("\n")}},{}],12:[function(e,t,n){(function(n){"use strict";function r(e){if(Array.isArray(e))return e.map(function(e){return r(e)});var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function i(e,t){e!==t&&(e.__proto__=Object.getPrototypeOf(t),Object.keys(e).forEach(function(t){t in g||delete e[t]}),Object.keys(t).forEach(function(n){n in e||(e[n]=t[n])}))}function s(){}function o(e){return e?(b.node=e,b):{}}function a(e,t,n){if(!e)return null;if(t&&"object"==typeof t){var r=Object.keys(t);return a(e,function(e){return r.every(function(n){return e[n]==t[n]})})}var i,s={};if(Array.isArray(e)){for(var u=0;u<e.length;u++)if(i=a(e[u],t))return i;return null}var c=n;"function"!=typeof n&&(c=n?function(e){return!0}:function(e){return!o(e).isScope});try{y.treeWalker(e,function(n,r,i){if(t(n))throw s.path=i,s;(n===e||c(n))&&r()})}catch(e){if(e===s)return s.path;throw e}return null}function u(e){return a(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden})}function c(e){return a(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden},function(e){var t=o(e);return!t.isBlockStatement&&!t.isScope})}function l(e){return a(e,{type:"ThisExpression"})}function p(e){if(null===e)return{type:"NullLiteral",value:null,raw:"null"};if(!0===e||!1===e)return{type:"BooleanLiteral",value:e,raw:JSON.stringify(e)};if(e instanceof RegExp){var t=e.toString(),n=t.split("/");return{type:"RegExpLiteral",value:e,raw:t,pattern:n[1],flags:n[2]}}return"number"==typeof e?{type:"NumericLiteral",value:e,raw:JSON.stringify(e)}:{type:"StringLiteral",value:e,raw:JSON.stringify(e)}}function h(e,t){return{type:"Identifier",name:e,loc:t}}function f(e){var t={};for(var n in e)t[n]="string"==typeof e[n]?h(e[n]):e[n];return t}function d(e,t,n,d){function m(e,t){if(n.es6target&&!e.id&&!t&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;if(n.noRuntime){if(t){if(o(t).isLiteral)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");e.body.body=y.part("try {$:0} catch($2) {return $1($2)}",[r(e.body),t,h("$boundEx")]).body}else if(n.es6target&&!e.id&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;return n.es6target&&!e.id?(e.type="ArrowFunctionExpression",e):y.part("$0.bind(this)",[e]).expr}return t?y.part("$0.$1(this,$2)",[e,me.asyncbind,t]).expr:y.part("$0.$1(this)",[e,me.asyncbind]).expr}function g(e,t,n,r){return y.part("var $0 = $1",[h(e),m({type:"FunctionExpression",id:null,generator:!1,expression:!1,params:n||[],body:Array.isArray(t)?{type:"BlockStatement",body:t}:t},r)]).body[0]}function v(t){return e.filename+(t&&t.loc&&t.loc.start?"("+t.loc.start.line+":"+t.loc.start.column+")\t":"\t")}function b(e){return n.babelTree?p(e):{type:"Literal",value:e,raw:JSON.stringify(e)}}function x(e){return e?!n.babelTree||"ClassMethod"!==e.type&&"ObjectMethod"!==e.type?(!n.babelTree&&"MethodDefinition"===e.type||"Property"===e.type&&(e.method||"get"==e.kind||"set"==e.kind))&&o(e.value).isFunction?e.value:null:e:null}function w(e,t){if(!o(e).isFunction)throw new Error("Can only replace 'arguments' in functions");return"$usesArguments"in e||(y.treeWalker(e,function(t,r,i){"Identifier"===t.type&&"arguments"===t.name?(i[0].parent.shorthand&&(i[0].parent.shorthand=!1,i[0].parent.key=h("arguments"),e.$usesArguments=!0),"key"!==i[0].field&&(t.name=n.$arguments,e.$usesArguments=!0)):t!==e&&o(t).isFunction?"ArrowFunctionExpression"===t.type&&(w(t),e.$usesArguments=e.$usesArguments||t.$usesArguments):r()}),e.$usesArguments=e.$usesArguments||!1),e.$usesArguments&&"ArrowFunctionExpression"!==e.type}function E(e){return"string"!=typeof e&&(e=e.type.replace(/Statement|Expression/g,"")),n.generatedSymbolPrefix+e+"_"+ye++}function S(e,t){return e&&(e.$exit=f({$error:t.$error,$return:t.$return})),e}function k(e){for(var t=0;t<e.length;t++){if(e[t].self.$exit)return e[t].self;if(e[t].parent&&e[t].parent.$exit)return e[t].parent}return null}function A(e,t){var n=k(e);if(n)return n.$exit;if(t)for(var r=0;r<t.length;r++)if(t[r])return f(t[r]);return null}function _(e,t){var r=!(n.promises||n.generators||n.engine)&&n.lazyThenables;ce(e),oe(e),M(e),Q(e),Z(e),(r?Y:s)(e),O(e),$(e),U(e,[q,r?s:J,R,I,B]),z(e,t),le(e),fe(e)}function C(e,t){var n={$continuation:!0,type:e?"FunctionDeclaration":"FunctionExpression",id:e?"string"==typeof e?h(e):e:void 0,params:[],body:{type:"BlockStatement",body:r(t)}};return e&&(de[e]={def:n}),n}function L(e){return{type:"AwaitExpression",argument:Q({type:"FunctionExpression",generator:!1,expression:!1,async:!0,params:[],body:{type:"BlockStatement",body:e}}).body.body[0].argument}}function P(e,t){"string"==typeof e&&(e=h(e));var n=y.part("$0.call($1)",[e,[{type:"ThisExpression"}].concat(t||[])]).expr;return e.$thisCall=n,n.$thisCallName=e.name,n}function N(e,t){return{type:"ReturnStatement",argument:P(e,t)}}function T(e,t){return{type:"CallExpression",callee:h(e.$seh+"Finally"),arguments:t?[t]:[]}}function F(e,t){if(Array.isArray(e))return e.map(function(e){return F(e,t)});var r=0,i=0;return y.treeWalker(e,function(e,t,s){if("ReturnStatement"!==e.type||e.$mapped){if("ThrowStatement"===e.type){var a=o(e).isAsync;if(r>0){if(!a)return t(e);delete e.async}return void(!a&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:A(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):o(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!o(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(o(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:A(s,[n]).$return,arguments:e.argument?[e.argument]:[]})},t)}function $(e,t){return Array.isArray(e)?e.map(function(e){return $(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(u(e.alternate)||u(e.consequent))){h(E("condOp"));i(e,L(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function O(e,t){return Array.isArray(e)?e.map(function(e){return O(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&u(e.right)){var r,s=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}i(e,L(y.part(r,[s,e.left,e.right]).body))}},t),e)}function B(e,t,n){if("SwitchCase"!==e.type&&o(e).isBlockStatement)for(var r=0;r<e.body.length;){var i=e.body[r];if("SwitchCase"!==i.type&&o(i).isBlockStatement){var s=he(i.body);if(s)if(c(i)){var a=E(i),u=e.body.splice(r+1,e.body.length-(r+1));if(u.length){var l=C(a,u);delete de[a],i.body.push(N(a)),e.body.push(l),r++}else r++}else r++;else e.body.splice.apply(e.body,[r,1].concat(i.body))}else r++}}function R(e,t,n){if("IfStatement"===e.type&&u([e.consequent,e.alternate])){var s=E(e),a=t[0],c={type:"BlockStatement",body:[e]};if("index"in a){var l=a.index,p=a.parent[a.field].splice(l+1,a.parent[a.field].length-(l+1));if(a.replace(c),p.length){var h=N(s);c.body.push(n(C(s,p))),[e.consequent,e.alternate].forEach(function(e){if(e){var t;t=o(e).isBlockStatement?e.body[e.body.length-1]:e,t&&"ReturnStatement"===t.type||("BlockStatement"!==e.type&&i(e,{type:"BlockStatement",body:[r(e)]}),e.$deferred=!0,e.body.push(r(h))),n(e)}}),e.consequent&&e.alternate&&e.consequent.$deferred&&e.alternate.$deferred||c.body.push(r(h))}}else a.parent[a.field]=c}}function I(e,t,n){if(!e.$switched&&"SwitchStatement"===e.type&&u(e.cases)){e.$switched=!0;var i,s,o,a=t[0];if("index"in a){var c=a.index+1;o=a.parent[a.field].splice(c,a.parent[a.field].length-c),o.length&&"BreakStatement"===o[o.length-1].type&&a.parent[a.field].push(o.pop()),i=E(e),s=N(i),a.parent[a.field].unshift(C(i,o)),a.parent[a.field].push(r(s))}return e.cases.forEach(function(e,t){if("SwitchCase"!==e.type)throw new Error("switch contains non-case/default statement: "+e.type);if(u(e.consequent)){var n=e.consequent[e.consequent.length-1];"BreakStatement"===n.type?e.consequent[e.consequent.length-1]=r(s):"ReturnStatement"===n.type||"ThrowStatement"===n.type||(d(v(e)+"switch-case fall-through not supported - added break. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"),e.consequent.push(r(s)))}}),!0}}function j(e){return"ReturnStatement"===e.type||"ThrowStatement"===e.type}function M(t,r){return y.treeWalker(t,function(t,i,s){if("TryStatement"===t.type&&!t.$seh&&(o(s[0].parent).isBlockStatement||(s[0].parent[s[0].field]={type:"BlockStatement",body:[t]}),t.$seh=E("Try")+"_",t.$containedAwait=!!u(t),t.$finallyExit=t.finalizer&&V(s)&&!!a(t.finalizer.body,j),t.$containedAwait||t.$finallyExit)){t.$needsMapping=!r||!t.$finallyExit;var c=A(s,[n]);if(t.finalizer&&!t.handler){var l=h(E("exception"));t.handler={type:"CatchClause",param:l,body:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:l}]}}}if(!t.handler&&!t.finalizer){var p=new SyntaxError(v(t.value)+"try requires catch and/or finally clause",e.filename,t.start);throw p.pos=t.start,p.loc=t.loc.start,p}t.finalizer?(S(t.block,{$error:t.$seh+"Catch",$return:T(t,c.$return)}),S(t.handler,{$error:T(t,c.$error),$return:T(t,c.$return)})):S(t.block,{$error:t.$seh+"Catch",$return:c.$return})}i()}),t}function D(e,t){for(var n=0;n<e.length;n++)if(!o(e[n]).isDirective)return void e.splice.apply(e,[n,0].concat(t));e.splice.apply(e,[e.length,0].concat(t))}function V(e){for(var t=0;t<e.length;t++)if(o(e[t].self).isFunction)return e[t].self.async||e[t].self.$wasAsync;return!1}function q(t,i,s){if(t.$needsMapping){var o,a,u,c=i[0];if(!("index"in c))throw new Error(e.filename+" - malformed try/catch blocks");var l=c.index+1,p=c.parent[c.field].splice(l,c.parent[c.field].length-l);if(p.length){a=t.$seh+"Post";var f=s(g(a,p,[],A(i,[n]).$error));c.parent[c.field].splice(c.index,0,f),o=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0]}else t.finalizer&&(o=N(T(t)));t.$mapped=!0,o&&(t.block.body.push(r(o)),t.handler.body.body.push(r(o)));var d=A(i,[n]);if(t.handler){var v=h(t.$seh+"Catch");u=r(t.handler.body);var b=g(v.name,u,[r(t.handler.param)],t.finalizer?T(t,d.$error):d.$error);t.handler.body.body=[{type:"CallExpression",callee:v,arguments:[r(t.handler.param)]}],c.parent[c.field].splice(c.index,0,b)}if(t.finalizer){var x={exit:h(t.$seh+"Exit"),value:h(t.$seh+"Value"),body:r(t.finalizer.body)},w=y.part("(function ($value) { {$:body} return $exit && ($exit.call(this, $value)); })",x).expr,E={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:h(t.$seh+"Finally"),init:m({type:"FunctionExpression",params:[x.exit],id:null,body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:m(w,d.$error)}]}})}]};D(c.parent[c.field],[E]);var S=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0];u.body[u.length-1]=S,t.block.body[t.block.body.length-1]=S,delete t.finalizer}}}function U(e,t,n){function r(e,n){return y.treeWalker(e,function(e,n,s){function o(e){return r(e,s)}i.indexOf(e)<0&&(i.push(e),t.forEach(function(t){t(e,s,o)})),n()},n)}var i=[];return r(e,n),e}function z(e,t,s){return y.treeWalker(e,function(e,a,c){if("IfStatement"==e.type&&("BlockStatement"!=e.consequent.type&&u(e.consequent)&&(e.consequent={type:"BlockStatement",body:[e.consequent]}),e.alternate&&"BlockStatement"!=e.alternate.type&&u(e.alternate)&&(e.alternate={type:"BlockStatement",body:[e.alternate]})),a(),o(e).isAwait){var l=e.loc;if(!(t=t||c.some(function(e){return e.self&&e.self.$wasAsync}))||"warn"===t){var p=v(e)+"'await' used inside non-async function. ";n.promises?p+="'return' value Promise runtime-specific":p+="'return' value from await is synchronous",d(p+". See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification")}var f=c[0].parent;"LogicalExpression"===f.type&&f.right===e&&d(v(e.argument)+"'"+printNode(f)+"' on right of "+f.operator+" will always evaluate '"+printNode(e.argument)+"'"),"ConditionalExpression"===f.type&&f.test!==e&&d(v(e.argument)+"'"+printNode(f)+"' will always evaluate '"+printNode(e.argument)+"'");var y=h(E("await")),g=r(e.argument);i(e,y);for(var b,x,w=1;w<c.length;w++)if(x=o(c[w].self).isBlockStatement){b=c[w-1];break}if(!b)throw new Error(v(e)+"Illegal await not contained in a statement");var S,k,_=A(c,[s,n]),C=b.index,L=x.splice(C,x.length-C).slice(1);"ReturnStatement"===b.self.type&&"CallExpression"===b.self.argument.type&&1===b.self.argument.arguments.length&&b.self.argument.arguments[0].name===y.name?k=S=b.self.argument.callee:"Identifier"===b.self.type||b.self.name===y.name||"ExpressionStatement"===b.self.type&&"Identifier"===b.self.expression.type&&b.self.expression.name===y.name?S=L.length?{type:"FunctionExpression",params:[r(y)],body:z({type:"BlockStatement",body:r(L)},t,_)}:{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}:(L.unshift(b.self),S={type:"FunctionExpression",params:[r(y)],body:z({type:"BlockStatement",body:r(L)},t,_)}),k||(k=S?m(S,_.$error):{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}),n.wrapAwait&&(g={type:"CallExpression",arguments:[g],callee:n.promises||n.generators?{type:"MemberExpression",object:h("Promise"),property:h("resolve")}:{type:"MemberExpression",object:h("Object"),property:h("$makeThenable")}});var P={type:"CallExpression",callee:{type:"MemberExpression",object:g,property:h("then",l),computed:!1},arguments:[k,_.$error]};x.push({loc:l,type:"ReturnStatement",argument:P})}return!0}),e}function W(e,t){var n=e.$label;delete e.$label;var r=h(E("idx")),s=h(E("in")),a=y.part("var $0,$1 = [];for ($0 in $2) $1.push($0)",[r,s,e.right]).body,u=y.part("for ($0; $1.length;){ $2 = $1.shift(); $:3 ; }",[e.left,s,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left,e.body]).body[0];u.$label=n;for(var c=0;c<t.length;c++)if(o(t[c].parent).isBlockStatement){t[c].parent[t[c].field].splice(t[c].index,0,a[0],a[1]);break}i(e,u)}function G(e,t){"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[e.body]});var n,r,i=y.part("[$0[Symbol.iterator]()]",[e.right]).expr;if("VariableDeclaration"===e.left.type){"const"===e.left.kind&&(e.left.kind="let"),n=e.left.declarations[0].id;var s=ie(e.left.declarations[0].id);r=h(E("iterator_"+s.join("_"))),e.left.declarations=s.map(function(e){return{type:"VariableDeclarator",id:h(e)}}),e.left.declarations.push({type:"VariableDeclarator",id:r,init:i}),e.init=e.left}else{n=e.left,r=h(E("iterator_"+n.name));var o={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:r,init:i}]};e.init=o}e.type="ForStatement",e.test=y.part("!($0[1] = $0[0].next()).done && (($1 = $0[1].value) || true)",[r,n]).expr,delete e.left,delete e.right}function J(e,t,r){function i(e){return"AwaitExpression"===e.type&&!e.$hidden||c&&("BreakStatement"===e.type||"ContinueStatement"===e.type)&&e.label}var s=e.$depth;"ForInStatement"===e.type&&u(e)?W(e,t):"ForOfStatement"===e.type&&u(e)&&G(e,t);var c=t.some(function(e){return"$label"in e.self&&"ForStatement"===e.self.type&&e.self.$mapped});if(!e.$mapped&&o(e).isLoop&&a(e,i)){t[0].self.$mapped=!0;var l=[],p=e.init,f=e.test||b(!0),d=e.update,m=e.body;d&&(d={type:"ExpressionStatement",expression:d}),p&&(o(p).isStatement||(p={type:"ExpressionStatement",expression:p}),l.push(p));var g,v;e.$label?(v=e.$label.name,g=t[1]):(v=ye++,g=t[0]),v=n.generatedSymbolPrefix+"Loop_"+v;var x,w,E=h(v+"_trampoline"),S=h(v),k=d?h(v+"_step"):S,_=h(v+"_exit");h("q"),h("$exception");if("index"in g){var L=g.index;w=g.parent[g.field].splice(L+1,g.parent[g.field].length-(L+1))}else w=[];x=C(_,w);var P={type:"ReturnStatement",argument:S},N={type:"ReturnStatement",argument:k},T={type:"ReturnStatement",argument:{type:"ArrayExpression",elements:[b(1)]}};y.treeWalker(m,function(e,t,n){if(o(e).isFunction||o(e).isLoop)return!0;if("BreakStatement"===e.type||"ContinueStatement"===e.type)if(e.label)for(var r=(n.filter(function(e){return"$label"in e.self}).map(function(e,t){return e.self.$label&&e.self.$label.name})),i=[],s=0;s<r.length;s++){if(r[s]===e.label.name){"BreakStatement"===e.type&&i.push(b(1)),n[0].replace({type:"ReturnStatement",argument:{type:"ArrayExpression",elements:i.reverse()}});break}i.push(b(0))}else"BreakStatement"===e.type?n[0].replace(T):n[0].replace(N);else t()},t),m="BlockStatement"===m.type?m.body.slice(0):[m],m="DoWhileStatement"===e.type?m.concat({type:"IfStatement",test:{type:"UnaryExpression",argument:f,prefix:!0,operator:"!"},consequent:T,alternate:N}):[{type:"IfStatement",test:f,consequent:{type:"BlockStatement",body:m.concat(N)},alternate:T}],n.noRuntime&&l.push({type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:E}],kind:"var"});var F,$=A(t,[n]).$error;F=n.noRuntime?y.part(n.es6target?"($idTrampoline = ((q) => { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:E,exit:$,idIter:S,idContinuation:_,idStep:k}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[me.asyncbind,_,k,$,S,b(1===s)]).expr,l.push({type:"ReturnStatement",argument:F}),l.push({$label:e.$label,type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:m}}),d&&l.push({type:"FunctionDeclaration",id:k,params:[],body:{type:"BlockStatement",body:[d,P]}}),!p||"VariableDeclaration"!==p.type||"let"!==p.kind&&"const"!==p.kind?(l.push(x),t[0].replace(l.map(r))):("const"===p.kind&&(p.kind="let"),t[0].replace([{type:"BlockStatement",body:l.map(r)},r(x)]))}}function Y(e,t){return y.treeWalker(e,function(e,t,s){function a(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:P(e||S)}}}function c(e,t){if("BreakStatement"===e.type)i(e,r(A(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_exit")));else if("ContinueStatement"===e.type)i(e,r(a(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_next")));else if(o(e).isFunction)return!0;t()}"ForInStatement"===e.type&&u(e)?W(e,s):"ForOfStatement"===e.type&&u(e)&&G(e,s),t();var p;if(o(e).isLoop&&u(e)){var f=e.init,d=e.test||b(!0),g=e.update,v=e.body,x=l(v);f&&(o(f).isStatement||(f={type:"ExpressionStatement",expression:f})),g=g&&{type:"ExpressionStatement",expression:g},v=o(v).isBlockStatement?r(v).body:[r(v)];var w=e.$label&&e.$label.name;w="Loop_"+(w||ye++);var E=n.generatedSymbolPrefix+(w+"_exit"),S=n.generatedSymbolPrefix+(w+"_next"),k=h(n.generatedSymbolPrefix+w),A=function(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"CallExpression",callee:h(e||E),arguments:[]}}}},_=C(S,[{type:"ReturnStatement",argument:{type:"CallExpression",callee:x?m(k):k,arguments:[h(E),me.error]}}]);g&&_.body.body.unshift(g);for(var L=0;L<v.length;L++)y.treeWalker(v[L],c);v.push(r(a()));var N={type:"FunctionExpression",id:k,params:[h(E),me.error],body:{type:"BlockStatement",body:[_]}};if("DoWhileStatement"===e.type)_.body.body=[{type:"IfStatement",test:r(d),consequent:{type:"BlockStatement",body:r(_.body.body)},alternate:{type:"ReturnStatement",argument:{type:"CallExpression",callee:h(E),arguments:[]}}}],N.body.body=[_].concat(v);else{var T={type:"IfStatement",test:r(d),consequent:{type:"BlockStatement",body:v},alternate:r(A())};N.body.body.push(T)}var F={type:"ExpressionStatement",expression:{type:"AwaitExpression",argument:m(N,b(0))}};for(!f||"VariableDeclaration"!==f.type||"let"!==f.kind&&"const"!==f.kind||("const"===f.kind&&(f.kind="let"),F={type:"BlockStatement",body:[r(f),F]},f=null),p=0;p<s.length;p++){var $=s[p];if("index"in $)return f?$.parent[$.field].splice($.index,1,r(f),F):$.parent[$.field][$.index]=F,!0}}return!0},t),e}function H(e){if(!o(e).isFunction)throw new Error("Cannot examine non-Function node types for async exits");return a(e.body,function(e){return"Identifier"===e.type&&(e.name===n.$return||e.name===n.$error)||j(e)&&o(e).isAsync},function(e){return!(o(e).isFunction&&(e.$wasAsync||o(e).isAsync))})}function Z(t){return y.treeWalker(t,function(t,r,i){var s=x(t);if(r(),s&&o(s).isAsync){if("set"==t.kind){var a=new SyntaxError(v(s)+"method 'async set' cannot be invoked",e.filename,t.start);throw a.pos=t.start,a.loc=t.loc.start,a}s.async=!1;var u=w(s);H(s)||0!==s.body.body.length&&"ReturnStatement"===s.body.body[s.body.body.length-1].type||s.body.body.push({type:"ReturnStatement"});var c=m(S({type:"FunctionExpression",params:[me.return,me.error],body:Z(F(s.body,i)),$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0));n.promises?s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"NewExpression",callee:h("Promise"),arguments:[c]}}]}:s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:c}]},u&&D(s.body.body,[ge])}})}function Q(e){return y.treeWalker(e,function(e,t,r){if(t(),o(e).isAsync&&o(e).isFunction){var i;(i=x(r[0].parent))&&o(i).isAsync&&"get"===r[0].parent.kind&&ee(r[0].parent.key),delete e.async;var s,a=w(e);return o(e.body).isBlockStatement?(H(e)||0!==e.body.body.length&&"ReturnStatement"===e.body.body[e.body.body.length-1].type||e.body.body.push({type:"ReturnStatement"}),s={type:"BlockStatement",body:e.body.body.map(function(e){return F(e,r)})}):(s={type:"BlockStatement",body:[F({type:"ReturnStatement",argument:e.body},r)]},e.expression=!1),s=m(S({type:"FunctionExpression",params:[me.return,me.error],body:s,$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0)),n.promises&&(s={type:"NewExpression",callee:h("Promise"),arguments:[s]}),s={type:"BlockStatement",body:[{type:"ReturnStatement",loc:e.loc,argument:s}]},a&&D(s.body,[ge]),void(e.body=s)}}),e}function X(e){if(Array.isArray(e))return e.map(X);var t=0;return y.treeWalker(e,function(e,n,r){if("ThrowStatement"!==e.type&&"ReturnStatement"!==e.type||e.$mapped){if(o(e).isFunction)return t++,n(e),void t--}else if(t>0&&o(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?me.error:me.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function K(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:me.return,error:me.error,asyncspawn:me.asyncspawn,body:X(e).concat(t?[{type:"ReturnStatement",argument:me.return}]:[])}).body[0]}function ee(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+printNode(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function te(e,t){function s(e,t){y.treeWalker(e,function(n,r,i){n!==e&&o(n).isFunction||(o(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function a(e){var t=n.promises;n.promises=!0,_(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,r){n();var l,p,h;if(o(e).isAsync&&o(e).isFunction){var f;(f=x(r[0].parent))&&o(f).isAsync&&"get"===r[0].parent.kind&&ee(r[0].parent.key),(p=H(e))?(c(p,e.body),a(e)):t?"get"!==r[0].parent.kind&&s(e,!0):(l=e,delete l.async,h=w(l),s(l,!1),l=u(l),l.body=K(l.body.body,p),h&&D(l.body.body,[ge]),l.id&&"ExpressionStatement"===r[0].parent.type?(l.type="FunctionDeclaration",r[1].replace(l)):r[0].replace(l))}else(l=x(e))&&o(l).isAsync&&((p=H(l))?(c(p,l),a(e)):t&&"get"!==e.kind||(t?a(e):(e.async=!1,h=w(l),s(l,!1),i(l,u(l)),l.body=K(l.body.body,p)),h&&D(l.body.body,[ge])))});var l=r(n);return n.engine=!1,n.generators=!1,ce(e),oe(e),M(e,l.engine),O(e),$(e),U(e,[q,J,R,I,B]),z(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function ne(e,t,n){var r=[];return y.treeWalker(e,function(i,s,a){return i===e?s():t(i,a)?void r.push([].concat(a)):void(n||o(i).isScope||s())}),r}function re(e,t){var n=[],i={};if(e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type}),e.length){var s={};e.forEach(function(e){function t(e){e in s?i[e]=o.declarations[u]:s[e]=o.declarations[u]}for(var n=e[0],o=n.self,a=(o.kind,[]),u=0;u<o.declarations.length;u++){var c=o.declarations[u];if(ie(c.id).forEach(t),c.init){var l={type:"AssignmentExpression",left:r(c.id),operator:"=",right:r(c.init)};a.push(l)}}if(0==a.length)n.remove();else{var p=a.length>1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});var o=Object.keys(s);o.length&&(o=o.map(function(e){return{type:"VariableDeclarator",id:h(e),loc:s[e].loc,start:s[e].start,end:s[e].end}}),n[0]&&"VariableDeclaration"===n[0].type?n[0].declarations=n[0].declarations.concat(o):n.unshift({type:"VariableDeclaration",kind:t,declarations:o}))}return{decls:n,duplicates:i}}function ie(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(ie(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return ie(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectProperty":case"Property":return ie(e.value);case"RestElement":case"RestProperty":return ie(e.argument)}}function se(e){function t(e){d(v(e)+"Possible assignment to 'const "+printNode(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===r[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===r[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===r[e.key.name]&&t(e)})}}var r={};y.treeWalker(e,function(e,t,i){var s=o(e).isBlockStatement;if(s){r=Object.create(r);for(var a=0;a<s.length;a++)if("VariableDeclaration"===s[a].type)for(var u=0;u<s[a].declarations.length;u++)ie(s[a].declarations[u].id).forEach(function(e){r[e]=s[a].kind})}t(),"AssignmentExpression"===e.type?n(e.left):"UpdateExpression"===e.type&&n(e.argument),s&&(r=Object.getPrototypeOf(r))})}function oe(e){function t(e){return a(e,function(e){return"AssignmentExpression"===e.type})}function n(e){return function(t,n){if("VariableDeclaration"===t.type&&(t.kind=t.kind||"var")&&e.indexOf(t.kind)>=0){var r=n[0];return("left"!=r.field||"ForInStatement"!==r.parent.type&&"ForOfStatement"!==r.parent.type)&&("init"!=r.field||"ForStatement"!==r.parent.type||"const"!==t.kind&&"let"!==t.kind)}}}function s(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(o(e).isAsync||!e.$continuation)}var c={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,s){var a;if(n(),e.type in c&&!e.$hoisted){var s,l=c[e.type](e),p=[];for(a=0;a<l.length;a++)if(!o(l[a]).isScope){if((s=u(l[a]))&&function(e){p.length&&(e.argument={type:"SequenceExpression",
-expressions:p.map(function(e){var t=r(e);return i(e,e.left),t}).concat(e.argument)},p=[])}(s[0].self),!u(l.slice(a+1)))break;(s=t(l[a]))&&p.push(s[0].self)}}else if("VariableDeclaration"===e.type)for(a=e.declarations.length-1;a>0;a--)if(e.declarations[a]&&e.declarations[a].init&&u(e.declarations[a].init)){var h={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(a)},f=s[0];if(!("index"in f))throw new Error("VariableDeclaration not in a block");f.parent[f.field].splice(f.index+1,0,h)}}),se(e);var l=!1;return y.treeWalker(e,function(e,t,r){var i=l;if(l=l||pe(e),o(e).isBlockStatement){if(u(e)){var a,c,p,f,y,m=!r[0].parent||o(r[0].parent).isScope;if(m){c=ne(e,n(["const"]),!1);var g={},b={};c.forEach(function(e){e[0].self.declarations.forEach(function(e){ie(e.id).forEach(function(t){g[t]||b[t]?(delete g[t],b[t]=e):g[t]=e})})}),c.forEach(function(e){for(var t=0;t<e.length&&!o(e[t].parent).isBlockStatement;t++);var n=e[t];n.append({type:"ExpressionStatement",expression:{type:"SequenceExpression",expressions:e[0].self.declarations.map(function(e){var t={type:"AssignmentExpression",operator:"=",left:e.id,right:e.init};return e.init=null,t})}});var r=ie(e[0].self.declarations),i=r.filter(function(e){return e in b});i.length&&e[0].append({type:"VariableDeclaration",kind:"let",declarations:i.map(function(e){return{type:"VariableDeclarator",id:h(e)}})}),e[0].self.kind="var",i=r.filter(function(e){return e in g}),i.length?e[0].self.declarations=i.map(function(e){return{type:"VariableDeclarator",id:h(e)}}):n.remove()}),p=ne(e,n(["var"]),!1),f=[]}else f=ne(e,n(["const"]),!0);f=f.concat(ne(e,n(["let"]),!0)),a=ne(e,function(e){return o(e).isDirective},!0),y=ne(e,s,l),p=p?re(p,"var"):{duplicates:{},decls:[]},f=f?re(f,"let"):{duplicates:{},decls:[]},Object.keys(p.duplicates).forEach(function(e){d(v(p.duplicates[e])+"Duplicate declaration '"+printNode(p.duplicates[e])+"'")}),Object.keys(f.duplicates).forEach(function(e){d(v(f.duplicates[e])+"Duplicate declaration '"+printNode(f.duplicates[e])+"'")}),y=y.map(function(e){var t,n=e[0];return o(n.self).isAsync?(t=n.self.id.name,o(n.parent).isBlockStatement?(n.self.type="FunctionDeclaration",n.remove(),n.self):n.replace(h(t))):(t=n.self.id.name,"FunctionDeclaration"===n.self.type?n.remove():n.replace(h(t)))}),a=a.map(function(e){return e[0].remove()}),(a.length||p.decls.length||f.decls.length||y.length)&&(e.body=a.concat(p.decls).concat(f.decls).concat(y).concat(e.body))}l=i}if(t(),"ForOfStatement"===e.type||"ForInStatement"===e.type||o(e).isLoop){for(var x=0,w=0;w<r.length;w++)if("ForOfStatement"===r[w].self.type||"ForInStatement"===r[w].self.type||o(r[w].self).isLoop)x+=1;else if(o(r[w].self).isFunction)break;e.$depth=x,"LabeledStatement"===r[0].parent.type?e.$label=r[0].parent.label:e.$label=null}return!0}),e}function ae(e,t){function n(){return e.$superID=e.$superID||h("$super$"+ye++)}return function(e){(e=x(e))&&o(e).isAsync&&(!t||"get"===e.kind||a(e,function(e){return o(e).isFunction&&a(e,function(e){return"Super"===e.type})&&a(e,function(e){return e.async&&("ReturnStatement"===e.type||"ThrowStatement"===e.type)})},!0))&&y.treeWalker(e.body,function(e,t,r){var i;o(e).isClass||(t(),"Super"===e.type&&("MemberExpression"===r[0].parent.type?"CallExpression"===r[1].parent.type&&"callee"===r[1].field?(i=y.part("this.$super($field).call(this,$args)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name),args:r[1].parent.arguments}).expr,r[2].replace(i)):(i=y.part("this.$super($field)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name)}).expr,r[1].replace(i)):d(v(e)+"'super' in async methods must be deferenced. 'async constructor()'/'await super()' not valid.")))})}}function ue(e,t){return y.treeWalker(e,function(e,r,i){if(r(),("ClassDeclaration"===e.type||"ClassExpression"===e.type)&&(e.body.body.forEach(ae(e,t)),e.$superID)){var s=y.part("(function($field) { return super[$field] })",{field:h("$field")}).expr;n.babelTree?(s.type="ClassMethod",s.key=e.$superID,s.kind="method",e.body.body.push(s)):e.body.body.push({type:"MethodDefinition",key:e.$superID,kind:"method",value:s})}})}function ce(e){return y.treeWalker(e,function(e,t,n){return u(e)&&"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),t(),!0}),e}function le(e){return y.treeWalker(e,function(e,t,r){t(),"Identifier"===e.type&&"__nodent"===e.name&&i(e,b(n))}),e}function pe(e){if("Program"===e.type&&"module"===e.sourceType)return!0;var t;if("Program"===e.type)t=e.body;else{if(!o(e).isFunction)return!1;t=e.body.body}if(t)for(var n=0;n<t.length;n++)if(o(t[n]).isDirective&&t[n].expression.value.match(/^\s*use\s+strict\s*$/))return!0;return!1}function he(e){for(var t=0;t<e.length;t++){var n=e[t];if("ClassDeclaration"===n.type||"VariableDeclaration"===n.type&&("let"===n.kind||"const"===n.kind)||"FunctionDeclaration"===n.type&&n.id&&n.id.name&&!n.$continuation)return!0}return!1}function fe(e){y.treeWalker(e,function(e,t,n){if(t(),"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type&&1===e.body.body.length&&"ReturnStatement"===e.body.body[0].type)e.body=e.body.body[0].argument;else{var r,i;if(r=o(e).isBlockStatement)for(var s=0;s<r.length;s++)(i=o(r[s]).isBlockStatement)&&!he(i)&&(he(r[s])||[].splice.apply(r,[s,1].concat(i)))}}),y.treeWalker(e,function(e,t,n){if(t(),o(e).isJump){var r=n[0];if("index"in r)for(var i=r.index+1,s=r.parent[r.field];i<s.length;)"VariableDeclaration"===s[i].type||o(s[i]).isFunction&&s[i].id?i+=1:s.splice(i,1)}}),y.treeWalker(e,function(e,t,n){t(),e.$thisCall&&de[e.name]&&(de[e.name].ref?delete de[e.name]:de[e.name].ref=e.$thisCall)});var t=Object.keys(de).map(function(e){return de[e].ref});if(t.length){y.treeWalker(e,function(e,n,i){if(n(),t.indexOf(e)>=0&&"ReturnStatement"===i[1].self.type){var s=e.$thisCallName,a=r(de[s].def.body.body);de[s].$inlined=!0,o(i[1].self).isJump||a.push({type:"ReturnStatement"}),i[1].replace(a)}});var n=Object.keys(de).map(function(e){return de[e].$inlined&&de[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||a(e,function(e){return o(e).isES6},!0))){var i=pe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var r=i;if(i=i||pe(e)){t();var s="Program"===e.type?e:e.body,o=ne(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();i=r}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var de={},ye=1,me={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){me[e.slice(1)]=h(n[e])});var ge=y.part("var $0 = arguments",[me.arguments]).body[0];return n.engine?(e.ast=ue(e.ast,!0),e.ast=te(e.ast,n.engine),e.ast=le(e.ast),fe(e.ast)):n.generators?(e.ast=ue(e.ast),e.ast=te(e.ast),e.ast=le(e.ast),fe(e.ast)):(e.ast=ue(e.ast),_(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&i(e,b(e.value))}),e}var y=e("./parser"),m=e("./output");n.printNode=function e(t){if(!t)return"";if(Array.isArray(t))return t.map(e).join("|\n");try{return m(t)}catch(e){return e.message+": "+(t&&t.type)}};var g={start:!0,end:!0,loc:!0,range:!0},v={getScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type?this.node.body.body:"Program"===this.node.type?this.node.body:null},isScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"Program"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type},isFunction:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type},isClass:function(){return"ClassDeclaration"===this.node.type||"ClassExpression"===this.node.type},isBlockStatement:function(){return"ClassBody"===this.node.type||"Program"===this.node.type||"BlockStatement"===this.node.type?this.node.body:"SwitchCase"===this.node.type&&this.node.consequent},isExpressionStatement:function(){return"ExpressionStatement"===this.node.type},isLiteral:function(){return"Literal"===this.node.type||"BooleanLiteral"===this.node.type||"RegExpLiteral"===this.node.type||"NumericLiteral"===this.node.type||"StringLiteral"===this.node.type||"NullLiteral"===this.node.type},isDirective:function(){return"ExpressionStatement"===this.node.type&&("StringLiteral"===this.node.expression.type||"Literal"===this.node.expression.type&&"string"==typeof this.node.expression.value)},isUnaryExpression:function(){return"UnaryExpression"===this.node.type},isAwait:function(){return"AwaitExpression"===this.node.type&&!this.node.$hidden},isAsync:function(){return this.node.async},isStatement:function(){return null!==this.node.type.match(/[a-zA-Z]+Declaration/)||null!==this.node.type.match(/[a-zA-Z]+Statement/)},isExpression:function(){return null!==this.node.type.match(/[a-zA-Z]+Expression/)},isLoop:function(){return"ForStatement"===this.node.type||"WhileStatement"===this.node.type||"DoWhileStatement"===this.node.type},isJump:function(){return"ReturnStatement"===this.node.type||"ThrowStatement"===this.node.type||"BreakStatement"===this.node.type||"ContinueStatement"===this.node.type},isES6:function(){switch(this.node.type){case"ExportNamedDeclaration":case"ExportSpecifier":case"ExportDefaultDeclaration":case"ExportAllDeclaration":case"ImportDeclaration":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ArrowFunctionExpression":case"ForOfStatement":case"YieldExpression":case"Super":case"RestElement":case"RestProperty":case"SpreadElement":case"TemplateLiteral":case"ClassDeclaration":case"ClassExpression":return!0;case"VariableDeclaration":return this.node.kind&&"var"!==this.node.kind;case"FunctionDeclaration":case"FunctionExpression":return!!this.node.generator}}},b={};Object.keys(v).forEach(function(e){Object.defineProperty(b,e,{get:v[e]})}),t.exports={printNode:printNode,babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,t,n,r)}catch(t){if(t instanceof SyntaxError){var i=e.origCode.substr(t.pos-t.loc.column);i=i.split("\n")[0],t.message+=" (nodent)\n"+i+"\n"+i.replace(/[\S ]/g,"-").substring(0,t.loc.column)+"^",t.stack=""}throw t}}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./output":13,"./parser":14}],13:[function(e,t,n){"use strict";function r(e){var t=y[e.type]||y[e.type+e.operator]||y[e.type+e.operator+(e.prefix?"prefix":"")];return void 0!==t?t:20}function i(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,"/*"+e.type+"?*/ "+t.sourceAt(e.start,e.end))}function s(e,t,n,i){2===i||r(n)<r(t)||r(n)==r(t)&&(i||t.right===n)?(e.write(null,"("),this.out(n,e,n.type),e.write(null,")")):this.out(n,e,n.type)}function o(e,t){var n;if(t.write(null,"("),null!=e&&e.length>0){this.out(e[0],t,e[0].type);for(var r=1,i=e.length;r<i;r++)n=e[r],t.write(n,", "),this.out(n,t,n.type)}t.write(null,") ")}var a,u,c,l,p,h,f=e("source-map").SourceMapGenerator;if("".repeat)h=function(e,t){return t&&e?e.repeat(t):""};else{var d={};h=function(e,t){if(!t||!e)return"";var n=""+e+t;if(!d[n]){for(var r=[];t--;)r.push(e);d[n]=r.join("")}return d[n]}}var y={ExpressionStatement:-1,Identifier:21,Literal:21,BooleanLiteral:21,RegExpLiteral:21,NumericLiteral:21,StringLiteral:21,NullLiteral:21,ThisExpression:21,SuperExpression:21,ObjectExpression:21,ClassExpression:21,MemberExpression:19,CallExpression:18,NewExpression:18,ArrayExpression:17.5,FunctionExpression:17.5,FunctionDeclaration:17.5,ArrowFunctionExpression:17.5,"UpdateExpression++":17,"UpdateExpression--":17,"UpdateExpression++prefix":16,"UpdateExpression--prefix":16,UnaryExpression:16,AwaitExpression:16,"BinaryExpression**":15,"BinaryExpression*":15,"BinaryExpression/":15,"BinaryExpression%":15,"BinaryExpression+":14,"BinaryExpression-":14,"BinaryExpression<<":13,"BinaryExpression>>":13,"BinaryExpression>>>":13,"BinaryExpression<":12,"BinaryExpression<=":12,"BinaryExpression>":12,"BinaryExpression>=":12,BinaryExpressionin:12,BinaryExpressioninstanceof:12,"BinaryExpression==":11,"BinaryExpression===":11,"BinaryExpression!=":11,"BinaryExpression!==":11,"BinaryExpression&":10,"BinaryExpression^":9,"BinaryExpression|":8,"LogicalExpression&&":7,"LogicalExpression||":6,ConditionalExpression:5,AssignmentPattern:4,AssignmentExpression:4,yield:3,YieldExpression:3,SpreadElement:2,"comma-separated-list":1.5,SequenceExpression:1},m={type:"comma-separated-list"},g={out:i,expr:s,formatParameters:o,Program:function(e,t){var n,r,i=h(t.indent,t.indentLevel),s=t.lineEnd;n=e.body;for(var o=0,a=n.length;o<a;o++)r=n[o],t.write(null,i),this.out(r,t,r.type),t.write(null,s)},BlockStatement:p=function(e,t){var n,r,i=h(t.indent,t.indentLevel++),s=t.lineEnd,o=i+t.indent;if(t.write(e,"{"),null!=(n=e.body)&&n.length>0){t.write(null,s);for(var a=0,u=n.length;a<u;a++)r=n[a],t.write(null,o),this.out(r,t,r.type),t.write(null,s);t.write(null,i)}t.write(e.loc?{loc:{start:{line:e.loc.end.line,column:0}}}:null,"}"),t.indentLevel--},ClassBody:p,EmptyStatement:function(e,t){t.write(e,";")},ParenthesizedExpression:function(e,t){this.expr(t,e,e.expression,2)},ExpressionStatement:function(e,t){"FunctionExpression"===e.expression.type||"ObjectExpression"===e.expression.type?(t.write(null,"("),this.expr(t,e,e.expression),t.write(null,")")):this.expr(t,e,e.expression),t.write(null,";")},IfStatement:function(e,t){t.write(e,"if ("),this.out(e.test,t,e.test.type),t.write(null,") "),"BlockStatement"!==e.consequent.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.consequent,t,e.consequent.type),null!=e.alternate&&("BlockStatement"!==e.consequent.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel)),t.write(null," else "),"BlockStatement"!==e.alternate.type&&"IfStatement"!==e.alternate.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.alternate,t,e.alternate.type))},LabeledStatement:function(e,t){this.out(e.label,t,e.label.type),t.write(null,":"),this.out(e.body,t,e.body.type)},BreakStatement:function(e,t){t.write(e,"break"),e.label&&(t.write(null," "),this.out(e.label,t,e.label.type)),t.write(null,";")},ContinueStatement:function(e,t){t.write(e,"continue"),e.label&&(t.write(null," "),this.out(e.label,t,e.label.type)),t.write(null,";")},WithStatement:function(e,t){t.write(e,"with ("),this.out(e.object,t,e.object.type),t.write(null,") "),this.out(e.body,t,e.body.type)},SwitchStatement:function(e,t){var n,r,i,s=h(t.indent,t.indentLevel++),o=t.lineEnd;t.indentLevel++;var a=s+t.indent,u=a+t.indent;t.write(e,"switch ("),this.out(e.discriminant,t,e.discriminant.type),t.write(null,") {",o);for(var c=e.cases,l=0;l<c.length;l++){n=c[l],n.test?(t.write(n,a,"case "),this.out(n.test,t,n.test.type),t.write(null,":",o)):t.write(n,a,"default:",o),r=n.consequent;for(var p=0;p<r.length;p++)i=r[p],t.write(null,u),this.out(i,t,i.type),t.write(null,o)}t.indentLevel-=2,t.write(null,s,"}")},ReturnStatement:function(e,t){e.async&&t.write(e," async "),t.write(e,"return"),e.argument&&(t.write(null," "),this.out(e.argument,t,e.argument.type)),t.write(null,";")},ThrowStatement:function(e,t){e.async&&t.write(e," async "),t.write(e,"throw "),this.out(e.argument,t,e.argument.type),t.write(null,";")},TryStatement:function(e,t){t.write(e,"try "),this.out(e.block,t,e.block.type),e.handler&&this.out(e.handler,t,e.handler.type),e.finalizer&&(t.write(e.finalizer," finally "),this.out(e.finalizer,t,e.finalizer.type))},CatchClause:function(e,t){t.write(e," catch ("),this.out(e.param,t,e.param.type),t.write(null,") "),this.out(e.body,t,e.body.type)},WhileStatement:function(e,t){t.write(e,"while ("),this.out(e.test,t,e.test.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},DoWhileStatement:function(e,t){t.write(e,"do "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type),t.write(null," while ("),this.out(e.test,t,e.test.type),t.write(null,");")},ForStatement:function(e,t){if(t.write(e,"for ("),null!=e.init){var n=e.init,r=n.type;t.inForInit++,this.out(n,t,r),t.inForInit--,"VariableDeclaration"!==r&&t.write(null,"; ")}else t.write(null,"; ");e.test&&this.out(e.test,t,e.test.type),t.write(null,"; "),e.update&&this.out(e.update,t,e.update.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForInStatement:a=function(e,t){t.write(e,"for (");var n=e.left,r=n.type;t.inForInit++,this.out(n,t,r),"V"===r[0]&&19===r.length&&t.back(),t.inForInit--,t.write(null,"I"===e.type[3]?" in ":" of "),this.out(e.right,t,e.right.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForOfStatement:a,DebuggerStatement:function(e,t){t.write(e,"debugger;")},Function:function(e,t){e.async&&t.write(e,"async "),t.write(e,e.generator?"function* ":"function "),e.id&&t.write(e.id,e.id.name),this.formatParameters(e.params,t),this.out(e.body,t,e.body.type)},FunctionDeclaration:function(e,t){this.Function(e,t),t.write(null,t.lineEnd,h(t.indent,t.indentLevel))},FunctionExpression:function(e,t){this.Function(e,t)},VariableDeclaration:function(e,t){var n=e.declarations;t.write(e,e.kind," ");var r=n.length;if(r>0){this.out(n[0],t,"VariableDeclarator");for(var i=1;i<r;i++)t.write(null,", "),this.out(n[i],t,"VariableDeclarator")}t.write(null,";")},VariableDeclarator:function(e,t){this.out(e.id,t,e.id.type),null!=e.init&&(t.write(null," = "),this.expr(t,m,e.init))},ClassDeclaration:function(e,t){t.write(e,"class "),e.id&&t.write(e.id,e.id.name+" "),e.superClass&&(t.write(null,"extends "),this.out(e.superClass,t,e.superClass.type),t.write(null," ")),this.out(e.body,t,"BlockStatement")},ImportSpecifier:function(e,t){e.local.name==e.imported.name?this.out(e.local,t,e.local.type):(this.out(e.imported,t,e.imported.type),t.write(null," as "),this.out(e.local,t,e.local.type))},ImportDefaultSpecifier:function(e,t){this.out(e.local,t,e.local.type)},ImportNamespaceSpecifier:function(e,t){t.write(null,"* as "),this.out(e.local,t,e.local.type)},ImportDeclaration:function(e,t){var n;t.write(e,"import ");var r=e.specifiers,i=r.length,s=!0;if(i>0){for(var n=0;n<i;n++)"ImportSpecifier"===r[n].type&&s&&(s=!1,t.write(null,"{")),this.out(r[n],t,r[n].type),n<i-1&&t.write(null,", ");"ImportSpecifier"===r[i-1].type&&t.write(null,"}"),t.write(null," from ")}t.write(e.source,e.source.raw),t.write(null,";")},ExportDefaultDeclaration:function(e,t){t.write(e,"export default "),this.out(e.declaration,t,e.declaration.type)},ExportSpecifier:function(e,t){e.local.name==e.exported.name?this.out(e.local,t,e.local.type):(this.out(e.local,t,e.local.type),t.write(null," as "),this.out(e.exported,t,e.exported.type))},ExportNamedDeclaration:function(e,t){if(t.write(e,"export "),e.declaration)this.out(e.declaration,t,e.declaration.type);else{var n=e.specifiers;if(t.write(e,"{"),n&&n.length>0)for(var r=0;r<n.length;r++)this.out(n[r],t,n[r].type),r<n.length-1&&t.write(null,", ");t.write(null,"}"),e.source&&t.write(e.source," from ",e.source.raw),t.write(null,";")}},ExportAllDeclaration:function(e,t){t.write(e,"export * from "),t.write(e.source,e.source.raw,";")},MethodDefinition:function(e,t){switch(e.value.async&&t.write(e,"async "),e.static&&t.write(e,"static "),e.kind){case"get":case"set":t.write(e,e.kind," ")}e.value.generator&&t.write(null,"*"),e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),this.formatParameters(e.value.params,t),this.out(e.value.body,t,e.value.body.type)},ClassMethod:function(e,t){switch(e.async&&t.write(e,"async "),e.static&&t.write(e,"static "),e.kind){case"get":case"set":t.write(e,e.kind," ")}e.generator&&t.write(null,"*"),e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),this.formatParameters(e.params,t),this.out(e.body,t,e.body.type)},ClassExpression:function(e,t){this.out(e,t,"ClassDeclaration")},ArrowFunctionExpression:function(e,t){e.async&&t.write(e,"async "),1===e.params.length&&"Identifier"===e.params[0].type?(this.out(e.params[0],t,e.params[0].type),t.write(e," => ")):(this.formatParameters(e.params,t),t.write(e,"=> ")),"ObjectExpression"===e.body.type||"SequenceExpression"===e.body.type?(t.write(null,"("),this.out(e.body,t,e.body.type),t.write(null,")")):this.out(e.body,t,e.body.type)},ThisExpression:function(e,t){t.write(e,"this")},Super:function(e,t){t.write(e,"super")},RestElement:u=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:u,YieldExpression:function(e,t){t.write(e,e.delegate?"yield*":"yield"),e.argument&&(t.write(null," "),this.expr(t,e,e.argument))},AwaitExpression:function(e,t){t.write(e,"await "),this.expr(t,e,e.argument)},TemplateLiteral:function(e,t){var n,r=e.quasis,i=e.expressions;t.write(e,"`");for(var s=0,o=i.length;s<o;s++)n=i[s],t.write(r[s].value,r[s].value.raw),t.write(null,"${"),this.out(n,t,n.type),t.write(null,"}");t.write(r[r.length-1].value,r[r.length-1].value.raw),t.write(e,"`")},TaggedTemplateExpression:function(e,t){this.out(e.tag,t,e.tag.type),this.out(e.quasi,t,e.quasi.type)},ArrayExpression:l=function(e,t){if(t.write(e,"["),e.elements.length>0)for(var n=e.elements,r=n.length,i=0;;){var s=n[i];if(s&&this.expr(t,m,s),i+=1,(i<r||null===s)&&t.write(null,","),i>=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:l,ObjectExpression:function(e,t){var n,r=h(t.indent,t.indentLevel++),i=t.lineEnd,s=r+t.indent;if(t.write(e,"{"),e.properties.length>0){t.write(null,i);for(var o=e.properties,a=o.length,u=0;n=o[u],t.write(null,s),this.out(n,t,"Property"),++u<a;)t.write(e,",",i),t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1));t.write(null,i,r,"}")}else t.write(null,"}");t.indentLevel--},Property:function(e,t){e.method||"get"===e.kind||"set"===e.kind?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),t.write(null,": ")),this.expr(t,m,e.value))},ObjectPattern:function(e,t){if(t.write(e,"{"),e.properties.length>0)for(var n=e.properties,r=n.length,i=0;this.out(n[i],t,"Property"),++i<r;)t.write(null,", ");t.write(null,"}")},SequenceExpression:function(e,t){var n,r=e.expressions;if(r.length>0)for(var i=r.length,s=0;s<i;s++)n=r[s],s&&t.write(null,", "),this.expr(t,m,n)},UnaryExpression:function(e,t){e.prefix?(t.write(e,e.operator),e.operator.length>1&&t.write(e," "),this.expr(t,e,e.argument,!0)):(this.expr(t,e,e.argument),t.write(e,e.operator))},UpdateExpression:function(e,t){e.prefix?(t.write(e,e.operator),this.out(e.argument,t,e.argument.type)):(this.out(e.argument,t,e.argument.type),t.write(e,e.operator))},BinaryExpression:c=function(e,t){var n=e.operator;"in"===n&&t.inForInit&&t.write(null,"("),this.expr(t,e,e.left),t.write(e," ",n," "),this.expr(t,e,e.right,"ArrowFunctionExpression"===e.right.type?2:0),"in"===n&&t.inForInit&&t.write(null,")")},LogicalExpression:c,AssignmentExpression:function(e,t){"ObjectPattern"===e.left.type&&t.write(null,"("),this.BinaryExpression(e,t),"ObjectPattern"===e.left.type&&t.write(null,")")},AssignmentPattern:function(e,t){this.expr(t,e,e.left),t.write(e," = "),this.expr(t,e,e.right)},ConditionalExpression:function(e,t){this.expr(t,e,e.test,!0),t.write(e," ? "),this.expr(t,e,e.consequent),t.write(null," : "),this.expr(t,e,e.alternate)},NewExpression:function(e,t){t.write(e,"new "),this.out(e,t,"CallExpression")},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),t.write(e,"(");var n=e.arguments;if(n.length>0)for(var r=n.length,i=0;i<r;i++)0!=i&&t.write(null,", "),this.expr(t,m,n[i]);t.write(null,")")},MemberExpression:function(e,t){"ObjectExpression"===e.object.type||e.object.type.match(/Literal$/)&&e.object.raw.match(/^[0-9]/)||!("ArrayExpression"===e.object.type||"CallExpression"===e.object.type||"NewExpression"===e.object.type||r(e)<=r(e.object))?(t.write(null,"("),this.out(e.object,t,e.object.type),t.write(null,")")):this.out(e.object,t,e.object.type),e.computed?(t.write(e,"["),this.out(e.property,t,e.property.type),t.write(null,"]")):(t.write(e,"."),this.out(e.property,t,e.property.type))},Identifier:function(e,t){t.write(e,e.name)},Literal:function(e,t){t.write(e,e.raw)},NullLiteral:function(e,t){t.write(e,"null")},BooleanLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},StringLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},RegExpLiteral:function(e,t){t.write(e,e.extra.raw||"/"+e.pattern+"/"+e.flags)},NumericLiteral:function(e,t){t.write(e,JSON.stringify(e.value))}};t.exports=function(e,t,n){function r(e){l=arguments[arguments.length-1];for(var n=1;n<arguments.length;n++){if(c&&e&&e.loc&&e.loc.start){c.addMapping({source:t.map.file,original:{line:e.loc.start.line,column:e.loc.start.column},generated:{line:t.map.startLine+u.length+1,column:a.length}})}if(arguments[n]===y.lineEnd){if(d.length&&(d.forEach(function(e){"Line"===e.type?a+=" // "+e.value:((" /*"+e.value+"*/").split("\n").forEach(function(e){a+=e,u.push(a),a=""}),a=u.pop())}),d=[]),u.push(a),a="",p.length){var r=u.pop();p.forEach(function(e){var t=h(y.indent,e.indent);"Line"===e.type?u.push(t+"//"+e.value):(t+"/*"+e.value+"*/").split("\n").forEach(function(e){u.push(e)})}),u.push(r),p=[]}}else a+=arguments[n],e&&e.$comments&&(e.$comments.forEach(function(t){var n=e.loc.start.column<t.loc.start.column;t.indent=y.indentLevel,n?d.push(t):p.push(t)}),e.$comments=null)}}function i(){return a.length}function s(e,t){return n?n.substring(e,t):"/* Omitted Non-standard node */"}function o(){a=a.substring(0,a.length-l.length)}t=t||{};var a="",u=[],c=t.map&&new f(t.map);c&&t.map.sourceContent&&c.setSourceContent(t.map.file,t.map.sourceContent);var l="",p=[],d=[],y={inForInit:0,lineLength:i,sourceAt:s,write:r,back:o,indent:" ",lineEnd:"\n",indentLevel:0,wrapColumn:80};g.out(e,y),d=e.$comments||[],y.write(e,y.lineEnd);var m=u.join(y.lineEnd);return t&&t.map?{code:m,map:c}:m}},{"source-map":27}],14:[function(e,t,n){"use strict";function r(e,t){["start","end","loc","range"].forEach(function(n){n in e&&!(n in t)&&(t[n]=e[n])})}function i(e,t,n){function r(e){e.replace=p.replace,e.append=p.append,e.index?(Object.defineProperties(e,{index:{enumerable:!0,get:p.index}}),e.remove=p.removeElement):e.remove=p.removeNode,n.unshift(e),i(e.self,t,n),n.shift()}function s(){e.type in l&&l[e.type](e,n,function t(i,s,o){if(i===e)return l[o||e.type](e,n,t);for(var a=Object.keys(e),u=0;u<a.length;u++){var c=e[a[u]];Array.isArray(c)?c.indexOf(i)>=0&&r({self:i,parent:e,field:a[u],index:!0}):c instanceof Object&&i===c&&r({self:i,parent:e,field:a[u]})}})}return n||(n=[{self:e}],n.replace=function(e,t){n[e].replace(t)}),t(e,s,n),e}function s(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(a.version)<4)&&(h||(parseInt(a.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(a),h=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var o in n)"noNodentExtensions"!==o&&(s[o]=n[o]);var u=a.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}function o(e,t){function n(e,r){if(Array.isArray(r)&&!Array.isArray(e))throw new Error("Can't substitute an array for a node");return r=r||{},Object.keys(e).forEach(function(i){function s(e){return"function"==typeof e&&(e=e()),r=r.concat(e)}function o(e){return"function"==typeof e&&(e=e()),r[i]=e,r}if(!(e[i]instanceof Object))return r[i]=e[i];if(Array.isArray(e[i]))return r[i]=n(e[i],[]);var a;if(a=Array.isArray(r)?s:o,"Identifier"===e[i].type&&"$"===e[i].name[0])return a(t[e[i].name.slice(1)]);if("LabeledStatement"===e[i].type&&"$"===e[i].label.name){var u=e[i].body.expression;return a(t[u.name||u.value])}return a("LabeledStatement"===e[i].type&&"$$"===e[i].label.name.slice(0,2)?t[e[i].label.name.slice(2)](n(e[i]).body):n(e[i]))}),r}f[e]||(f[e]=s(e,{noNodentExtensions:!0,locations:!1,ranges:!1,onComment:null}));var r=n(f[e]);return{body:r.body,expr:"ExpressionStatement"===r.body[0].type?r.body[0].expression:null}}var a=e("acorn"),u=e("acorn/dist/walk"),c={AwaitExpression:function(e,t,n){n(e.argument,t,"Expression")},SwitchStatement:function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r<e.cases.length;++r)n(e.cases[r],t)},SwitchCase:function(e,t,n){e.test&&n(e.test,t,"Expression");for(var r=0;r<e.consequent.length;++r)n(e.consequent[r],t,"Statement")},TryStatement:function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t,"Statement"),e.finalizer&&n(e.finalizer,t,"Statement")},CatchClause:function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},Class:function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression"),n(e.body,t)},ClassBody:function(e,t,n){for(var r=0;r<e.body.length;r++)n(e.body[r],t)},ClassProperty:function(e,t,n){e.key&&n(e.key,t,"Expression"),e.value&&n(e.value,t,"Expression")},ClassMethod:function(e,t,n){e.key&&n(e.key,t,"Expression"),n(e,t,"Function")},ObjectProperty:function(e,t,n){e.key&&n(e.key,t,"Expression"),e.value&&n(e.value,t,"Expression")},ObjectMethod:function(e,t,n){e.key&&n(e.key,t,"Expression"),n(e,t,"Function")}},l=u.make(c),p={replace:function(e){return Array.isArray(e)&&1===e.length&&(e=e[0]),"index"in this?(r(this.parent[this.field][this.index],e),Array.isArray(e)?[].splice.apply(this.parent[this.field],[this.index,1].concat(e)):this.parent[this.field][this.index]=e):(r(this.parent[this.field],e),Array.isArray(e)?this.parent[this.field]={type:"BlockStatement",body:e}:this.parent[this.field]=e),this.self},append:function(e){if(Array.isArray(e)&&1===e.length&&(e=e[0]),!("index"in this))throw new Error("Cannot append Element node to non-array");return Array.isArray(e)?[].splice.apply(this.parent[this.field],[this.index+1,0].concat(e)):this.parent[this.field].splice(this.index+1,0,e),this.self},index:function(){return this.parent[this.field].indexOf(this.self)},removeElement:function(){return this.parent[this.field].splice(this.index,1)[0]},removeNode:function(){var e=this.parent[this.field];return delete this.parent[this.field],e}},h=!1,f={};t.exports={part:o,parse:s,treeWalker:i}},{acorn:15,"acorn-es7-plugin":1,"acorn/dist/walk":16}],15:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.acorn=e.acorn||{})}(this,function(e){"use strict";function t(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&k.test(String.fromCharCode(e)):!1!==n&&t(e,_)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):!1!==n&&(t(e,_)||t(e,C)))))}function i(e,t){
-return new L(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,T[e]=new L(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return j.call(e,t)}function u(e,t){for(var n=1,r=0;;){O.lastIndex=r;var i=O.exec(e);if(!(i&&i.index<t))return new V(n,t-r);++n,r=i.index+i[0].length}}function c(e){var t={};for(var n in U)t[n]=e&&a(e,n)?e[n]:U[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),D(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return D(t.onComment)&&(t.onComment=l(t,t.onComment)),t}function l(e,t){return function(n,r,i,s,o,a){var u={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(u.loc=new q(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}function p(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}function h(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function f(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),e}}function d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function y(e,t){return new W(t,e).parse()}function m(e,t,n){var r=new W(n,e,t);return r.nextToken(),r.parseExpression()}function g(e,t){return new W(t,e)}function v(t,n,r){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=r}var b={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},x="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",w={5:x,6:x+" const class extends export import super"},E="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",S="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",k=new RegExp("["+E+"]"),A=new RegExp("["+E+S+"]");E=S=null;var _=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],C=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],L=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},P={beforeExpr:!0},N={startsExpr:!0},T={},F={num:new L("num",N),regexp:new L("regexp",N),string:new L("string",N),name:new L("name",N),eof:new L("eof"),bracketL:new L("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new L("]"),braceL:new L("{",{beforeExpr:!0,startsExpr:!0}),braceR:new L("}"),parenL:new L("(",{beforeExpr:!0,startsExpr:!0}),parenR:new L(")"),comma:new L(",",P),semi:new L(";",P),colon:new L(":",P),dot:new L("."),question:new L("?",P),arrow:new L("=>",P),template:new L("template"),ellipsis:new L("...",P),backQuote:new L("`",N),dollarBraceL:new L("${",{beforeExpr:!0,startsExpr:!0}),eq:new L("=",{beforeExpr:!0,isAssign:!0}),assign:new L("_=",{beforeExpr:!0,isAssign:!0}),incDec:new L("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new L("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=",6),relational:i("</>",7),bitShift:i("<</>>",8),plusMin:new L("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new L("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",P),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",P),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",P),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",N),_if:s("if"),_return:s("return",P),_switch:s("switch"),_throw:s("throw",P),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",N),_super:s("super",N),_class:s("class"),_extends:s("extends",P),_export:s("export"),_import:s("import"),_null:s("null",N),_true:s("true",N),_false:s("false",N),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},$=/\r\n?|\n|\u2028|\u2029/,O=new RegExp($.source,"g"),B=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,j=I.hasOwnProperty,M=I.toString,D=Array.isArray||function(e){return"[object Array]"===M.call(e)},V=function(e,t){this.line=e,this.column=t};V.prototype.offset=function(e){return new V(this.line,this.column+e)};var q=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},U={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},z={},W=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=p(w[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=b[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=p(r);var s=(r?r+" ":"")+b.strict;this.reservedWordsStrict=p(s),this.reservedWordsStrictBind=p(s+" "+b.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split($).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=F.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};W.prototype.isKeyword=function(e){return this.keywords.test(e)},W.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},W.prototype.extend=function(e,t){this[e]=t(this[e])},W.prototype.loadPlugins=function(e){var t=this;for(var n in e){var r=z[n];if(!r)throw new Error("Plugin '"+n+"' not found");r(t,e[n])}},W.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var G=W.prototype,J=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;G.strictDirective=function(e){for(var t=this;;){R.lastIndex=e,e+=R.exec(t.input)[0].length;var n=J.exec(t.input.slice(e));if(!n)return!1;if("use strict"==(n[1]||n[2]))return!0;e+=n[0].length}},G.eat=function(e){return this.type===e&&(this.next(),!0)},G.isContextual=function(e){return this.type===F.name&&this.value===e},G.eatContextual=function(e){return this.value===e&&this.eat(F.name)},G.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},G.canInsertSemicolon=function(){return this.type===F.eof||this.type===F.braceR||$.test(this.input.slice(this.lastTokEnd,this.start))},G.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},G.semicolon=function(){this.eat(F.semi)||this.insertSemicolon()||this.unexpected()},G.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},G.expect=function(e){this.eat(e)||this.unexpected()},G.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Y=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};G.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},G.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},G.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},G.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var H=W.prototype;H.parseTopLevel=function(e){var t=this,n={};for(e.body||(e.body=[]);this.type!==F.eof;){var r=t.parseStatement(!0,!0,n);e.body.push(r)}return this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var Z={kind:"loop"},Q={kind:"switch"};H.isLet=function(){if(this.type!==F.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var s=t+1;r(this.input.charCodeAt(s),!0);)++s;var o=this.input.slice(t,s);if(!this.isKeyword(o))return!0}return!1},H.isAsyncFunction=function(){if(this.type!==F.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length;return!($.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},H.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=F._var,r="let"),i){case F._break:case F._continue:return this.parseBreakContinueStatement(s,i.keyword);case F._debugger:return this.parseDebuggerStatement(s);case F._do:return this.parseDoStatement(s);case F._for:return this.parseForStatement(s);case F._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case F._class:return e||this.unexpected(),this.parseClass(s,!0);case F._if:return this.parseIfStatement(s);case F._return:return this.parseReturnStatement(s);case F._switch:return this.parseSwitchStatement(s);case F._throw:return this.parseThrowStatement(s);case F._try:return this.parseTryStatement(s);case F._const:case F._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case F._while:return this.parseWhileStatement(s);case F._with:return this.parseWithStatement(s);case F.braceL:return this.parseBlock();case F.semi:return this.parseEmptyStatement(s);case F._export:case F._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===F._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===F.name&&"Identifier"===a.type&&this.eat(F.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},H.parseBreakContinueStatement=function(e,t){var n=this,r="break"==t;this.next(),this.eat(F.semi)||this.insertSemicolon()?e.label=null:this.type!==F.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var s=n.labels[i];if(null==e.label||s.name===e.label.name){if(null!=s.kind&&(r||"loop"===s.kind))break;if(e.label&&r)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},H.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},H.parseDoStatement=function(e){return this.next(),this.labels.push(Z),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(F._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(F.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},H.parseForStatement=function(e){if(this.next(),this.labels.push(Z),this.enterLexicalScope(),this.expect(F.parenL),this.type===F.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===F._var||this.type===F._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new Y,s=this.parseExpression(!0,i);return this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},H.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},H.isFunction=function(){return this.type===F._function||this.isAsyncFunction()},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(F._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},H.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(F.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},H.parseSwitchStatement=function(e){var t=this;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(F.braceL),this.labels.push(Q),this.enterLexicalScope();for(var n,r=!1;this.type!=F.braceR;)if(t.type===F._case||t.type===F._default){var i=t.type===F._case;n&&t.finishNode(n,"SwitchCase"),e.cases.push(n=t.startNode()),n.consequent=[],t.next(),i?n.test=t.parseExpression():(r&&t.raiseRecoverable(t.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),t.expect(F.colon)}else n||t.unexpected(),n.consequent.push(t.parseStatement(!0));return this.exitLexicalScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},H.parseThrowStatement=function(e){return this.next(),$.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var X=[];H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===F._catch){var t=this.startNode();this.next(),this.expect(F.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(F.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(F._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},H.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},H.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Z),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},H.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},H.parseLabeledStatement=function(e,t,n){for(var r=this,i=0;i<this.labels.length;++i)r.labels[i].name===t&&r.raise(n.start,"Label '"+t+"' is already declared");for(var s=this.type.isLoop?"loop":this.type===F._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var a=r.labels[o];if(a.statementStart!=e.start)break;a.statementStart=r.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e){var t=this;void 0===e&&(e=!0);var n=this.startNode();for(n.body=[],this.expect(F.braceL),e&&this.enterLexicalScope();!this.eat(F.braceR);){var r=t.parseStatement(!0);n.body.push(r)}return e&&this.exitLexicalScope(),this.finishNode(n,"BlockStatement")},H.parseFor=function(e,t){return e.init=t,this.expect(F.semi),e.test=this.type===F.semi?null:this.parseExpression(),this.expect(F.semi),e.update=this.type===F.parenR?null:this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t){var n=this.type===F._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},H.parseVar=function(e,t,n){var r=this;for(e.declarations=[],e.kind=n;;){var i=r.startNode();if(r.parseVarId(i,n),r.eat(F.eq)?i.init=r.parseMaybeAssign(t):"const"!==n||r.type===F._in||r.options.ecmaVersion>=6&&r.isContextual("of")?"Identifier"==i.id.type||t&&(r.type===F._in||r.isContextual("of"))?i.init=null:r.raise(r.lastTokEnd,"Complex binding patterns require an initialization value"):r.unexpected(),e.declarations.push(r.finishNode(i,"VariableDeclarator")),!r.eat(F.comma))break}return e},H.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},H.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(F.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=F.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==F.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect(F.parenL),e.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},H.parseClass=function(e,t){var n=this;this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(F.braceL);!this.eat(F.braceR);)if(!n.eat(F.semi)){var s=n.startNode(),o=n.eat(F.star),a=!1,u=n.type===F.name&&"static"===n.value;n.parsePropertyName(s),s.static=u&&n.type!==F.parenL,s.static&&(o&&n.unexpected(),o=n.eat(F.star),n.parsePropertyName(s)),n.options.ecmaVersion>=8&&!o&&!s.computed&&"Identifier"===s.key.type&&"async"===s.key.name&&n.type!==F.parenL&&!n.canInsertSemicolon()&&(a=!0,n.parsePropertyName(s)),s.kind="method";var c=!1;if(!s.computed){var l=s.key;o||a||"Identifier"!==l.type||n.type===F.parenL||"get"!==l.name&&"set"!==l.name||(c=!0,s.kind=l.name,l=n.parsePropertyName(s)),!s.static&&("Identifier"===l.type&&"constructor"===l.name||"Literal"===l.type&&"constructor"===l.value)&&(i&&n.raise(l.start,"Duplicate constructor in the same class"),c&&n.raise(l.start,"Constructor can't have get/set modifier"),o&&n.raise(l.start,"Constructor can't be a generator"),a&&n.raise(l.start,"Constructor can't be an async method"),s.kind="constructor",i=!0)}if(n.parseClassMethod(r,s,o,a),c){var p="get"===s.kind?0:1;if(s.value.params.length!==p){var h=s.value.start;"get"===s.kind?n.raiseRecoverable(h,"getter should have no params"):n.raiseRecoverable(h,"setter should have exactly one param")}else"set"===s.kind&&"RestElement"===s.value.params[0].type&&n.raiseRecoverable(s.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},H.parseClassId=function(e,t){e.id=this.type===F.name?this.parseIdent():!0===t?this.unexpected():null},H.parseClassSuper=function(e){e.superClass=this.eat(F._extends)?this.parseExprSubscripts():null},H.parseExport=function(e,t){var n=this;if(this.next(),this.eat(F.star))return this.expectContextual("from"),e.source=this.type===F.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(F._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===F._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,r)}else if(this.type===F._class){var s=this.startNode();e.declaration=this.parseClass(s,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===F.string?this.parseExprAtom():this.unexpected();else{for(var o=0;o<e.specifiers.length;o++)(n.keywords.test(e.specifiers[o].local.name)||n.reservedWords.test(e.specifiers[o].local.name))&&n.unexpected(e.specifiers[o].local.start);e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},H.checkExport=function(e,t,n){e&&(a(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},H.checkPatternExport=function(e,t){var n=this,r=t.type;if("Identifier"==r)this.checkExport(e,t.name,t.start);else if("ObjectPattern"==r)for(var i=0;i<t.properties.length;++i)n.checkPatternExport(e,t.properties[i].value);else if("ArrayPattern"==r)for(var s=0;s<t.elements.length;++s){var o=t.elements[s];o&&n.checkPatternExport(e,o)}else"AssignmentPattern"==r?this.checkPatternExport(e,t.left):"ParenthesizedExpression"==r&&this.checkPatternExport(e,t.expression)},H.checkVariableExport=function(e,t){var n=this;if(e)for(var r=0;r<t.length;r++)n.checkPatternExport(e,t[r].id)},H.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},H.parseExportSpecifiers=function(e){var t=this,n=[],r=!0;for(this.expect(F.braceL);!this.eat(F.braceR);){if(r)r=!1;else if(t.expect(F.comma),t.afterTrailingComma(F.braceR))break;var i=t.startNode();i.local=t.parseIdent(!0),i.exported=t.eatContextual("as")?t.parseIdent(!0):i.local,t.checkExport(e,i.exported.name,i.exported.start),n.push(t.finishNode(i,"ExportSpecifier"))}return n},H.parseImport=function(e){return this.next(),this.type===F.string?(e.specifiers=X,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===F.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},H.parseImportSpecifiers=function(){var e=this,t=[],n=!0;if(this.type===F.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLVal(r.local,"let"),t.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(F.comma))return t}if(this.type===F.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLVal(i.local,"let"),t.push(this.finishNode(i,"ImportNamespaceSpecifier")),t}for(this.expect(F.braceL);!this.eat(F.braceR);){if(n)n=!1;else if(e.expect(F.comma),e.afterTrailingComma(F.braceR))break;var s=e.startNode();s.imported=e.parseIdent(!0),e.eatContextual("as")?s.local=e.parseIdent():(s.local=s.imported,e.isKeyword(s.local.name)&&e.unexpected(s.local.start),e.reservedWordsStrict.test(s.local.name)&&e.raiseRecoverable(s.local.start,"The keyword '"+s.local.name+"' is reserved")),e.checkLVal(s.local,"let"),t.push(e.finishNode(s,"ImportSpecifier"))}return t};var K=W.prototype;K.toAssignable=function(e,t){var n=this;if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var r=0;r<e.properties.length;r++){var i=e.properties[r];"init"!==i.kind&&n.raise(i.key.start,"Object pattern can't contain getter or setter"),n.toAssignable(i.value,t)}break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t);break;case"AssignmentExpression":if("="!==e.operator){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break}e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":e.expression=this.toAssignable(e.expression,t);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},K.toAssignableList=function(e,t){var n=this,r=e.length;if(r){var i=e[r-1];if(i&&"RestElement"==i.type)--r;else if(i&&"SpreadElement"==i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--r}t&&i&&"RestElement"===i.type&&"Identifier"!==i.argument.type&&this.unexpected(i.argument.start)}for(var o=0;o<r;o++){var a=e[o];a&&n.toAssignable(a,t)}return e},K.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},K.parseRest=function(e){var t=this.startNode();return this.next(),t.argument=e?this.type===F.name?this.parseIdent():this.unexpected():this.type===F.name||this.type===F.bracketL?this.parseBindingAtom():this.unexpected(),this.finishNode(t,"RestElement")},K.parseBindingAtom=function(){if(this.options.ecmaVersion<6)return this.parseIdent();switch(this.type){case F.name:return this.parseIdent();case F.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(F.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case F.braceL:return this.parseObj(!0);default:this.unexpected()}},K.parseBindingList=function(e,t,n,r){for(var i=this,s=[],o=!0;!this.eat(e);)if(o?o=!1:i.expect(F.comma),t&&i.type===F.comma)s.push(null);else{if(n&&i.afterTrailingComma(e))break;if(i.type===F.ellipsis){var a=i.parseRest(r);i.parseBindingListItem(a),s.push(a),i.type===F.comma&&i.raise(i.start,"Comma is not permitted after the rest element"),i.expect(e);break}var u=i.parseMaybeDefault(i.start,i.startLoc);i.parseBindingListItem(u),s.push(u)}return s},K.parseBindingListItem=function(e){return e},K.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(F.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},K.checkLVal=function(e,t,n){var r=this;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(a(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t&&"none"!==t&&(("var"===t&&!this.canDeclareVarName(e.name)||"var"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,"Identifier '"+e.name+"' has already been declared"),"var"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));break;case"MemberExpression":t&&this.raiseRecoverable(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":
-for(var i=0;i<e.properties.length;i++)r.checkLVal(e.properties[i].value,t,n);break;case"ArrayPattern":for(var s=0;s<e.elements.length;s++){var o=e.elements[s];o&&r.checkLVal(o,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var ee=W.prototype;ee.checkPropClash=function(e,t){if(!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)return void("__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0));n="$"+n;var s=t[n];if(s){var o;o="init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i],o&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}},ee.parseExpression=function(e,t){var n=this,r=this.start,i=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===F.comma){var o=this.startNodeAt(r,i);for(o.expressions=[s];this.eat(F.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return s},ee.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new Y,r=!0);var o=this.start,a=this.startLoc;this.type!=F.parenL&&this.type!=F.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||Y.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===F.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},ee.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(F.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(F.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},ee.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},ee.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==F._in)&&s>r){var o=this.type===F.logicalOR||this.type===F.logicalAND,a=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,s,i),p=this.buildBinary(t,n,e,l,a,o);return this.parseExprOp(p,t,n,r,i)}return e},ee.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ee.parseMaybeUnary=function(e,t){var n,r=this,i=this.start,s=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var o=this.startNode(),a=this.type===F.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),a?this.checkLVal(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(o,a?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=r.startNodeAt(i,s);u.operator=r.value,u.prefix=!1,u.argument=n,r.checkLVal(n),r.next(),n=r.finishNode(u,"UpdateExpression")}}return!t&&this.eat(F.starstar)?this.buildBinary(i,s,n,this.parseMaybeUnary(null,!1),"**",!1):n},ee.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},ee.parseSubscripts=function(e,t,n,r){for(var i,s=this,o=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=s.eat(F.bracketL))||s.eat(F.dot)){var a=s.startNodeAt(t,n);a.object=e,a.property=i?s.parseExpression():s.parseIdent(!0),a.computed=!!i,i&&s.expect(F.bracketR),e=s.finishNode(a,"MemberExpression")}else if(!r&&s.eat(F.parenL)){var u=new Y,c=s.yieldPos,l=s.awaitPos;s.yieldPos=0,s.awaitPos=0;var p=s.parseExprList(F.parenR,s.options.ecmaVersion>=8,!1,u);if(o&&!s.canInsertSemicolon()&&s.eat(F.arrow))return s.checkPatternErrors(u,!1),s.checkYieldAwaitInDefaultParams(),s.yieldPos=c,s.awaitPos=l,s.parseArrowExpression(s.startNodeAt(t,n),p,!0);s.checkExpressionErrors(u,!0),s.yieldPos=c||s.yieldPos,s.awaitPos=l||s.awaitPos;var h=s.startNodeAt(t,n);h.callee=e,h.arguments=p,e=s.finishNode(h,"CallExpression")}else{if(s.type!==F.backQuote)return e;var f=s.startNodeAt(t,n);f.tag=e,f.quasi=s.parseTemplate(),e=s.finishNode(f,"TaggedTemplateExpression")}},ee.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case F._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case F._this:var r=this.type===F._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,r);case F.name:var i=this.start,s=this.startLoc,o=this.parseIdent(this.type!==F.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(F._function))return this.parseFunction(this.startNodeAt(i,s),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(F.arrow))return this.parseArrowExpression(this.startNodeAt(i,s),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===F.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(F.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,s),[o],!0)}return o;case F.regexp:var a=this.value;return t=this.parseLiteral(a.value),t.regex={pattern:a.pattern,flags:a.flags},t;case F.num:case F.string:return this.parseLiteral(this.value);case F._null:case F._true:case F._false:return t=this.startNode(),t.value=this.type===F._null?null:this.type===F._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case F.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),c;case F.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(F.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case F.braceL:return this.parseObj(!1,e);case F._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case F._class:return this.parseClass(this.startNode(),!1);case F._new:return this.parseNew();case F.backQuote:return this.parseTemplate();default:this.unexpected()}},ee.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},ee.parseParenExpression=function(){this.expect(F.parenL);var e=this.parseExpression();return this.expect(F.parenR),e},ee.parseParenAndDistinguishExpression=function(e){var t,n=this,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a,u=this.start,c=this.startLoc,l=[],p=!0,h=!1,f=new Y,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==F.parenR;){if(p?p=!1:n.expect(F.comma),s&&n.afterTrailingComma(F.parenR,!0)){h=!0;break}if(n.type===F.ellipsis){o=n.start,l.push(n.parseParenItem(n.parseRest())),n.type===F.comma&&n.raise(n.start,"Comma is not permitted after the rest element");break}n.type!==F.parenL||a||(a=n.start),l.push(n.parseMaybeAssign(!1,f,n.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(F.parenR),e&&!this.canInsertSemicolon()&&this.eat(F.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),a&&this.unexpected(a),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(r,i,l);l.length&&!h||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,l.length>1?(t=this.startNodeAt(u,c),t.expressions=l,this.finishNodeAt(t,"SequenceExpression",m,g)):t=l[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(r,i);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},ee.parseParenItem=function(e){return e},ee.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var te=[];ee.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(F.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(F.parenL)?e.arguments=this.parseExprList(F.parenR,this.options.ecmaVersion>=8,!1):e.arguments=te,this.finishNode(e,"NewExpression")},ee.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===F.backQuote,this.finishNode(e,"TemplateElement")},ee.parseTemplate=function(){var e=this,t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement();for(t.quasis=[n];!n.tail;)e.expect(F.dollarBraceL),t.expressions.push(e.parseExpression()),e.expect(F.braceR),t.quasis.push(n=e.parseTemplateElement());return this.next(),this.finishNode(t,"TemplateLiteral")},ee.parseObj=function(e,t){var n=this,r=this.startNode(),i=!0,s={};for(r.properties=[],this.next();!this.eat(F.braceR);){if(i)i=!1;else if(n.expect(F.comma),n.afterTrailingComma(F.braceR))break;var o,a,u,c,l=n.startNode();n.options.ecmaVersion>=6&&(l.method=!1,l.shorthand=!1,(e||t)&&(u=n.start,c=n.startLoc),e||(o=n.eat(F.star))),n.parsePropertyName(l),e||!(n.options.ecmaVersion>=8)||o||l.computed||"Identifier"!==l.key.type||"async"!==l.key.name||n.type===F.parenL||n.type===F.colon||n.canInsertSemicolon()?a=!1:(a=!0,n.parsePropertyName(l,t)),n.parsePropertyValue(l,e,o,a,u,c,t),n.checkPropClash(l,s),r.properties.push(n.finishNode(l,"Property"))}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},ee.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===F.colon&&this.unexpected(),this.eat(F.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===F.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=F.comma&&this.type!=F.braceR){(n||r||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===F.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(F.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(F.bracketR),e.key;e.computed=!1}return e.key=this.type===F.num||this.type===F.string?this.parseExprAtom():this.parseIdent(!0)},ee.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ee.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(F.parenL),n.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},ee.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},ee.parseFunctionBody=function(e,t){var n=t&&this.type!==F.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},ee.isSimpleParamList=function(e){for(var t=0;t<e.length;t++)if("Identifier"!==e[t].type)return!1;return!0},ee.checkParams=function(e,t){for(var n=this,r={},i=0;i<e.params.length;i++)n.checkLVal(e.params[i],"var",t?null:r)},ee.parseExprList=function(e,t,n,r){for(var i=this,s=[],o=!0;!this.eat(e);){if(o)o=!1;else if(i.expect(F.comma),t&&i.afterTrailingComma(e))break;var a;n&&i.type===F.comma?a=null:i.type===F.ellipsis?(a=i.parseSpread(r),r&&i.type===F.comma&&r.trailingComma<0&&(r.trailingComma=i.start)):a=i.parseMaybeAssign(!1,r),s.push(a)}return s},ee.parseIdent=function(e){var t=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===F.name?(!e&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(this.value)&&(this.options.ecmaVersion>=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},ee.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==F.semi||this.canInsertSemicolon()||this.type!=F.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(F.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},ee.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var ne=W.prototype;ne.raise=function(e,t){var n=u(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},ne.raiseRecoverable=ne.raise,ne.curPosition=function(){if(this.options.locations)return new V(this.curLine,this.pos-this.lineStart)};var re=W.prototype,ie=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0;r<t.length;r++){var i=t[r];for(var s in i)a(i,s)&&(e[s]=i[s])}return e};re.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},re.exitFunctionScope=function(){this.scopeStack.pop()},re.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),ie(t.parentLexical,e.lexical,e.parentLexical)},re.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];ie(t.childVar,e.var,e.childVar)},re.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.parentLexical,e)},re.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.var,e)&&!a(t.childVar,e)},re.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},re.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var se=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new q(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},oe=W.prototype;oe.startNode=function(){return new se(this,this.start,this.startLoc)},oe.startNodeAt=function(e,t){return new se(this,e,t)},oe.finishNode=function(e,t){return h.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},oe.finishNodeAt=function(e,t,n,r){return h.call(this,e,t,n,r)};var ae=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},ue={b_stat:new ae("{",!1),b_expr:new ae("{",!0),b_tmpl:new ae("${",!0),p_stat:new ae("(",!1),p_expr:new ae("(",!0),q_tmpl:new ae("`",!0,!0,function(e){return e.readTmplToken()}),f_expr:new ae("function",!0),f_expr_gen:new ae("function",!0,!1,null,!0),f_gen:new ae("function",!1,!1,null,!0)},ce=W.prototype;ce.initialContext=function(){return[ue.b_stat]},ce.braceIsBlock=function(e){if(e===F.colon){var t=this.curContext();if(t===ue.b_stat||t===ue.b_expr)return!t.isExpr}return e===F._return?$.test(this.input.slice(this.lastTokEnd,this.start)):e===F._else||e===F.semi||e===F.eof||e===F.parenR||e==F.arrow||(e==F.braceL?this.curContext()===ue.b_stat:!this.exprAllowed)},ce.inGeneratorContext=function(){for(var e=this,t=this.context.length-1;t>=0;t--)if(e.context[t].generator)return!0;return!1},ce.updateContext=function(e){var t,n=this.type;n.keyword&&e==F.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},F.parenR.updateContext=F.braceR.updateContext=function(){if(1==this.context.length)return void(this.exprAllowed=!0);var e,t=this.context.pop();t===ue.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):t===ue.b_tmpl?this.exprAllowed=!0:this.exprAllowed=!t.isExpr},F.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr),this.exprAllowed=!0},F.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl),this.exprAllowed=!0},F.parenL.updateContext=function(e){var t=e===F._if||e===F._for||e===F._with||e===F._while;this.context.push(t?ue.p_stat:ue.p_expr),this.exprAllowed=!0},F.incDec.updateContext=function(){},F._function.updateContext=function(e){e.beforeExpr&&e!==F.semi&&e!==F._else&&(e!==F.colon&&e!==F.braceL||this.curContext()!==ue.b_stat)&&this.context.push(ue.f_expr),this.exprAllowed=!1},F.backQuote.updateContext=function(){this.curContext()===ue.q_tmpl?this.context.pop():this.context.push(ue.q_tmpl),this.exprAllowed=!1},F.star.updateContext=function(e){e==F._function&&(this.curContext()===ue.f_expr?this.context[this.context.length-1]=ue.f_expr_gen:this.context.push(ue.f_gen)),this.exprAllowed=!0},F.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var le=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new q(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},pe=W.prototype,he="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);pe.next=function(){this.options.onToken&&this.options.onToken(new le(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pe.getToken=function(){return this.next(),new le(this)},"undefined"!=typeof Symbol&&(pe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===F.eof,value:t}}}}),pe.curContext=function(){return this.context[this.context.length-1]},pe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(F.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},pe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},pe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},pe.skipBlockComment=function(){var e=this,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){O.lastIndex=n;for(var i;(i=O.exec(this.input))&&i.index<this.pos;)++e.curLine,e.lineStart=i.index+i[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,r),n,this.pos,t,this.curPosition())},pe.skipLineComment=function(e){for(var t=this,n=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++t.pos,i=t.input.charCodeAt(t.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(n+e,this.pos),n,this.pos,r,this.curPosition())},pe.skipSpace=function(){var e=this;e:for(;this.pos<this.input.length;){var t=e.input.charCodeAt(e.pos);switch(t){case 32:case 160:++e.pos;break;case 13:10===e.input.charCodeAt(e.pos+1)&&++e.pos;case 10:case 8232:case 8233:++e.pos,e.options.locations&&(++e.curLine,e.lineStart=e.pos);break;case 47:switch(e.input.charCodeAt(e.pos+1)){case 42:e.skipBlockComment();break;case 47:e.skipLineComment(2);break;default:break e}break;default:if(!(t>8&&t<14||t>=5760&&B.test(String.fromCharCode(t))))break e;++e.pos}}},pe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},pe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(F.ellipsis)):(++this.pos,this.finishToken(F.dot))},pe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(F.assign,2):this.finishOp(F.slash,1)},pe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?F.star:F.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,r=F.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(F.assign,n+1):this.finishOp(r,n)},pe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?F.logicalOR:F.logicalAND,2):61===t?this.finishOp(F.assign,2):this.finishOp(124===e?F.bitwiseOR:F.bitwiseAND,1)},pe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(F.assign,2):this.finishOp(F.bitwiseXOR,1)},pe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&$.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(F.incDec,2):61===t?this.finishOp(F.assign,2):this.finishOp(F.plusMin,1)},pe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(F.assign,n+1):this.finishOp(F.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(F.relational,n))},pe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(F.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(F.arrow)):this.finishOp(61===e?F.eq:F.prefix,1)},pe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(F.parenL);case 41:return++this.pos,this.finishToken(F.parenR);case 59:return++this.pos,this.finishToken(F.semi);case 44:return++this.pos,this.finishToken(F.comma);case 91:return++this.pos,this.finishToken(F.bracketL);case 93:return++this.pos,this.finishToken(F.bracketR);case 123:return++this.pos,this.finishToken(F.braceL);case 125:return++this.pos,this.finishToken(F.braceR);case 58:return++this.pos,this.finishToken(F.colon);case 63:return++this.pos,this.finishToken(F.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(F.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(F.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},pe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var fe=!!f("￿","u");pe.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if($.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var s=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),a=s,u="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(r,"Invalid regular expression flag"),o.indexOf("u")>=0&&(fe?u="u":(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return t=Number("0x"+t),t>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"}),a=a.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return he||(f(a,u,r,this),l=f(s,o)),this.finishToken(F.regexp,{pattern:s,flags:o,value:l})},pe.readInt=function(e,t){for(var n=this,r=this.pos,i=0,s=0,o=null==t?1/0:t;s<o;++s){var a,u=n.input.charCodeAt(n.pos);if((a=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;++n.pos,i=i*e+a}return this.pos===r||null!=t&&this.pos-r!==t?null:i},pe.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(F.num,t)},pe.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(s=this.input.charCodeAt(++this.pos),43!==s&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.pos);return r?o=parseFloat(a):i&&1!==a.length?/[89]/.test(a)||this.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(F.num,o)},pe.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},pe.readString=function(e){for(var t=this,n="",r=++this.pos;;){t.pos>=t.input.length&&t.raise(t.start,"Unterminated string constant");var i=t.input.charCodeAt(t.pos);if(i===e)break;92===i?(n+=t.input.slice(r,t.pos),n+=t.readEscapedChar(!1),r=t.pos):(o(i)&&t.raise(t.start,"Unterminated string constant"),++t.pos)}return n+=this.input.slice(r,this.pos++),this.finishToken(F.string,n)},pe.readTmplToken=function(){for(var e=this,t="",n=this.pos;;){e.pos>=e.input.length&&e.raise(e.start,"Unterminated template");var r=e.input.charCodeAt(e.pos);if(96===r||36===r&&123===e.input.charCodeAt(e.pos+1))return e.pos===e.start&&e.type===F.template?36===r?(e.pos+=2,e.finishToken(F.dollarBraceL)):(++e.pos,e.finishToken(F.backQuote)):(t+=e.input.slice(n,e.pos),e.finishToken(F.template,t));if(92===r)t+=e.input.slice(n,e.pos),t+=e.readEscapedChar(!0),n=e.pos;else if(o(r)){switch(t+=e.input.slice(n,e.pos),++e.pos,r){case 13:10===e.input.charCodeAt(e.pos)&&++e.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(r)}e.options.locations&&(++e.curLine,e.lineStart=e.pos),n=e.pos}else++e.pos}},pe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return d(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),
-this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},pe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},pe.readWord1=function(){var e=this;this.containsEsc=!1;for(var t="",i=!0,s=this.pos,o=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=e.fullCharCodeAtPos();if(r(a,o))e.pos+=a<=65535?1:2;else{if(92!==a)break;e.containsEsc=!0,t+=e.input.slice(s,e.pos);var u=e.pos;117!=e.input.charCodeAt(++e.pos)&&e.raise(e.pos,"Expecting Unicode escape sequence \\uXXXX"),++e.pos;var c=e.readCodePoint();(i?n:r)(c,o)||e.raise(u,"Invalid Unicode escape"),t+=d(c),s=e.pos}i=!1}return t+this.input.slice(s,this.pos)},pe.readWord=function(){var e=this.readWord1(),t=F.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=T[e]),this.finishToken(t,e)};e.version="5.0.3",e.parse=y,e.parseExpressionAt=m,e.tokenizer=g,e.addLooseExports=v,e.Parser=W,e.plugins=z,e.defaultOptions=U,e.Position=V,e.SourceLocation=q,e.getLineInfo=u,e.Node=se,e.TokenType=L,e.tokTypes=F,e.keywordTypes=T,e.TokContext=ae,e.tokContexts=ue,e.isIdentifierChar=r,e.isIdentifierStart=n,e.Token=le,e.isNewLine=o,e.lineBreak=$,e.lineBreakG=O,e.nonASCIIwhitespace=B,Object.defineProperty(e,"__esModule",{value:!0})})},{}],16:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r((e.acorn=e.acorn||{},e.acorn.walk=e.acorn.walk||{}))}(this,function(e){"use strict";function t(t,n,r,i,s){r||(r=e.base),function e(t,i,s){var o=s||t.type,a=n[o];r[o](t,i,e),a&&a(t,i)}(t,i,s)}function n(t,n,r,i){r||(r=e.base);var s=[];!function e(t,i,o){var a=o||t.type,u=n[a],c=t!=s[s.length-1];c&&s.push(t),r[a](t,i,e),u&&u(t,i||s,s),c&&s.pop()}(t,i)}function r(t,n,r,i,s){var o=r?e.make(r,i):i;!function e(t,n,r){o[r||t.type](t,n,e)}(t,n,s)}function i(e){return"string"==typeof e?function(t){return t==e}:e||function(){return!0}}function s(t,n,r,s,o,a){s=i(s),o||(o=e.base);try{!function e(t,i,a){var u=a||t.type;if((null==n||t.start<=n)&&(null==r||t.end>=r)&&o[u](t,i,e),(null==n||t.start==n)&&(null==r||t.end==r)&&s(u,t))throw new h(t,i)}(t,a)}catch(e){if(e instanceof h)return e;throw e}}function o(t,n,r,s,o){r=i(r),s||(s=e.base);try{!function e(t,i,o){var a=o||t.type;if(!(t.start>n||t.end<n)&&(s[a](t,i,e),r(a,t)))throw new h(t,i)}(t,o)}catch(e){if(e instanceof h)return e;throw e}}function a(t,n,r,s,o){r=i(r),s||(s=e.base);try{!function e(t,i,o){if(!(t.end<n)){var a=o||t.type;if(t.start>=n&&r(a,t))throw new h(t,i);s[a](t,i,e)}}(t,o)}catch(e){if(e instanceof h)return e;throw e}}function u(t,n,r,s,o){r=i(r),s||(s=e.base);var a;return function e(t,i,o){if(!(t.start>n)){var u=o||t.type;t.end<=n&&(!a||a.node.end<t.end)&&r(u,t)&&(a=new h(t,i)),s[u](t,i,e)}}(t,o),a}function c(t,n){n||(n=e.base);var r=f(n);for(var i in t)r[i]=t[i];return r}function l(e,t,n){n(e,t)}function p(e,t,n){}var h=function(e,t){this.node=e,this.state=t},f=Object.create||function(e){function t(){}return t.prototype=e,new t},d={};d.Program=d.BlockStatement=function(e,t,n){for(var r=0;r<e.body.length;++r)n(e.body[r],t,"Statement")},d.Statement=l,d.EmptyStatement=p,d.ExpressionStatement=d.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},d.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},d.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},d.BreakStatement=d.ContinueStatement=p,d.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},d.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r<e.cases.length;++r){var i=e.cases[r];i.test&&n(i.test,t,"Expression");for(var s=0;s<i.consequent.length;++s)n(i.consequent[s],t,"Statement")}},d.ReturnStatement=d.YieldExpression=d.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},d.ThrowStatement=d.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},d.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},d.CatchClause=function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},d.WhileStatement=d.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},d.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},d.ForInStatement=d.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},d.ForInit=function(e,t,n){"VariableDeclaration"==e.type?n(e,t):n(e,t,"Expression")},d.DebuggerStatement=p,d.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},d.VariableDeclaration=function(e,t,n){for(var r=0;r<e.declarations.length;++r)n(e.declarations[r],t)},d.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},d.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0;r<e.params.length;r++)n(e.params[r],t,"Pattern");n(e.body,t,e.expression?"ScopeExpression":"ScopeBody")},d.ScopeBody=function(e,t,n){return n(e,t,"Statement")},d.ScopeExpression=function(e,t,n){return n(e,t,"Expression")},d.Pattern=function(e,t,n){"Identifier"==e.type?n(e,t,"VariablePattern"):"MemberExpression"==e.type?n(e,t,"MemberPattern"):n(e,t)},d.VariablePattern=p,d.MemberPattern=l,d.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},d.ArrayPattern=function(e,t,n){for(var r=0;r<e.elements.length;++r){var i=e.elements[r];i&&n(i,t,"Pattern")}},d.ObjectPattern=function(e,t,n){for(var r=0;r<e.properties.length;++r)n(e.properties[r].value,t,"Pattern")},d.Expression=l,d.ThisExpression=d.Super=d.MetaProperty=p,d.ArrayExpression=function(e,t,n){for(var r=0;r<e.elements.length;++r){var i=e.elements[r];i&&n(i,t,"Expression")}},d.ObjectExpression=function(e,t,n){for(var r=0;r<e.properties.length;++r)n(e.properties[r],t)},d.FunctionExpression=d.ArrowFunctionExpression=d.FunctionDeclaration,d.SequenceExpression=d.TemplateLiteral=function(e,t,n){for(var r=0;r<e.expressions.length;++r)n(e.expressions[r],t,"Expression")},d.UnaryExpression=d.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},d.BinaryExpression=d.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},d.AssignmentExpression=d.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},d.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},d.NewExpression=d.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0;r<e.arguments.length;++r)n(e.arguments[r],t,"Expression")},d.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},d.ExportNamedDeclaration=d.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"==e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},d.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},d.ImportDeclaration=function(e,t,n){for(var r=0;r<e.specifiers.length;r++)n(e.specifiers[r],t);n(e.source,t,"Expression")},d.ImportSpecifier=d.ImportDefaultSpecifier=d.ImportNamespaceSpecifier=d.Identifier=d.Literal=p,d.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t)},d.ClassDeclaration=d.ClassExpression=function(e,t,n){return n(e,t,"Class")},d.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression");for(var r=0;r<e.body.body.length;r++)n(e.body.body[r],t)},d.MethodDefinition=d.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")},e.simple=t,e.ancestor=n,e.recursive=r,e.findNodeAt=s,e.findNodeAround=o,e.findNodeAfter=a,e.findNodeBefore=u,e.make=c,e.base=d,Object.defineProperty(e,"__esModule",{value:!0})})},{}],17:[function(e,t,n){function r(){this._array=[],this._set=Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty;r.fromArray=function(e,t){for(var n=new r,i=0,s=e.length;i<s;i++)n.add(e[i],t);return n},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(e,t){var n=i.toSetString(e),r=s.call(this._set,n),o=this._array.length;r&&!t||this._array.push(e),r||(this._set[n]=o)},r.prototype.has=function(e){var t=i.toSetString(e);return s.call(this._set,t)},r.prototype.indexOf=function(e){var t=i.toSetString(e);if(s.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},n.ArraySet=r},{"./util":26}],18:[function(e,t,n){function r(e){return e<0?1+(-e<<1):0+(e<<1)}function i(e){var t=1==(1&e),n=e>>1;return t?-n:n}var s=e("./base64");n.encode=function(e){var t,n="",i=r(e);do{t=31&i,i>>>=5,i>0&&(t|=32),n+=s.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var r,o,a=e.length,u=0,c=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(32&o),o&=31,u+=o<<c,c+=5}while(r);n.value=i(u),n.rest=t}},{"./base64":19}],19:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],20:[function(e,t,n){function r(e,t,i,s,o,a){var u=Math.floor((t-e)/2)+e,c=o(i,s[u],!0);return 0===c?u:c>0?t-u>1?r(u,t,i,s,o,a):a==n.LEAST_UPPER_BOUND?t<s.length?t:-1:u:u-e>1?r(e,u,i,s,o,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,i,s){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,s||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],21:[function(e,t,n){function r(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){r(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=i},{"./util":26}],22:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,n,o){if(n<o){var a=i(n,o),u=n-1;r(e,a,o);for(var c=e[o],l=n;l<o;l++)t(e[l],c)<=0&&(u+=1,r(e,u,l));r(e,u+1,l);var p=u+1;s(e,t,n,p-1),s(e,t,p+1,o)}}n.quickSort=function(e,t){s(e,t,0,e.length-1)}},{}],23:[function(e,t,n){function r(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new o(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=a.getArg(t,"version"),r=a.getArg(t,"sources"),i=a.getArg(t,"names",[]),s=a.getArg(t,"sourceRoot",null),o=a.getArg(t,"sourcesContent",null),u=a.getArg(t,"mappings"),l=a.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=c.fromArray(i.map(String),!0),this._sources=c.fromArray(r,!0),this.sourceRoot=s,this.sourcesContent=o,this._mappings=u,this.file=l}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function o(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=a.getArg(t,"version"),i=a.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new c,this._names=new c;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=a.getArg(e,"offset"),n=a.getArg(t,"line"),i=a.getArg(t,"column");if(n<s.line||n===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new r(a.getArg(e,"map"))}})}var a=e("./util"),u=e("./binary-search"),c=e("./array-set").ArraySet,l=e("./base64-vlq"),p=e("./quick-sort").quickSort;r.fromSourceMap=function(e){return i.fromSourceMap(e)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},r.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(e,t,n){var i,s=t||null,o=n||r.GENERATED_ORDER;switch(o){case r.GENERATED_ORDER:i=this._generatedMappings;break;case r.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=a.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},r.prototype.allGeneratedPositionsFor=function(e){var t=a.getArg(e,"line"),n={source:a.getArg(e,"source"),originalLine:t,originalColumn:a.getArg(e,"column",0)};if(null!=this.sourceRoot&&(n.source=a.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var r=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var o=s.originalLine;s&&s.originalLine===o;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,i.prototype=Object.create(r.prototype),i.prototype.consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=c.fromArray(e._names.toArray(),!0),r=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],h=0,f=o.length;h<f;h++){var d=o[h],y=new s;y.generatedLine=d.generatedLine,y.generatedColumn=d.generatedColumn,d.source&&(y.source=r.indexOf(d.source),y.originalLine=d.originalLine,y.originalColumn=d.originalColumn,d.name&&(y.name=n.indexOf(d.name)),l.push(y)),u.push(y)}return p(t.__originalMappings,a.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var n,r,i,o,u,c=1,h=0,f=0,d=0,y=0,m=0,g=e.length,v=0,b={},x={},w=[],E=[];v<g;)if(";"===e.charAt(v))c++,v++,h=0;else if(","===e.charAt(v))v++;else{for(n=new s,n.generatedLine=c,o=v;o<g&&!this._charIsMappingSeparator(e,o);o++);if(r=e.slice(v,o),i=b[r])v+=r.length;else{for(i=[];v<o;)l.decode(e,v,x),u=x.value,v=x.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[r]=i}n.generatedColumn=h+i[0],h=n.generatedColumn,i.length>1&&(n.source=y+i[1],y+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&w.push(n)}p(E,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,p(w,a.compareByOriginalPositions),this.__originalMappings=w},i.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=a.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=a.join(this.sourceRoot,s)));var o=a.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:a.getArg(i,"originalLine",null),column:a.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=a.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var n={source:t,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,o.prototype=Object.create(r.prototype),o.prototype.constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),o.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},n=u.search(t,this._sections,function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n||e.generatedColumn-t.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},o.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],i=r.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer.sources.indexOf(a.getArg(e,"source"))){var r=n.consumer.generatedPositionFor(e);if(r){return{line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},o.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],i=r.consumer._generatedMappings,s=0;s<i.length;s++){var o=i[s],u=r.consumer._sources.at(o.source);null!==r.consumer.sourceRoot&&(u=a.join(r.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var c=r.consumer._names.at(o.name);this._names.add(c),c=this._names.indexOf(c);var l={source:u,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(l),"number"==typeof l.originalLine&&this.__originalMappings.push(l)}p(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),p(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=o},{"./array-set":17,"./base64-vlq":18,"./binary-search":20,"./quick-sort":22,"./util":26}],24:[function(e,t,n){function r(e){e||(e={}),this._file=s.getArg(e,"file",null),this._sourceRoot=s.getArg(e,"sourceRoot",null),this._skipValidation=s.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new a,this._sourcesContents=null}var i=e("./base64-vlq"),s=e("./util"),o=e("./array-set").ArraySet,a=e("./mapping-list").MappingList;r.prototype._version=3,r.fromSourceMap=function(e){var t=e.sourceRoot,n=new r({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=s.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)}),n},r.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),n=s.getArg(e,"original",null),r=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},r.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=s.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var i=this._sourceRoot;null!=i&&(r=s.relative(i,r));var a=new o,u=new o;this._mappings.unsortedForEach(function(t){if(t.source===r&&null!=t.originalLine){var o=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=o.source&&(t.source=o.source,null!=n&&(t.source=s.join(n,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=o.line,t.originalColumn=o.column,null!=o.name&&(t.name=o.name))}var c=t.source;null==c||a.has(c)||a.add(c);var l=t.name;null==l||u.has(l)||u.add(l)},this),this._sources=a,this._names=u,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=s.join(n,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,r))},this)},r.prototype._validateMapping=function(e,t,n,r){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r,o=0,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d<y;d++){if(t=f[d],e="",t.generatedLine!==a)for(o=0;t.generatedLine!==a;)e+=";",a++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=i.encode(r-p),p=r,e+=i.encode(t.originalLine-1-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var n=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":17,"./base64-vlq":18,"./mapping-list":21,"./util":26}],25:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[o]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=n?s.join(n,e.source):e.source;o.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new r,a=e.split(/(\r?\n)/),u=function(){return a.shift()+(a.shift()||"")},c=1,l=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(c<e.generatedLine)){var t=a[0],n=t.substr(0,e.generatedColumn-l);return a[0]=t.substr(e.generatedColumn-l),l=e.generatedColumn,i(p,n),void(p=e)}i(p,u()),c++,l=0}for(;c<e.generatedLine;)o.add(u()),c++;if(l<e.generatedColumn){var t=a[0];o.add(t.substr(0,e.generatedColumn)),a[0]=t.substr(e.generatedColumn),l=e.generatedColumn}p=e},this),a.length>0&&(p&&i(p,u()),o.add(a.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=s.join(n,e)),o.setSourceContent(e,r))}),o},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[o]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},r.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[o]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},r.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},r.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][o]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;t<n;t++)e(s.fromSetString(r[t]),this.sourceContents[r[t]])},r.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},r.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new i(e),r=!1,s=null,o=null,a=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&o===i.line&&a===i.column&&u===i.name||n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,o=i.line,a=i.column,u=i.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,r=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===l?(s=null,r=!1):r&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},n.SourceNode=r},{"./source-map-generator":24,"./util":26}],26:[function(e,t,n){function r(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')}function i(e){var t=e.match(g);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function s(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var t=e,r=i(e);if(r){if(!r.path)return e;t=r.path}for(var o,a=n.isAbsolute(t),u=t.split(/\/+/),c=0,l=u.length-1;l>=0;l--)o=u[l],"."===o?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return t=u.join("/"),""===t&&(t=a?"/":"."),r?(r.path=t,s(r)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),r=i(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),s(n);if(n||t.match(v))return t;if(r&&!r.host&&!r.path)return r.host=t,s(r);var a="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=a,s(r)):a}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)}function c(e){return e}function l(e){return h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1
-;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function f(e,t,n){var r=e.source-t.source;return 0!==r?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)||n?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:(r=e.generatedLine-t.generatedLine,0!==r?r:e.name-t.name)}function d(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)||n?r:0!==(r=e.source-t.source)?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:e.name-t.name)}function y(e,t){return e===t?0:e>t?1:-1}function m(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=y(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:y(e.name,t.name))}n.getArg=r;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;n.urlParse=i,n.urlGenerate=s,n.normalize=o,n.join=a,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},n.relative=u;var b=function(){return!("__proto__"in Object.create(null))}();n.toSetString=b?c:l,n.fromSetString=b?c:p,n.compareByOriginalPositions=f,n.compareByGeneratedPositionsDeflated=d,n.compareByGeneratedPositionsInflated=m},{}],27:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":23,"./lib/source-map-generator":24,"./lib/source-node":25}],28:[function(e,t,n){t.exports={_args:[[{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv-v4"]],_from:"nodent@>=3.0.17 <4.0.0",_id:"nodent@3.0.17",_inCache:!0,_location:"/nodent",_nodeVersion:"6.9.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/nodent-3.0.17.tgz_1490780005669_0.5196401283610612"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz",_shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",_shrinkwrap:null,_spec:"nodent@^3.0.17",_where:"/Users/evgenypoberezkin/JSON/ajv-v4",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bin:{nodentjs:"./nodent.js"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","nodent-runtime":">=3.0.4",resolve:"^1.2.0","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",tarball:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz"},engines:"node >= 0.10.0",gitHead:"1a48bd0e8d0b4df69aa7b4b3cf8483c03c1cfbd5",homepage:"https://github.com/MatAtBread/nodent#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"nodent.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent.git"},scripts:{cover:"istanbul cover ./nodent.js tests -- --quick --syntax ; open ./coverage/lcov-report/index.html",start:"./nodent.js",test:"cd tests && npm i --prod && cd .. && node --expose-gc ./nodent.js tests --syntax --quick && node --expose-gc ./nodent.js tests --quick --notStrict","test-loader":"cd tests/loader/app && npm test && cd ../../.."},version:"3.0.17"}},{}],29:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o=s>=0?arguments[s]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),s="/"===o(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),a=o,u=0;u<o;u++)if(i[u]!==s[u]){a=u;break}for(var c=[],u=a;u<i.length;u++)c.push("..");return c=c.concat(s.slice(a)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=s(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=s(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return s(e)[3]};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:31}],30:[function(e,t,n){(function(e){"use strict";function n(e){var t=s.exec(e),n=(t[1]||"")+(t[2]||""),r=t[3]||"",i=o.exec(r);return[n,i[1],i[2],i[3]]}function r(e){return u.exec(e).slice(1)}var i="win32"===e.platform,s=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,o=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,a={};a.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=n(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}};var u=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,c={};c.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=r(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},t.exports=i?a.parse:c.parse,t.exports.posix=c.parse,t.exports.win32=a.parse}).call(this,e("_process"))},{_process:31}],31:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function o(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?y=d.concat(y):g=-1,y.length&&u())}function u(){if(!m){var e=s(a);m=!0;for(var t=y.length;t;){for(d=y,y=[];++g<t;)d&&d[g].run();g=-1,t=y.length}d=null,m=!1,o(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var p,h,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(e){p=r}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,y=[],m=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];y.push(new c(e,t)),1!==y.length||m||s(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],32:[function(e,t,n){var r=e("./lib/core");n=t.exports=e("./lib/async"),n.core=r,n.isCore=function(e){return r[e]},n.sync=e("./lib/sync")},{"./lib/async":33,"./lib/core":36,"./lib/sync":38}],33:[function(e,t,n){(function(n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");t.exports=function(e,t,u){function c(t,n,r){t?d(t):n?d(null,n,r):h(w,function(t,n,r){if(t)d(t);else if(n)d(null,n,r);else{var i=new Error("Cannot find module '"+e+"' from '"+x+"'");i.code="MODULE_NOT_FOUND",d(i)}})}function l(e,t,n){function r(e,t,n){function o(o,c,l){if(n=c,o)return i(o);if(l&&n&&y.pathFilter){var p=s.relative(l,u),h=p.slice(0,p.length-e[0].length),f=y.pathFilter(n,t,h);if(f)return r([""].concat(b.slice()),s.resolve(l,f),n)}g(u,a)}function a(s,o){s?i(s):o?i(null,u,n):r(e.slice(1),t,n)}if(0===e.length)return i(null,void 0,n);var u=t+e[0];n?o(null,n):p(s.dirname(u),o)}var i=n;"function"==typeof t&&(i=t,t=void 0),r([""].concat(b),e,t)}function p(e,t){if(""===e||"/"===e)return t(null);if("win32"===n.platform&&/^\w:[\\\/]*$/.test(e))return t(null);if(/[\\\/]node_modules[\\\/]*$/.test(e))return t(null);var r=s.join(e,"package.json");g(r,function(n,i){if(!i)return p(s.dirname(e),t);v(r,function(n,i){n&&t(n);try{var s=JSON.parse(i)}catch(e){}s&&y.packageFilter&&(s=y.packageFilter(s,r)),t(null,s,e)})})}function h(e,t,n){var r=n;"function"==typeof t&&(r=t,t=y.package);var i=s.join(e,"package.json");g(i,function(n,o){return n?r(n):o?void v(i,function(t,n){if(t)return r(t);try{var o=JSON.parse(n)}catch(e){}if(y.packageFilter&&(o=y.packageFilter(o,i)),o.main)return"."!==o.main&&"./"!==o.main||(o.main="index"),void l(s.resolve(e,o.main),o,function(t,n,i){return t?r(t):n?r(null,n,i):i?void h(s.resolve(e,i.main),i,function(t,n,i){return t?r(t):n?r(null,n,i):void l(s.join(e,"index"),i,r)}):l(s.join(e,"index"),i,r)});l(s.join(e,"/index"),o,r)}):l(s.join(e,"index"),t,r)})}function f(t,n){function r(n,r,a){return n?t(n):r?t(null,r,a):void h(s.join(o,e),void 0,i)}function i(e,r,i){return e?t(e):r?t(null,r,i):void f(t,n.slice(1))}if(0===n.length)return t(null,void 0);var o=n[0];l(s.join(o,e),void 0,r)}var d=u,y=t||{};if("function"==typeof y&&(d=y,y={}),"string"!=typeof e){var m=new TypeError("path must be a string");return n.nextTick(function(){d(m)})}var g=y.isFile||function(e,t){i.stat(e,function(e,n){e&&"ENOENT"===e.code?t(null,!1):e?t(e):t(null,n.isFile()||n.isFIFO())})},v=y.readFile||i.readFile,b=y.extensions||[".js"],x=y.basedir||s.dirname(o());if(y.paths=y.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(e)){var w=s.resolve(x,e);".."===e&&(w+="/"),/\/$/.test(e)&&w===x?h(w,y.package,c):l(w,y.package,c)}else!function(e,t,n){f(n,a(t,y))}(0,x,function(t,n,i){if(t)d(t);else if(n)d(null,n,i);else{if(r[e])return d(null,e);var s=new Error("Cannot find module '"+e+"' from '"+x+"'");s.code="MODULE_NOT_FOUND",d(s)}})}}).call(this,e("_process"))},{"./caller.js":34,"./core":36,"./node-modules-paths.js":37,_process:31,fs:5,path:29}],34:[function(e,t,n){t.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=(new Error).stack;return Error.prepareStackTrace=e,t[2].getFileName()}},{}],35:[function(e,t,n){t.exports={"*":["assert","buffer_ieee754","buffer","child_process","cluster","console","constants","crypto","_debugger","dgram","dns","domain","events","freelist","fs","http","https","_linklist","module","net","os","path","punycode","querystring","readline","repl","stream","string_decoder","sys","timers","tls","tty","url","util","vm","zlib"],.11:["_http_server"],"1.0":["process","v8"]}},{}],36:[function(e,t,n){(function(n){var r=n.versions&&n.versions.node&&n.versions.node.split(".")||[],i=e("./core.json"),s={};for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&function(e){if("*"===e)return!0;for(var t=e.split("."),n=0;n<3;++n)if((r[n]||0)>=(t[n]||0))return!0;return!1}(o))for(var a=0;a<i[o].length;++a)s[i[o][a]]=!0;t.exports=s}).call(this,e("_process"))},{"./core.json":35,_process:31}],37:[function(e,t,n){var r=e("path"),i=r.parse||e("path-parse");t.exports=function(e,t){var n=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];e=r.resolve(e);var s="/";/^([A-Za-z]:)/.test(e)?s="":/^\\\\/.test(e)&&(s="\\\\");for(var o=[e],a=i(e);a.dir!==o[o.length-1];)o.push(a.dir),a=i(a.dir);var u=o.reduce(function(e,t){return e.concat(n.map(function(e){return r.join(s,t,e)}))},[]);return t&&t.paths?u.concat(t.paths):u}},{path:29,"path-parse":30}],38:[function(e,t,n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");t.exports=function(e,t){function n(e){if(l(e))return e;for(var t=0;t<h.length;t++){var n=e+h[t];if(l(n))return n}}function u(e){var t=s.join(e,"/package.json");if(l(t)){var r=p(t,"utf8");try{var i=JSON.parse(r);if(c.packageFilter&&(i=c.packageFilter(i,e)),i.main){var o=n(s.resolve(e,i.main));if(o)return o;var a=u(s.resolve(e,i.main));if(a)return a}}catch(e){}}return n(s.join(e,"/index"))}var c=t||{},l=c.isFile||function(e){try{var t=i.statSync(e)}catch(e){if(e&&"ENOENT"===e.code)return!1;throw e}return t.isFile()||t.isFIFO()},p=c.readFileSync||i.readFileSync,h=c.extensions||[".js"],f=c.basedir||s.dirname(o());if(c.paths=c.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(e)){var d=s.resolve(f,e);".."===e&&(d+="/");var y=n(d)||u(d);if(y)return y}else{var m=function(e,t){for(var r=a(t,c),i=0;i<r.length;i++){var o=r[i],l=n(s.join(o,"/",e));if(l)return l;var p=u(s.join(o,"/",e));if(p)return p}}(e,f);if(m)return m}if(r[e])return e;var g=new Error("Cannot find module '"+e+"' from '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}},{"./caller.js":34,"./core":36,"./node-modules-paths.js":37,fs:5,path:29}],nodent:[function(e,t,n){(function(n,r,i,s,o,a,u,c){"use strict";function l(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}function p(e){throw e}function h(){}function f(e){return"ExpressionStatement"===e.type&&("StringLiteral"===e.expression.type||"Literal"===e.expression.type&&"string"==typeof e.expression.value)}function d(t,n,r){n||(n=console.warn.bind(console));var i,s,o={};if("string"==typeof t)(i=t.match(j))&&(s=i[1]||"default");else for(var a=0;a<t.body.length&&f(t.body[a].type);a++){var u="'"+t.body[a].value+"'";if(i=u.match(j)){s=i[1]||"default";break}}if(!i){if(!R.noUseDirective)return null;s="default",i=[null,null,"{}"]}if(s)try{r?e("fs").lstatSync(r).isDirectory()||(r=e("path").dirname(r)):r=e("path").resolve(".");var c=e("resolve").sync("package.json",{moduleDirectory:[""],extensions:[""],basedir:r}),p=JSON.parse(N.readFileSync(c)).nodent.directive[s]}catch(e){}try{o=l([I[s],p,i[2]&&JSON.parse(i[2])])}catch(e){n("Invalid literal compiler option: "+(i&&i[0]||"<no options found>"))}return o.promises||o.es7||o.generators||o.engine?((o.promises||o.es7)&&o.generators&&(n("No valid 'use nodent' directive, assumed -es7 mode"),o=I.es7),(o.generators||o.engine)&&(o.promises=!0),o.promises&&(o.es7=!0),o):null}function y(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function m(e){var t;return t=e instanceof i?e:new i(e.toString(),"binary"),t.toString("base64")}function g(e,t){return t=t||e.log,function(n,r,i){var s=y(N.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||d(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function v(e){return e=e||q,function(t,n,r){if(Array.isArray(n)){var i=n;n=function(e,t){return i.indexOf(e)>=0}}else n=n||function(e,t){return!(e.match(/Sync$/)&&e.replace(/Sync$/,"")in t)};r||(r="");var s=Object.create(t);for(var o in s)!function(){var i=o;try{"function"!=typeof t[i]||s[i+r]&&s[i+r].isAsync||!n(i,s)||(s[i+r]=function(){var n=Array.prototype.slice.call(arguments);return new e(function(e,r){var s=function(t,n){if(t)return r(t);switch(arguments.length){case 0:return e();case 2:return e(n);default:return e(Array.prototype.slice.call(arguments,1))}};n.length>t[i].length?n.push(s):n[t[i].length-1]=s;t[i].apply(t,n)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function b(t,n){var r=t.filename.split("/"),i=r.pop(),s=T(t.ast,n&&n.sourcemap?{map:{startLine:n.mapStartLine||0,file:i+"(original)",sourceMapRoot:r.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(n&&n.sourcemap)try{var o="",a=s.map.toJSON();if(a){var u=e("source-map").SourceMapConsumer;t.sourcemap=a,P[t.filename]={map:a,smc:new u(a)},o="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+m(JSON.stringify(a))+"\n"}t.code=s.code+o}catch(e){t.code=s}else t.code=s;return t}function x(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=F.parse(i.origCode,r&&r.parser),r.babelTree&&F.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace($.babelLiteralNode(e.value)):"Property"===e.type&&("ClassBody"===n[0].parent.type?e.type="ClassProperty":e.type="ObjectProperty"),t()}),i}catch(e){if(e instanceof SyntaxError){var s=i.origCode.substr(e.pos-e.loc.column);s=s.split("\n")[0],e.message+=" "+t+" (nodent)\n"+s+"\n"+s.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}}function w(t,n){n=n||{};var r=t+"|"+Object.keys(n).sort().reduce(function(e,t){return e+t+JSON.stringify(n[t])},"");return this.covers[r]||(t.indexOf("/")>=0?this.covers[r]=e(t):this.covers[r]=e(c+"/covers/"+t)),this.covers[r](this,n)}function E(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n),r=r||{};for(var i in R)i in r||(r[i]=R[i]);var s=this.parse(e,t,null,r);return this.asynchronize(s,null,r,this.log||h),this.prettyPrint(s,r),s}function S(t,n,r){var i={},s=this;n||(n=/\.njs$/),r?r.compiler||(r.compiler={}):r={compiler:{}};var o=l([B,r.compiler]);return function(a,u,c){function l(e){u.statusCode=500,u.write(e.toString()),u.end()}if(i[a.url])return u.setHeader("Content-Type",i[a.url].contentType),r.setHeaders&&r.setHeaders(u),u.write(i[a.url].output),void u.end();if(!(a.url.match(n)||r.htmlScriptRegex&&a.url.match(r.htmlScriptRegex)))return c&&c();var p=t+a.url;if(r.extensions&&!N.existsSync(p))for(var h=0;h<r.extensions.length;h++)if(N.existsSync(p+"."+r.extensions[h])){p=p+"."+r.extensions[h];break}N.readFile(p,function(t,n){if(t)return l(t);try{var c,p;r.htmlScriptRegex&&a.url.match(r.htmlScriptRegex)?(c=e("./htmlScriptParser")(s,n.toString(),a.url,r),p="text/html"):(r.runtime?(c="Function.prototype."+o.$asyncbind+" = "+D.toString()+";",o.generators&&(c+="Function.prototype."+o.$asyncspawn+" = "+V.toString()+";"),o.wrapAwait&&!o.promises&&(c+="Object."+o.$makeThenable+" = "+q.resolve.toString()+";"),o.mapStartLine=c.split("\n").length,c+="\n"):c="",c+=s.compile(n.toString(),a.url,null,o).code,p="application/javascript"),u.setHeader("Content-Type",p),r.enableCache&&(i[a.url]={output:c,contentType:p}),r.setHeaders&&r.setHeaders(u),u.write(c),u.end()}catch(e){return l(e)}})}}function k(e){this.covers={},this._ident=k.prototype.version+"_"+Math.random(),this.setOptions(e)}function A(e,t){function n(e){var t=e.getFileName();if(t&&P[t]){var n=P[t].smc.originalPositionFor({line:e.getLineNumber(),column:e.getColumnNumber()});if(n&&n.line){var r=e.toString();return"\n at "+r.substring(0,r.length-1)+" => …"+n.source+":"+n.line+":"+n.column+(e.getFunctionName()?")":"")}}return"\n at "+e}return e+t.map(n).join("")}function _(e){var t={};t[R.$asyncbind]={value:D,writable:!0,enumerable:!1,configurable:!0},t[R.$asyncspawn]={value:V,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}R[R.$error]in r||(r[R[R.$error]]=p),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return v(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return q.isThenable(this)},writable:!0,configurable:!0}}),Object[R.$makeThenable]=q.resolve}function C(t){function n(e,t){e=e.split("."),t=t.split(".");for(var n=0;n<3;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0}function r(i,s){if(!s.match(/nodent\/nodent\.js$/)){if(s.match(/node_modules\/nodent\/.*\.js$/))return L(i,s);for(var u=0;u<o.length;u++)if(s.slice(0,o[u].path.length)==o[u].path){if(o[u].jsCompiler){if(o[u].jsCompiler===r)break;return o[u].jsCompiler.apply(this,arguments)}return L(i,s)}var c=y(N.readFileSync(s,"utf8")),l=d(c,t.log,s);return l?a(i,s,l):L(i,s)}var p={path:s.replace(/\/node_modules\/nodent\/nodent\.js$/,"")};p.path&&(p.version=JSON.parse(N.readFileSync(s.replace(/nodent\.js$/,"package.json"))).version,L(i,s),n(p.version,k.prototype.version)<0&&(p.originalNodentLoader=i.exports,i.exports=function(){var n=e.extensions[".js"],r=p.originalNodentLoader.apply(this,arguments);return p.jsCompiler=e.extensions[".js"],e.extensions[".js"]=n,_(t),r},Object.keys(p.originalNodentLoader).forEach(function(e){i.exports[e]=p.originalNodentLoader[e]}),o.push(p),o=o.sort(function(e,t){return t.path.length-e.path.length})))}function i(n){if(Array.isArray(n))return n.forEach(i);if(e.extensions[n]){Object.keys(t).filter(function(e){return U[e]!=t[e]}).length&&t.log("File extension "+n+" already configured for async/await compilation.")}e.extensions[n]=g(U,t.log)}if(t){for(var s in t)if("use"!==s&&!O.hasOwnProperty(s))throw new Error("NoDent: unknown option: "+s+"="+JSON.stringify(t[s]))}else t={};U?U.setOptions(t):(Object.keys(O).forEach(function(e){e in t||(t[e]=O[e])}),U=new k(t)),t.dontMapStackTraces||(Error.prepareStackTrace=A),_(t);var o=[];if(!t.dontInstallRequireHook){if(!L){L=e.extensions[".js"];var a=g(U,t.log);e.extensions[".js"]=r}t.extension&&i(t.extension)}return t.use&&(Array.isArray(t.use)?(t.log("Warning: nodent({use:[...]}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),t.use.length&&t.use.forEach(function(e){U[e]=U.require(e)})):(t.log("Warning: nodent({use:{...}}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),Object.keys(t.use).forEach(function(e){U[e]=U.require(e,t.use[e])}))),U}var L,P={},N=e("fs"),T=e("./lib/output"),F=e("./lib/parser"),$=e("./lib/arboriculture"),O={log:function(e){console.warn("Nodent: "+e)},augmentObject:!1,extension:".njs",dontMapStackTraces:!1,asyncStackTrace:!1,babelTree:!1,dontInstallRequireHook:!1},B={noRuntime:!1,lazyThenables:!1,es6target:!1,noUseDirective:!1,wrapAwait:null,mapStartLine:0,sourcemap:!0,engine:!1,parser:{sourceType:"script"},$return:"$return",$error:"$error",$arguments:"$args",$asyncspawn:"$asyncspawn",$asyncbind:"$asyncbind",generatedSymbolPrefix:"$",$makeThenable:"$makeThenable"},R=Object.create(B,{es7:{value:!0,writable:!0,enumerable:!0}}),I={default:R,es7:Object.create(R),promise:Object.create(R,{promises:{value:!0,writable:!0,enumerable:!0}}),generator:Object.create(R,{generators:{value:!0,writable:!0,enumerable:!0},es7:{value:!1,writable:!0,enumerable:!0}}),engine:Object.create(R,{engine:{value:!0,writable:!0,enumerable:!0},promises:{value:!0,writable:!0,enumerable:!0}})};I.promises=I.promise,I.generators=I.generator;var j=/^\s*['"]use\s+nodent-?([a-zA-Z0-9]*)?(\s*.*)?['"]\s*;/,M=e("nodent-runtime"),D=M.$asyncbind,V=M.$asyncspawn,q=D.Thenable;k.prototype.setOptions=function(e){return this.log=!1===e.log?h:e.log||this.log,this.options=l([this.options,e]),delete this.options.log,this},D.call(D),k.prototype.version=e("./package.json").version,k.prototype.Thenable=q,k.prototype.EagerThenable=D.EagerThenableFactory,k.prototype.isThenable=function(e){return e&&e instanceof Object&&"function"==typeof e.then},k.prototype.asyncify=v,k.prototype.require=w,k.prototype.generateRequestHandler=S,k.prototype.$asyncspawn=V,k.prototype.$asyncbind=D,k.prototype.parse=x,k.prototype.compile=E,k.prototype.asynchronize=$.asynchronize,k.prototype.prettyPrint=b,k.prototype.parseCompilerOptions=d,k.prototype.getDefaultCompileOptions=void 0,Object.defineProperty(k.prototype,"Promise",{get:function(){return initOpts.log("Warning: nodent.Promise is deprecated. Use nodent.Thenable instead"),q},enumerable:!1,configurable:!1});var U;C.setDefaultCompileOptions=function(e,t){return e&&Object.keys(e).forEach(function(t){if(!(t in R))throw new Error("NoDent: unknown compiler option: "+t);R[t]=e[t]}),t&&Object.keys(t).forEach(function(e){if(!(e in t))throw new Error("NoDent: unknown configuration option: "+e);O[e]=t[e]}),C},C.setCompileOptions=function(e,t){return optionSet[e]=optionSet[e]||l([R]),t&&Object.keys(t).forEach(function(n){if(!(n in R))throw new Error("NoDent: unknown compiler option: "+n);optionSet[e][n]=t[n]}),C},C.asyncify=v,C.Thenable=D.Thenable,C.EagerThenable=D.EagerThenableFactory,t.exports=C,e.main===t&&n.argv.length>=3&&function(){function t(e,t){try{var n,s;if(o.fromast){if(e=JSON.parse(e),n={origCode:"",filename:i,ast:e},!(s=d(e,a.log))){var u=o.use?'"use nodent-'+o.use+'";':'"use nodent";';s=d(u,a.log),console.warn("/* "+i+": No 'use nodent*' directive, assumed "+u+" */")}}else s=d(o.use?'"use nodent-'+o.use+'";':e,a.log),s||(s=d('"use nodent";',a.log),o.dest||console.warn("/* "+i+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),n=a.parse(e,i,s);if(o.parseast||o.pretty||a.asynchronize(n,void 0,s,a.log),a.prettyPrint(n,s),o.out||o.pretty||o.dest){if(o.dest&&!t)throw new Error("Can't write unknown file to "+o.dest);var c="";o.runtime&&(c+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",c+="global.$error = global.$error || "+r.$error.toString()+";\n"),c+=n.code,t&&o.dest?(N.writeFileSync(o.dest+t,c),console.log("Compiled",o.dest+t)):console.log(c)}(o.minast||o.parseast)&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),o.ast&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]?void 0:t},0)),o.exec&&new Function(n.code)()}catch(e){console.error(e)}}var i,s=e("path"),o=(n.env.NODENT_OPTS&&JSON.parse(n.env.NODENT_OPTS),function(e){for(var t=[],r=e||2;r<n.argv.length;r++)if("--"===n.argv[r].slice(0,2)){var i=n.argv[r].slice(2).split("=");t[i[0]]=i[1]||!0}else t.push(n.argv[r]);return t}());C.setDefaultCompileOptions({sourcemap:o.sourcemap,wrapAwait:o.wrapAwait,lazyThenables:o.lazyThenables,noRuntime:o.noruntime,es6target:o.es6target,parser:o.noextensions?{noNodentExtensions:!0}:void 0});var a=C({augmentObject:!0});if(!(o.fromast||o.parseast||o.pretty||o.out||o.dest||o.ast||o.minast||o.exec))try{var u=s.resolve(o[0]);return e(u)}catch(e){throw e&&(e.message=o[0]+": "+e.message),e}if(0==o.length||"-"===o[0])return i="(stdin)",function(e){return new q(function(t,n){var r=[];e.on("data",function(e){r.push(e)}),e.on("end",function(){var e=r.map(function(e){return e.toString()}).join("");return t(e)}),e.on("error",n)}.$asyncbind(this))}(n.stdin).then(t,p);for(var c=0;c<o.length;c++)i=s.resolve(o[c]),t(y(N.readFileSync(i,"utf8")),o[c])}()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/nodent")},{"./htmlScriptParser":11,"./lib/arboriculture":12,"./lib/output":13,"./lib/parser":14,"./package.json":28,_process:31,buffer:6,fs:5,"nodent-runtime":8,path:29,resolve:32,"source-map":27}]},{},[]); \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/ajv/dist/regenerator.min.js b/node_modules/node-gyp/node_modules/ajv/dist/regenerator.min.js
deleted file mode 100644
index aade2b467..000000000
--- a/node_modules/node-gyp/node_modules/ajv/dist/regenerator.min.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* regenerator 0.9.7: Source transformer enabling ECMAScript 6 generator functions (yield) in JavaScript-of-today (ES5) */
-require=function e(t,r,n){function i(a,o){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},{}],2:[function(e,t,r){"use strict";function n(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}Object.defineProperty(t,"exports",{enumerable:!0,get:n})},{}],3:[function(e,t,r){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function i(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function s(e){return Object.prototype.toString.call(e)}function a(e){return!i(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function o(e){if(x.isFunction(e)){if(D)return e.name;var t=e.toString(),r=t.match(S);return r&&r[1]}}function u(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function l(e){if(D||!x.isFunction(e))return x.inspect(e);var t=o(e);return"[Function"+(t?": "+t:"")+"]"}function c(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}function p(e,t,r,n,i){throw new C.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function h(e,t){e||p(e,!0,t,"==",C.ok)}function f(e,t,r,o){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(x.isDate(e)&&x.isDate(t))return e.getTime()===t.getTime();if(x.isRegExp(e)&&x.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(a(e)&&a(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;o=o||{actual:[],expected:[]};var u=o.actual.indexOf(e);return-1!==u&&u===o.expected.indexOf(t)||(o.actual.push(e),o.expected.push(t),m(e,t,r,o))}return r?e===t:e==t}function d(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function m(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(x.isPrimitive(e)||x.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=d(e),s=d(t);if(i&&!s||!i&&s)return!1;if(i)return e=A.call(e),t=A.call(t),f(e,t,r);var a,o,u=_(e),l=_(t);if(u.length!==l.length)return!1;for(u.sort(),l.sort(),o=u.length-1;o>=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!f(e[a],t[a],r,n))return!1;return!0}function y(e,t,r){f(e,t,!0)&&p(e,t,r,"notDeepStrictEqual",y)}function g(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e){var t;try{e()}catch(e){t=e}return t}function v(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=b(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&p(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&x.isError(i),o=!e&&i&&!r;if((a&&s&&g(i,r)||o)&&p(i,r,"Got unwanted exception"+n),e&&i&&r&&!g(i,r)||!e&&i)throw i}var x=e("util/"),E=Object.prototype.hasOwnProperty,A=Array.prototype.slice,D=function(){return"foo"===function(){}.name}(),C=t.exports=h,S=/\s*function\s+([^\(\s]*)\s*/;C.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},x.inherits(C.AssertionError,Error),C.fail=p,C.ok=h,C.equal=function(e,t,r){e!=t&&p(e,t,r,"==",C.equal)},C.notEqual=function(e,t,r){e==t&&p(e,t,r,"!=",C.notEqual)},C.deepEqual=function(e,t,r){f(e,t,!1)||p(e,t,r,"deepEqual",C.deepEqual)},C.deepStrictEqual=function(e,t,r){f(e,t,!0)||p(e,t,r,"deepStrictEqual",C.deepStrictEqual)},C.notDeepEqual=function(e,t,r){f(e,t,!1)&&p(e,t,r,"notDeepEqual",C.notDeepEqual)},C.notDeepStrictEqual=y,C.strictEqual=function(e,t,r){e!==t&&p(e,t,r,"===",C.strictEqual)},C.notStrictEqual=function(e,t,r){e===t&&p(e,t,r,"!==",C.notStrictEqual)},C.throws=function(e,t,r){v(!0,e,t,r)},C.doesNotThrow=function(e,t,r){v(!1,e,t,r)},C.ifError=function(e){if(e)throw e};var _=Object.keys||function(e){var t=[];for(var r in e)E.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":601}],4:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],5:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./babel":4,"./flow":11}],6:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")),n=r.Type,i=n.def,s=n.or,a=t.use(e("../lib/shared")),o=a.defaults,u=a.geq;i("Printable").field("loc",s(i("SourceLocation"),null),o.null,!0),i("Node").bases("Printable").field("type",String).field("comments",s([i("Comment")],null),o.null,!0),i("SourceLocation").build("start","end","source").field("start",i("Position")).field("end",i("Position")).field("source",s(String,null),o.null),i("Position").build("line","column").field("line",u(1)).field("column",u(0)),i("File").bases("Node").build("program","name").field("program",i("Program")).field("name",s(String,null),o.null),i("Program").bases("Node").build("body").field("body",[i("Statement")]),i("Function").bases("Node").field("id",s(i("Identifier"),null),o.null).field("params",[i("Pattern")]).field("body",i("BlockStatement")),i("Statement").bases("Node"),i("EmptyStatement").bases("Statement").build(),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]),i("ExpressionStatement").bases("Statement").build("expression").field("expression",i("Expression")),i("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Statement")).field("alternate",s(i("Statement"),null),o.null),i("LabeledStatement").bases("Statement").build("label","body").field("label",i("Identifier")).field("body",i("Statement")),i("BreakStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),o.null),i("ContinueStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),o.null),i("WithStatement").bases("Statement").build("object","body").field("object",i("Expression")).field("body",i("Statement")),i("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",i("Expression")).field("cases",[i("SwitchCase")]).field("lexical",Boolean,o.false),i("ReturnStatement").bases("Statement").build("argument").field("argument",s(i("Expression"),null)),i("ThrowStatement").bases("Statement").build("argument").field("argument",i("Expression")),i("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",i("BlockStatement")).field("handler",s(i("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[i("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[i("CatchClause")],o.emptyArray).field("finalizer",s(i("BlockStatement"),null),o.null),i("CatchClause").bases("Node").build("param","guard","body").field("param",i("Pattern")).field("guard",s(i("Expression"),null),o.null).field("body",i("BlockStatement")),i("WhileStatement").bases("Statement").build("test","body").field("test",i("Expression")).field("body",i("Statement")),i("DoWhileStatement").bases("Statement").build("body","test").field("body",i("Statement")).field("test",i("Expression")),i("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(i("VariableDeclaration"),i("Expression"),null)).field("test",s(i("Expression"),null)).field("update",s(i("Expression"),null)).field("body",i("Statement")),i("ForInStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("DebuggerStatement").bases("Statement").build(),i("Declaration").bases("Statement"),i("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",i("Identifier")),i("FunctionExpression").bases("Function","Expression").build("id","params","body"),i("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[i("VariableDeclarator")]),i("VariableDeclarator").bases("Node").build("id","init").field("id",i("Pattern")).field("init",s(i("Expression"),null)),i("Expression").bases("Node","Pattern"),i("ThisExpression").bases("Expression").build(),i("ArrayExpression").bases("Expression").build("elements").field("elements",[s(i("Expression"),null)]),i("ObjectExpression").bases("Expression").build("properties").field("properties",[i("Property")]),i("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(i("Literal"),i("Identifier"))).field("value",i("Expression")),i("SequenceExpression").bases("Expression").build("expressions").field("expressions",[i("Expression")]);var l=s("-","+","!","~","typeof","void","delete");i("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",l).field("argument",i("Expression")).field("prefix",Boolean,o.true);var c=s("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");i("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",i("Expression")).field("right",i("Expression"));var p=s("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");i("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",p).field("left",i("Pattern")).field("right",i("Expression"));var h=s("++","--");i("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",h).field("argument",i("Expression")).field("prefix",Boolean);var f=s("||","&&");i("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",i("Expression")).field("right",i("Expression")),i("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Expression")).field("alternate",i("Expression")),i("NewExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]),i("CallExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]),i("MemberExpression").bases("Expression").build("object","property","computed").field("object",i("Expression")).field("property",s(i("Identifier"),i("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),i("Pattern").bases("Node"),i("SwitchCase").bases("Node").build("test","consequent").field("test",s(i("Expression"),null)).field("consequent",[i("Statement")]),i("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),i("Literal").bases("Node","Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp)).field("regex",s({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),i("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}},{"../lib/shared":20,"../lib/types":21}],7:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":21,"./core":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":20,"../lib/types":21,"./core":6}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":20,"../lib/types":21,"./es6":8}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],11:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),
-n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],12:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],13:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":20,"../lib/types":21,"./core":6}],14:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":15,"./lib/node-path":16,"./lib/path":18,"./lib/path-visitor":17,"./lib/types":21}],15:[function(e,t,r){t.exports=function(t){function r(e,t,r){return c.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(c.check(e)?s(e,t,r):p.check(e)?a(e,t,r):h.check(e)?h.check(t)&&+e==+t:f.check(e)?f.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}function s(e,t,r){c.assert(e);var n=e.length;if(!c.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;s<n;++s){if(r&&r.push(s),s in e!=s in t)return!1;if(!i(e[s],t[s],r))return!1;if(r){var a=r.pop();if(a!==s)throw new Error(""+a)}}return!0}function a(e,t,r){if(p.assert(e),!p.check(t))return!1;if(e.type!==t.type)return r&&r.push("type"),!1;var n=u(e),s=n.length,a=u(t),o=a.length;if(s===o){for(var c=0;c<s;++c){var h=n[c],f=l(e,h),m=l(t,h);if(r&&r.push(h),!i(f,m,r))return!1;if(r){var y=r.pop();if(y!==h)throw new Error(""+y)}}return!0}if(!r)return!1;var g=Object.create(null);for(c=0;c<s;++c)g[n[c]]=!0;for(c=0;c<o;++c){if(h=a[c],!d.call(g,h))return r.push(h),!1;delete g[h]}for(h in g){r.push(h);break}return!1}var o=t.use(e("../lib/types")),u=o.getFieldNames,l=o.getFieldValue,c=o.builtInTypes.array,p=o.builtInTypes.object,h=o.builtInTypes.Date,f=o.builtInTypes.RegExp,d=Object.prototype.hasOwnProperty;return r.assert=function(e,t){var i=[];if(!r(e,t,i)){if(0!==i.length)throw new Error("Nodes differ in the following path: "+i.map(n).join(""));if(e!==t)throw new Error("Nodes must be equal")}},r}},{"../lib/types":21}],16:[function(e,t,r){t.exports=function(t){function r(e,t,n){if(!(this instanceof r))throw new Error("NodePath constructor cannot be invoked without 'new'");f.call(this,e,t,n)}function n(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function i(e){return!!l.CallExpression.check(e)||(h.check(e)?e.some(i):!!l.Node.check(e)&&u.someField(e,function(e,t){return i(t)}))}function s(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,l.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(l.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw new Error("Nodes must be equal");return!0}if(l.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(l.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw new Error("Nodes must be equal")}else if(l.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw new Error("Nodes must be equal")}else if(l.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw new Error("Nodes must be equal")}else if(n(r)&&"left"===e.name){if(r.left!==t)throw new Error("Nodes must be equal")}else{if(!l.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw new Error("Nodes must be equal")}}return!0}function a(e){if(l.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(l.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else l.IfStatement.check(e.node)&&o(e);return e}function o(e){var t=e.get("test").value,r=e.get("alternate").value,n=e.get("consequent").value;if(n||r){if(!n&&r){var i=c.unaryExpression("!",t,!0);l.UnaryExpression.check(t)&&"!"===t.operator&&(i=t.argument),e.get("test").replace(i),e.get("consequent").replace(r),e.get("alternate").replace()}}else{var s=c.expressionStatement(t);e.replace(s)}}var u=t.use(e("./types")),l=u.namedTypes,c=u.builders,p=u.builtInTypes.number,h=u.builtInTypes.array,f=t.use(e("./path")),d=t.use(e("./scope")),m=r.prototype=Object.create(f.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(m,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),m.replace=function(){return delete this.node,delete this.parent,delete this.scope,f.prototype.replace.apply(this,arguments)},m.prune=function(){var e=this.parent;return this.replace(),a(e)},m._computeNode=function(){var e=this.value;if(l.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},m._computeParent=function(){var e=this.value,t=this.parentPath;if(!l.Node.check(e)){for(;t&&!l.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!l.Node.check(t.value);)t=t.parentPath;return t||null},m._computeScope=function(){var e=this.value,t=this.parentPath,r=t&&t.scope;return l.Node.check(e)&&d.isEstablishedBy(e)&&(r=new d(this,r)),r||null},m.getValueProperty=function(e){return u.getFieldValue(this.value,e)},m.needsParens=function(e){var t=this.parentPath;if(!t)return!1;var r=this.value;if(!l.Expression.check(r))return!1;if("Identifier"===r.type)return!1;for(;!l.Node.check(t.value);)if(!(t=t.parentPath))return!1;var n=t.value;switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===n.type&&"object"===this.name&&n.object===r;case"BinaryExpression":case"LogicalExpression":switch(n.type){case"CallExpression":return"callee"===this.name&&n.callee===r;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&n.object===r;case"BinaryExpression":case"LogicalExpression":var s=n.operator,t=y[s],a=r.operator,o=y[a];if(t>o)return!0;if(t===o&&"right"===this.name){if(n.right!==r)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(n.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(n.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===n.type&&p.check(r.value)&&"object"===this.name&&n.object===r;case"AssignmentExpression":case"ConditionalExpression":switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&n.callee===r;case"ConditionalExpression":return"test"===this.name&&n.test===r;case"MemberExpression":return"object"===this.name&&n.object===r;default:return!1}default:if("NewExpression"===n.type&&"callee"===this.name&&n.callee===r)return i(r)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var y={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){y[e]=t})}),m.canBeFirstInStatement=function(){var e=this.node;return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},m.firstInStatement=function(){return s(this)},r}},{"./path":18,"./scope":19,"./types":21}],17:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=i(this),this._shouldVisitComments=n.call(this._methodNameTable,"Block")||n.call(this._methodNameTable,"Line"),this.Context=o(this),this._visiting=!1,this._changeReported=!1}function i(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=u.computeSupertypeLookupTable(t),i=Object.create(null),t=Object.keys(n),s=t.length,a=0;a<s;++a){var o=t[a];r="visit"+n[o],h.check(e[r])&&(i[o]=r)}return i}function s(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}function a(e,t){if(!(e instanceof l))throw new Error("");if(!(t instanceof r))throw new Error("");var i=e.value;if(c.check(i))e.each(t.visitWithoutReset,t);else if(p.check(i)){var s=u.getFieldNames(i);t._shouldVisitComments&&i.comments&&s.indexOf("comments")<0&&s.push("comments");for(var a=s.length,o=[],h=0;h<a;++h){var f=s[h];n.call(i,f)||(i[f]=u.getFieldValue(i,f)),o.push(e.get(f))}for(var h=0;h<a;++h)t.visitWithoutReset(o[h])}else;return e.value}function o(e){function t(n){if(!(this instanceof t))throw new Error("");if(!(this instanceof r))throw new Error("");if(!(n instanceof l))throw new Error("");Object.defineProperty(this,"visitor",{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=n,this.needToCallTraverse=!0,Object.seal(this)}if(!(e instanceof r))throw new Error("");var n=t.prototype=Object.create(e);return n.constructor=t,s(n,d),t}var u=t.use(e("./types")),l=t.use(e("./node-path")),c=(u.namedTypes.Printable,u.builtInTypes.array),p=u.builtInTypes.object,h=u.builtInTypes.function;r.fromMethodsObject=function(e){function t(){if(!(this instanceof t))throw new Error("Visitor constructor cannot be invoked without 'new'");r.call(this)}if(e instanceof r)return e;if(!p.check(e))return new r;var n=t.prototype=Object.create(f);return n.constructor=t,s(n,e),s(t,r),h.assert(t.fromMethodsObject),h.assert(t.visit),new t},r.visit=function(e,t){return r.fromMethodsObject(t).visit(e)};var f=r.prototype;f.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var e=arguments.length,t=new Array(e),r=0;r<e;++r)t[r]=arguments[r];t[0]instanceof l||(t[0]=new l({root:t[0]}).get("root")),this.reset.apply(this,t);try{var n=this.visitWithoutReset(t[0])}finally{this._visiting=!1}return n},f.AbortRequest=function(){},f.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},f.reset=function(e){},f.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof l))throw new Error("");var t=e.value,r=t&&"object"==typeof t&&"string"==typeof t.type&&this._methodNameTable[t.type];if(!r)return a(e,this);var n=this.acquireContext(e);try{return n.invokeVisitorMethod(r)}finally{this.releaseContext(n)}},f.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},f.releaseContext=function(e){if(!(e instanceof this.Context))throw new Error("");this._reusableContextStack.push(e),e.currentPath=null},f.reportChanged=function(){this._changeReported=!0},f.wasChangeReported=function(){return this._changeReported};var d=Object.create(null);return d.reset=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");return this.currentPath=e,this.needToCallTraverse=!0,this},d.invokeVisitorMethod=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");var t=this.visitor[e].call(this,this.currentPath);if(!1===t?this.needToCallTraverse=!1:void 0!==t&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),!1!==this.needToCallTraverse)throw new Error("Must either call this.traverse or return false in "+e);var r=this.currentPath;return r&&r.value},d.traverse=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");return this.needToCallTraverse=!1,a(e,r.fromMethodsObject(t||this.visitor))},d.visit=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");return this.needToCallTraverse=!1,r.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},d.reportChanged=function(){this.visitor.reportChanged()},d.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},r}},{"./node-path":16,"./types":21}],18:[function(e,t,r){var n=Array.prototype,i=(n.slice,n.map,Object.prototype),s=i.hasOwnProperty;t.exports=function(t){function r(e,t,n){if(!(this instanceof r))throw new Error("Path constructor cannot be invoked without 'new'");if(t){if(!(t instanceof r))throw new Error("")}else t=null,n=null;this.value=e,this.parentPath=t,this.name=n,this.__childCache=null}function n(e){return e.__childCache||(e.__childCache=Object.create(null))}function i(e,t){var r=n(e),i=e.getValueProperty(t),a=r[t];return s.call(r,t)&&a.value===i||(a=r[t]=new e.constructor(i,e,t)),a}function a(){}function o(e,t,r,i){if(c.assert(e.value),0===t)return a;var o=e.value.length;if(o<1)return a;var u=arguments.length;2===u?(r=0,i=o):3===u?(r=Math.max(r,0),i=o):(r=Math.max(r,0),i=Math.min(i,o)),p.assert(r),p.assert(i);for(var l=Object.create(null),h=n(e),f=r;f<i;++f)if(s.call(e.value,f)){var d=e.get(f);if(d.name!==f)throw new Error("");var m=f+t;d.name=m,l[m]=d,delete h[f]}return delete h.length,function(){for(var t in l){var r=l[t];if(r.name!==+t)throw new Error("");h[t]=r,e.value[t]=r.value}}}function u(e){if(!(e instanceof r))throw new Error("");var t=e.parentPath;if(!t)return e;var i=t.value,s=n(t);if(i[e.name]===e.value)s[e.name]=e;else if(c.check(i)){var a=i.indexOf(e.value);a>=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("");return e}var l=t.use(e("./types")),c=l.builtInTypes.array,p=l.builtInTypes.number,h=r.prototype;return h.getValueProperty=function(e){return this.value[e]},h.get=function(e){for(var t=this,r=arguments,n=r.length,s=0;s<n;++s)t=i(t,r[s]);return t},h.each=function(e,t){for(var r=[],n=this.value.length,i=0,i=0;i<n;++i)s.call(this.value,i)&&(r[i]=this.get(i));for(t=t||this,i=0;i<n;++i)s.call(r,i)&&e.call(t,r[i])},h.map=function(e,t){var r=[];return this.each(function(t){r.push(e.call(this,t))},t),r},h.filter=function(e,t){var r=[];return this.each(function(t){e.call(this,t)&&r.push(t)},t),r},h.shift=function(){var e=o(this,-1),t=this.value.shift();return e(),t},h.unshift=function(e){var t=o(this,arguments.length),r=this.value.unshift.apply(this.value,arguments);return t(),r},h.push=function(e){return c.assert(this.value),delete n(this).length,this.value.push.apply(this.value,arguments)},h.pop=function(){c.assert(this.value);var e=n(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},h.insertAt=function(e,t){var r=arguments.length,n=o(this,r-1,e);if(n===a)return this;e=Math.max(e,0);for(var i=1;i<r;++i)this.value[e+i-1]=arguments[i];return n(),this},h.insertBefore=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},h.insertAfter=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name+1],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},h.replace=function(e){var t=[],r=this.parentPath.value,i=n(this.parentPath),s=arguments.length;if(u(this),c.check(r)){for(var a=r.length,l=o(this.parentPath,s-1,this.name+1),p=[this.name,1],h=0;h<s;++h)p.push(arguments[h]);if(r.splice.apply(r,p)[0]!==this.value)throw new Error("");if(r.length!==a-1+s)throw new Error("");if(l(),0===s)delete this.value,delete i[this.name],this.__childCache=null;else{if(r[this.name]!==e)throw new Error("");for(this.value!==e&&(this.value=e,this.__childCache=null),h=0;h<s;++h)t.push(this.parentPath.get(this.name+h));if(t[0]!==this)throw new Error("")}}else if(1===s)this.value!==e&&(this.__childCache=null),this.value=r[this.name]=e,t.push(this);else{if(0!==s)throw new Error("Could not replace path");delete r[this.name],delete this.value,this.__childCache=null}return t},r}},{"./types":21}],19:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(n,i){if(!(this instanceof r))throw new Error("Scope constructor cannot be invoked without 'new'");if(!(n instanceof t.use(e("./node-path"))))throw new Error("");b.assert(n.value);var s;if(i){if(!(i instanceof r))throw new Error("");s=i.depth+1}else i=null,s=0;Object.defineProperties(this,{path:{value:n},node:{value:n.value},isGlobal:{value:!i,enumerable:!0},depth:{value:s},parent:{value:i},bindings:{value:{}},types:{value:{}}})}function i(e,t,r){var n=e.value;b.assert(n),h.CatchClause.check(n)?u(e.get("param"),t):s(e,t,r)}function s(e,t,r){var n=e.value;e.parent&&h.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&u(e.parent.get("id"),t),n&&(m.check(n)?e.each(function(e){o(e,t,r)}):h.Function.check(n)?(e.get("params").each(function(e){u(e,t)}),o(e.get("body"),t,r)):h.TypeAlias&&h.TypeAlias.check(n)?l(e.get("id"),r):h.VariableDeclarator.check(n)?(u(e.get("id"),t),o(e.get("init"),t,r)):"ImportSpecifier"===n.type||"ImportNamespaceSpecifier"===n.type||"ImportDefaultSpecifier"===n.type?u(e.get(n.local?"local":n.name?"name":"id"),t):f.check(n)&&!d.check(n)&&c.eachField(n,function(n,i){var s=e.get(n);if(!a(s,i))throw new Error("");o(s,t,r)}))}function a(e,t){return e.value===t||!(!Array.isArray(e.value)||0!==e.value.length||!Array.isArray(t)||0!==t.length)}function o(e,t,r){var i=e.value;if(!i||d.check(i));else if(h.FunctionDeclaration.check(i)&&null!==i.id)u(e.get("id"),t);else if(h.ClassDeclaration&&h.ClassDeclaration.check(i))u(e.get("id"),t);else if(b.check(i)){if(h.CatchClause.check(i)){var a=i.param.name,o=n.call(t,a);s(e.get("body"),t,r),o||delete t[a]}}else s(e,t,r)}function u(e,t){var r=e.value;h.Pattern.assert(r),h.Identifier.check(r)?n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e]:h.ObjectPattern&&h.ObjectPattern.check(r)?e.get("properties").each(function(e){var r=e.value;h.Pattern.check(r)?u(e,t):h.Property.check(r)?u(e.get("value"),t):h.SpreadProperty&&h.SpreadProperty.check(r)&&u(e.get("argument"),t)}):h.ArrayPattern&&h.ArrayPattern.check(r)?e.get("elements").each(function(e){var r=e.value;h.Pattern.check(r)?u(e,t):h.SpreadElement&&h.SpreadElement.check(r)&&u(e.get("argument"),t)}):h.PropertyPattern&&h.PropertyPattern.check(r)?u(e.get("pattern"),t):(h.SpreadElementPattern&&h.SpreadElementPattern.check(r)||h.SpreadPropertyPattern&&h.SpreadPropertyPattern.check(r))&&u(e.get("argument"),t)}function l(e,t){var r=e.value;h.Pattern.assert(r),h.Identifier.check(r)&&(n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e])}var c=t.use(e("./types")),p=c.Type,h=c.namedTypes,f=h.Node,d=h.Expression,m=c.builtInTypes.array,y=c.builders,g=[h.Program,h.Function,h.CatchClause],b=p.or.apply(p,g);r.isEstablishedBy=function(e){return b.check(e)};var v=r.prototype;return v.didScan=!1,v.declares=function(e){return this.scan(),n.call(this.bindings,e)},v.declaresType=function(e){return this.scan(),n.call(this.types,e)},v.declareTemporary=function(e){if(e){if(!/^[a-z$_]/i.test(e))throw new Error("")}else e="t$";e+=this.depth.toString(36)+"$",this.scan();for(var t=0;this.declares(e+t);)++t;var r=e+t;return this.bindings[r]=c.builders.identifier(r)},v.injectTemporary=function(e,t){e||(e=this.declareTemporary());var r=this.path.get("body");return h.BlockStatement.check(r.value)&&(r=r.get("body")),r.unshift(y.variableDeclaration("var",[y.variableDeclarator(e,t||null)])),e},v.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];i(this.path,this.bindings,this.types),this.didScan=!0}},v.getBindings=function(){return this.scan(),this.bindings},v.getTypes=function(){return this.scan(),this.types},v.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},v.lookupType=function(e){for(var t=this;t&&!t.declaresType(e);t=t.parent);return t},v.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},r}},{"./node-path":16,"./types":21}],20:[function(e,t,r){t.exports=function(t){var r={},n=t.use(e("../lib/types")),i=n.Type,s=n.builtInTypes,a=s.number;r.geq=function(e){return new i(function(t){return a.check(t)&&t>=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":21}],21:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return _.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":S.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return A[r]=i,t&&"function"==typeof t.constructor&&(x.push(t.constructor),E.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(S.check(t))return e.fromArray(t);if(_.check(t))return e.fromObject(t);if(C.check(t)){var n=x.indexOf(t);return n>=0?E[n]:new e(t,r)}return new e(function(e){return e===t},k.check(r)?function(){return t+""}:r)}function s(e,t,r,i){var a=this;if(!(a instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");D.assert(e),t=n(t);var o={name:{value:e},type:{value:t},hidden:{value:!!i}};C.check(r)&&(o.defaultFn={value:r}),Object.defineProperties(a,o)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function h(e){return e=p(e),e.replace(/(Expression)?$/,"Statement")}function f(e){var t=c.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e){var t=h(e);if(!B[t]){var r=B[p(e)];r&&(B[t]=function(){return B.expressionStatement(r.apply(B,arguments))})}}function y(e,t){t.length=0,t.push(e);for(var r=Object.create(null),n=0;n<t.length;++n){e=t[n];var i=T[e];if(!0!==i.finalized)throw new Error("");l.call(r,e)&&delete t[r[e]],r[e]=n,t.push.apply(t,i.baseNames)}for(var s=0,a=s,o=t.length;a<o;++a)l.call(t,a)&&(t[s++]=t[a]);t.length=s}function g(e,t){return Object.keys(t).forEach(function(r){e[r]=t[r]}),e}var b={},v=e.prototype;b.Type=e,v.assert=function(e,r){if(!this.check(e,r)){var n=t(e);throw new Error(n+" does not match type "+this)}return!0},v.toString=function(){var e=this.name;return D.check(e)?e:C.check(e)?e.call(this)+"":e+" type"};var x=[],E=[],A={};b.builtInTypes=A;var D=r("truthy","string"),C=r(function(){},"function"),S=r([],"array"),_=r({},"object"),w=(r(/./,"RegExp"),r(new Date,"Date"),r(3,"number")),k=(r(!0,"boolean"),r(null,"null"),r(void 0,"undefined"));e.or=function(){for(var t=[],r=arguments.length,i=0;i<r;++i)t.push(n(arguments[i]));return new e(function(e,n){for(var i=0;i<r;++i)if(t[i].check(e,n))return!0;return!1},function(){return t.join(" | ")})},e.fromArray=function(e){if(!S.check(e))throw new Error("");if(1!==e.length)throw new Error("only one element type is permitted for typed arrays");return n(e[0]).arrayOf()},v.arrayOf=function(){var t=this;return new e(function(e,r){return S.check(e)&&e.every(function(e){return t.check(e,r)})},function(){return"["+t+"]"})},e.fromObject=function(t){var r=Object.keys(t).map(function(e){return new s(e,t[e])});return new e(function(e,t){return _.check(e)&&r.every(function(r){return r.type.check(e[r.name],t)})},function(){return"{ "+r.join(", ")+" }"})};var F=s.prototype;F.toString=function(){return JSON.stringify(this.name)+": "+this.type},F.getValue=function(e){var t=e[this.name];return k.check(t)?(this.defaultFn&&(t=this.defaultFn.call(e)),t):t},e.def=function(e){return D.assert(e),l.call(T,e)?T[e]:T[e]=new c(e)};var T=Object.create(null);c.fromValue=function(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&l.call(T,t)){var r=T[t];if(r.finalized)return r}}return null};var P=c.prototype;P.isSupertypeOf=function(e){if(e instanceof c){if(!0!==this.finalized||!0!==e.finalized)throw new Error("");return l.call(e.allSupertypes,this.typeName)}throw new Error(e+" is not a Def")},b.getSupertypeNames=function(e){if(!l.call(T,e))throw new Error("");var t=T[e];if(!0!==t.finalized)throw new Error("");return t.supertypeList.slice(1)},b.computeSupertypeLookupTable=function(e){for(var t={},r=Object.keys(T),n=r.length,i=0;i<n;++i){var s=r[i],a=T[s];if(!0!==a.finalized)throw new Error(""+s);for(var o=0;o<a.supertypeList.length;++o){var u=a.supertypeList[o];if(l.call(e,u)){t[s]=u;break}}}return t},P.checkAllFields=function(e,t){function r(r){var i=n[r],s=i.type,a=i.getValue(e);return s.check(a,t)}var n=this.allFields;if(!0!==this.finalized)throw new Error(""+this.typeName);return _.check(e)&&Object.keys(n).every(r)},P.check=function(e,t){if(!0!==this.finalized)throw new Error("prematurely checking unfinalized type "+this.typeName);if(!_.check(e))return!1;var r=c.fromValue(e);return r?t&&r===this?this.checkAllFields(e,t):!!this.isSupertypeOf(r)&&(!t||r.checkAllFields(e,t)&&this.checkAllFields(e,!1)):("SourceLocation"===this.typeName||"Position"===this.typeName)&&this.checkAllFields(e,t)},P.bases=function(){var e=i.call(arguments),t=this.baseNames;if(this.finalized){if(e.length!==t.length)throw new Error("");for(var r=0;r<e.length;r++)if(e[r]!==t[r])throw new Error("");return this}return e.forEach(function(e){D.assert(e),t.indexOf(e)<0&&t.push(e)}),this},Object.defineProperty(P,"buildable",{value:!1});var B={};b.builders=B;var O={};b.defineMethod=function(e,t){var r=O[e];return k.check(t)?delete O[e]:(C.assert(t),Object.defineProperty(O,e,{enumerable:!0,configurable:!0,value:t})),r};var j=D.arrayOf();P.build=function(){var e=this,r=i.call(arguments);return j.assert(r),Object.defineProperty(e,"buildParams",{value:r,writable:!1,enumerable:!1,configurable:!0}),
-e.buildable?e:(e.field("type",String,function(){return e.typeName}),Object.defineProperty(e,"buildable",{value:!0}),Object.defineProperty(B,p(e.typeName),{enumerable:!0,value:function(){function r(r,a){if(!l.call(s,r)){var o=e.allFields;if(!l.call(o,r))throw new Error(""+r);var u,c=o[r],p=c.type;if(w.check(a)&&a<i)u=n[a];else{if(!c.defaultFn){var h="no value or default function given for field "+JSON.stringify(r)+" of "+e.typeName+"("+e.buildParams.map(function(e){return o[e]}).join(", ")+")";throw new Error(h)}u=c.defaultFn.call(s)}if(!p.check(u))throw new Error(t(u)+" does not match field "+c+" of type "+e.typeName);s[r]=u}}var n=arguments,i=n.length,s=Object.create(O);if(!e.finalized)throw new Error("attempting to instantiate unfinalized type "+e.typeName);if(e.buildParams.forEach(function(e,t){r(e,t)}),Object.keys(e.allFields).forEach(function(e){r(e)}),s.type!==e.typeName)throw new Error("");return s}}),e)},b.getBuilderName=p,b.getStatementBuilderName=h,P.field=function(e,t,r,n){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(e)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[e]=new s(e,t,r,n),this)};var N={};return b.namedTypes=N,b.getFieldNames=f,b.getFieldValue=d,b.eachField=function(e,t,r){f(e).forEach(function(r){t.call(this,r,d(e,r))},r)},b.someField=function(e,t,r){return f(e).some(function(r){return t.call(this,r,d(e,r))},r)},Object.defineProperty(P,"finalized",{value:!1}),P.finalize=function(){var e=this;if(!e.finalized){var t=e.allFields,r=e.allSupertypes;e.baseNames.forEach(function(n){var i=T[n];if(!(i instanceof c)){var s="unknown supertype name "+JSON.stringify(n)+" for subtype "+JSON.stringify(e.typeName);throw new Error(s)}i.finalize(),g(t,i.allFields),g(r,i.allSupertypes)}),g(t,e.ownFields),r[e.typeName]=e,e.fieldNames.length=0;for(var n in t)l.call(t,n)&&!t[n].hidden&&e.fieldNames.push(n);Object.defineProperty(N,e.typeName,{enumerable:!0,value:e.type}),Object.defineProperty(e,"finalized",{value:!0}),y(e.typeName,e.supertypeList),e.buildable&&e.supertypeList.lastIndexOf("Expression")>=0&&m(e.typeName)}},b.finalize=function(){Object.keys(T).forEach(function(e){T[e].finalize()})},b}},{}],22:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":4,"./def/babel6":5,"./def/core":6,"./def/e4x":7,"./def/es6":8,"./def/es7":9,"./def/esprima":10,"./def/flow":11,"./def/jsx":12,"./def/mozilla":13,"./fork":14}],23:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function s(e){var t=e.slice(-2),r=t[0],n=t[1],i=(0,o.matchToToken)(e);if("name"===i.type){if(c.default.keyword.isReservedWordES6(i.value))return"keyword";if(d.test(i.value)&&("<"===n[r-1]||"</"==n.substr(r-2,2)))return"jsx_tag";if(i.value[0]!==i.value[0].toLowerCase())return"capitalized"}return"punctuator"===i.type&&m.test(i.value)?"bracket":i.type}function a(e,t){return t.replace(u.default,function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=s(r),a=e[i];return a?r[0].split(f).map(function(e){return a(e)}).join("\n"):r[0]})}r.__esModule=!0,r.default=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&h.default.supportsColor||n.forceColor,o=h.default;n.forceColor&&(o=new h.default.constructor({enabled:!0}));var u=function(e,t){return s?e(t):t},l=i(o);s&&(e=a(l,e));var c=n.linesAbove||2,p=n.linesBelow||3,d=e.split(f),m=Math.max(t-(c+1),0),y=Math.min(d.length,t+p);t||r||(m=0,y=d.length);var g=String(y).length,b=d.slice(m,y).map(function(e,n){var i=m+1+n,s=(" "+i).slice(-g),a=" "+s+" | ";if(i===t){var o="";if(r){var c=e.slice(0,r-1).replace(/[^\t]/g," ");o=["\n ",u(l.gutter,a.replace(/\d/g," ")),c,u(l.marker,"^")].join("")}return[u(l.marker,">"),u(l.gutter,a),e,o].join("")}return" "+u(l.gutter,a)+e}).join("\n");return s?o.reset(b):b};var o=e("js-tokens"),u=n(o),l=e("esutils"),c=n(l),p=e("chalk"),h=n(p),f=/\r\n|[\n\r\u2028\u2029]/,d=/^[a-z][\w-]*$/i,m=/^[()\[\]{}]$/;t.exports=r.default},{chalk:185,esutils:27,"js-tokens":311}],24:[function(e,t,r){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return n(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}t.exports={isExpression:e,isStatement:n,isIterationStatement:r,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:s}}()},{}],25:[function(e,t,r){!function(){"use strict";function e(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function n(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&f.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}function o(e){return e<128?d[e]:h.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:h.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:p.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,h,f,d,m,y;for(h={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},f=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],d=new Array(128),y=0;y<128;++y)d[y]=y>=97&&y<=122||y>=65&&y<=90||36===y||95===y;for(m=new Array(128),y=0;y<128;++y)m[y]=y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||36===y||95===y;t.exports={isDecimalDigit:e,isHexDigit:r,isOctalDigit:n,isWhiteSpace:i,isLineTerminator:s,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:l,isIdentifierPartES6:c}}()},{}],26:[function(e,t,r){!function(){"use strict";function r(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function n(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&r(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function o(e){return"eval"===e||"arguments"===e}function u(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!f.isIdentifierStartES5(n))return!1
-;for(t=1,r=e.length;t<r;++t)if(n=e.charCodeAt(t),!f.isIdentifierPartES5(n))return!1;return!0}function l(e,t){return 1024*(e-55296)+(t-56320)+65536}function c(e){var t,r,n,i,s;if(0===e.length)return!1;for(s=f.isIdentifierStartES6,t=0,r=e.length;t<r;++t){if(55296<=(n=e.charCodeAt(t))&&n<=56319){if(++t>=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=l(n,i)}if(!s(n))return!1;s=f.isIdentifierPartES6}return!0}function p(e,t){return u(e)&&!s(e,t)}function h(e,t){return c(e)&&!a(e,t)}var f=e("./code");t.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:c,isIdentifierES5:p,isIdentifierES6:h}}()},{"./code":25}],27:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":24,"./code":25,"./keyword":26}],28:[function(e,t,r){t.exports=e("./lib/api/node.js")},{"./lib/api/node.js":29}],29:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")}function a(e,t,r){"function"==typeof t&&(r=t,t={}),t.filename=e,y.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=T(n,t)}catch(t){e=t}e?r(e):r(null,i)})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,T(y.default.readFileSync(e,"utf8"),t)}r.__esModule=!0,r.transformFromAst=r.transform=r.analyse=r.Pipeline=r.OptionManager=r.traverse=r.types=r.messages=r.util=r.version=r.resolvePreset=r.resolvePlugin=r.template=r.buildExternalHelpers=r.options=r.File=void 0;var u=e("../transformation/file");Object.defineProperty(r,"File",{enumerable:!0,get:function(){return i(u).default}});var l=e("../transformation/file/options/config");Object.defineProperty(r,"options",{enumerable:!0,get:function(){return i(l).default}});var c=e("../tools/build-external-helpers");Object.defineProperty(r,"buildExternalHelpers",{enumerable:!0,get:function(){return i(c).default}});var p=e("babel-template");Object.defineProperty(r,"template",{enumerable:!0,get:function(){return i(p).default}});var h=e("../helpers/resolve-plugin");Object.defineProperty(r,"resolvePlugin",{enumerable:!0,get:function(){return i(h).default}});var f=e("../helpers/resolve-preset");Object.defineProperty(r,"resolvePreset",{enumerable:!0,get:function(){return i(f).default}});var d=e("../../package");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return d.version}}),r.Plugin=s,r.transformFile=a,r.transformFileSync=o;var m=e("fs"),y=i(m),g=e("../util"),b=n(g),v=e("babel-messages"),x=n(v),E=e("babel-types"),A=n(E),D=e("babel-traverse"),C=i(D),S=e("../transformation/file/options/option-manager"),_=i(S),w=e("../transformation/pipeline"),k=i(w);r.util=b,r.messages=x,r.types=A,r.traverse=C.default,r.OptionManager=_.default,r.Pipeline=k.default;var F=new k.default,T=(r.analyse=F.analyse.bind(F),r.transform=F.transform.bind(F));r.transformFromAst=F.transformFromAst.bind(F)},{"../../package":66,"../helpers/resolve-plugin":35,"../helpers/resolve-preset":36,"../tools/build-external-helpers":39,"../transformation/file":40,"../transformation/file/options/config":44,"../transformation/file/options/option-manager":46,"../transformation/pipeline":51,"../util":54,"babel-messages":103,"babel-template":132,"babel-traverse":136,"babel-types":169,fs:182}],30:[function(e,t,r){"use strict";function n(e){return["babel-plugin-"+e,e]}r.__esModule=!0,r.default=n,t.exports=r.default},{}],31:[function(e,t,r){"use strict";function n(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^\/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t}r.__esModule=!0,r.default=n,t.exports=r.default},{}],32:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i);r.default=function(e,t){if(e&&t)return(0,o.default)(e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=t.slice(0),n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var a=e("lodash/mergeWith"),o=n(a);t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"lodash/mergeWith":516}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return i.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.exports=r.default},{"babel-types":169}],34:[function(e,t,r){"use strict";function n(e,t){return e.reduce(function(e,r){return e||(0,s.default)(r,t)},null)}r.__esModule=!0,r.default=n;var i=e("./resolve"),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.exports=r.default},{"./resolve":37}],35:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}r.__esModule=!0,r.default=s;var a=e("./resolve-from-possible-names"),o=i(a),u=e("./get-possible-plugin-names"),l=i(u);t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":30,"./resolve-from-possible-names":34,_process:539}],36:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}r.__esModule=!0,r.default=s;var a=e("./resolve-from-possible-names"),o=i(a),u=e("./get-possible-preset-names"),l=i(u);t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":31,"./resolve-from-possible-names":34,_process:539}],37:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/helpers/typeof"),a=i(s);r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===u.default?"undefined":(0,a.default)(u.default)))return null;var r=p[t];if(!r){r=new u.default;var i=c.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=u.default._nodeModulePaths(t),p[t]=r}try{return u.default._resolveFilename(e,r)}catch(e){return null}};var o=e("module"),u=i(o),l=e("path"),c=i(l),p={};t.exports=r.default}).call(this,e("_process"))},{_process:539,"babel-runtime/helpers/typeof":131,module:182,path:535}],38:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/map"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c),h=function(e){function t(){(0,o.default)(this,t);var r=(0,l.default)(this,e.call(this));return r.dynamicData={},r}return(0,p.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(s.default);r.default=h,t.exports=r.default},{"babel-runtime/core-js/map":115,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],39:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=b.functionExpression(null,[b.identifier("global")],b.blockStatement(r)),i=b.program([b.expressionStatement(b.callExpression(n,[c.get("selfGlobal")]))]);return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.assignmentExpression("=",b.memberExpression(b.identifier("global"),e),b.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.identifier("global"))])),t(r),b.program([v({FACTORY_PARAMETERS:b.identifier("global"),BROWSER_ARGUMENTS:b.assignmentExpression("=",b.memberExpression(b.identifier("root"),e),b.objectExpression([])),COMMON_ARGUMENTS:b.identifier("exports"),AMD_ARGUMENTS:b.arrayExpression([b.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:b.identifier("this")})])}function o(e,t){var r=[];return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.objectExpression([]))])),t(r),r.push(b.expressionStatement(e)),b.program(r)}function u(e,t,r){c.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=b.identifier(n);e.push(b.expressionStatement(b.assignmentExpression("=",b.memberExpression(t,i),c.get(n))))}})}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=b.identifier("babelHelpers"),n=function(t){return u(t,r,e)},i=void 0,l={global:s,umd:a,var:o}[t];if(!l)throw new Error(d.get("unsupportedOutputType",t));return i=l(r,n),(0,h.default)(i).code};var l=e("babel-helpers"),c=i(l),p=e("babel-generator"),h=n(p),f=e("babel-messages"),d=i(f),m=e("babel-template"),y=n(m),g=e("babel-types"),b=i(g),v=(0,y.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":78,"babel-helpers":102,"babel-messages":103,"babel-template":132,"babel-types":169}],40:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/core-js/object/create"),u=i(o),l=e("babel-runtime/core-js/object/assign"),c=i(l),p=e("babel-runtime/helpers/classCallCheck"),h=i(p),f=e("babel-runtime/helpers/possibleConstructorReturn"),d=i(f),m=e("babel-runtime/helpers/inherits"),y=i(m),g=e("babel-helpers"),b=i(g),v=e("./metadata"),x=n(v),E=e("convert-source-map"),A=i(E),D=e("./options/option-manager"),C=i(D),S=e("../plugin-pass"),_=i(S),w=e("babel-traverse"),k=i(w),F=e("source-map"),T=i(F),P=e("babel-generator"),B=i(P),O=e("babel-code-frame"),j=i(O),N=e("lodash/defaults"),I=i(N),L=e("./logger"),M=i(L),R=e("../../store"),U=i(R),V=e("babylon"),q=e("../../util"),G=n(q),X=e("path"),J=i(X),W=e("babel-types"),K=n(W),z=e("../../helpers/resolve"),Y=i(z),H=e("../internal-plugins/block-hoist"),$=i(H),Q=e("../internal-plugins/shadow-functions"),Z=i(Q),ee=/^#!.*/,te=[[$.default],[Z.default]],re={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},ne=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,h.default)(this,n);var i=(0,d.default)(this,r.call(this));return i.pipeline=t,i.log=new M.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,c.default)((0,u.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new w.Hub(i),i}return(0,y.default)(n,r),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(K.isModuleDeclaration(s)){e=!0;break}}e&&this.path.traverse(x,this)},n.prototype.initOptions=function(e){e=new C.default(this.log,this.pipeline).init(e),e.inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=J.default.basename(e.filename,J.default.extname(e.filename)),e.ignore=G.arrayify(e.ignore,G.regexify),e.only&&(e.only=G.arrayify(e.only,G.regexify)),(0,I.default)(e,{moduleRoot:e.sourceRoot}),(0,I.default)(e,{sourceRoot:e.moduleRoot}),(0,I.default)(e,{filenameRelative:e.filename});var t=J.default.basename(e.filenameRelative);return(0,I.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=e.plugins.concat(te),r=[],n=[],i=t,s=Array.isArray(i),o=0,i=s?i:(0,a.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,c=l[0],p=l[1];r.push(c.visitor),n.push(new _.default(this,c,p)),c.manipulateOptions&&c.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(r),this.pluginPasses.push(n)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(K.importNamespaceSpecifier(i)):"default"===t?s.push(K.importDefaultSpecifier(i)):s.push(K.importSpecifier(i,K.identifier(t)));var a=K.importDeclaration(s,K.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return K.memberExpression(n,K.identifier(e));var s=(0,b.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return K.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=K.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,k.default)(e,re,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new T.default.SourceMapConsumer(t),n=new T.default.SourceMapConsumer(e),i=new T.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=V.parse,i=this.opts.parserOpts;if(i&&(i=(0,c.default)({},this.parserOpts,i),i.parser)){if("string"==typeof i.parser){var s=J.default.dirname(this.opts.filename)||t.cwd(),a=(0,Y.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,V.parse)(e,i)}}}this.log.debug("Parse start");var o=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),o},n.prototype._addAst=function(e){this.path=w.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e<this.pluginPasses.length;e++){var t=this.pluginPasses[e];this.call("pre",t),this.log.debug("Start transform traverse");var r=k.default.visitors.merge(this.pluginVisitors[e],t,this.opts.wrapPluginVisitorMethod);(0,k.default)(this.ast,r,this.scope),this.log.debug("End transform traverse"),this.call("post",t)}return this.generate()},n.prototype.wrap=function(e,r){e+="";try{return this.shouldIgnore()?this.makeResult({code:e,ignored:!0}):r()}catch(r){if(r._babel)throw r;r._babel=!0;var n=r.message=this.opts.filename+": "+r.message,i=r.loc;if(i&&(r.codeFrame=(0,j.default)(e,i.line,i.column+1,this.opts),n+="\n"+r.codeFrame),t.browser&&(r.message=n),r.stack){var s=r.stack.replace(r.message,n);r.stack=s}throw r}},n.prototype.addCode=function(e){e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e},n.prototype.parseCode=function(){this.parseShebang();var e=this.parse(this.code);this.addAst(e)},n.prototype.shouldIgnore=function(){var e=this.opts;return G.shouldIgnore(e.filename,e.ignore,e.only)},n.prototype.call=function(e,t){for(var r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s,u=o.plugin,l=u[e];l&&l.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=A.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=A.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=ee.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(ee,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=B.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=J.default.dirname(this.opts.filename)||t.cwd(),o=(0,Y.default)(s,a);if(!o)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(o).print}this.log.debug("Generation start");var u=s(n,r.generatorOpts?(0,c.default)(r,r.generatorOpts):r,this.code);return i.code=u.code,i.map=u.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+A.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(U.default);r.default=ne,r.File=ne}).call(this,e("_process"))},{"../../helpers/resolve":37,"../../store":38,"../../util":54,"../internal-plugins/block-hoist":49,"../internal-plugins/shadow-functions":50,"../plugin-pass":52,"./logger":41,"./metadata":42,"./options/option-manager":46,_process:539,"babel-code-frame":23,"babel-generator":78,"babel-helpers":102,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/assign":117,"babel-runtime/core-js/object/create":118,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"babel-types":169,babylon:177,"convert-source-map":187,"lodash/defaults":484,path:535,"source-map":65}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("debug/node"),o=n(a),u=(0,o.default)("babel:verbose"),l=(0,o.default)("babel"),c=[],p=function(){function e(t,r){(0,s.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),c.indexOf(e)>=0||(c.push(e),console.error(e)))},e.prototype.verbose=function(e){u.enabled&&u(this._buildMessage(e))},e.prototype.debug=function(e){l.enabled&&l(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=p,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127,"debug/node":295}],42:[function(e,t,r){"use strict";function n(e,t){var r=e.node,n=r.source?r.source.value:null,i=t.metadata.modules.exports,s=e.get("declaration");if(s.isStatement()){var o=s.getBindingIdentifiers();for(var l in o)i.exported.push(l),i.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers)for(var c=r.specifiers,p=Array.isArray(c),h=0,c=p?c:(0,a.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f,m=d.exported.name;i.exported.push(m),u.isExportDefaultSpecifier(d)&&i.specifiers.push({kind:"external",local:m,exported:m,source:n}),u.isExportNamespaceSpecifier(d)&&i.specifiers.push({kind:"external-namespace",exported:m,source:n});var y=d.local;y&&(n&&i.specifiers.push({kind:"external",local:y.name,exported:m,source:n}),n||i.specifiers.push({kind:"local",local:y.name,exported:m}))}e.isExportAllDeclaration()&&i.specifiers.push({kind:"external-all",source:n})}function i(e){e.skip()}r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var s=e("babel-runtime/core-js/get-iterator"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);r.ExportDeclaration=n,r.Scope=i;var o=e("babel-types"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o);r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,n=[],i=[];t.metadata.modules.imports.push({source:r.source.value,imported:i,specifiers:n});for(var s=e.get("specifiers"),o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(i.push("default"),n.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;i.push(h),n.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(i.push("*"),n.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],43:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=E[e];return null==t?E[e]=x.default.existsSync(e):t}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new D(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&b.default.dirname(r)}),n.configs}r.__esModule=!0;var o=e("babel-runtime/core-js/object/assign"),u=i(o),l=e("babel-runtime/helpers/classCallCheck"),c=i(l);r.default=a;var p=e("../../../helpers/resolve"),h=i(p),f=e("json5"),d=i(f),m=e("path-is-absolute"),y=i(m),g=e("path"),b=i(g),v=e("fs"),x=i(v),E={},A={},D=function(){function e(t){(0,c.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,y.default)(e)||(e=b.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=b.default.dirname(e));){if(!t){var i=b.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=b.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=b.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=x.default.readFileSync(e,"utf8"),r=t.split("\n");r=r.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),r.length&&this.mergeConfig({options:{ignore:r},alias:e,dirname:b.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=x.default.readFileSync(e,"utf8"),i=void 0;try{i=A[n]=A[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:b.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,u.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var a=(0,h.default)(t.extends,s);a?this.addConfig(a):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var o=void 0,l=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(o=t.env[l],delete t.env),this.mergeConfig({options:o,alias:r+".env."+l,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":37,_process:539,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,fs:182,json5:313,path:535,"path-is-absolute":536}],44:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],45:[function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var n=o.default[t];if(n&&n.alias&&(n=o.default[n.alias]),n){var i=s[n.type];i&&(r=i(r)),e[t]=r}}}return e}r.__esModule=!0,r.config=void 0,r.normaliseOptions=n;var i=e("./parsers"),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i),a=e("./config"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);r.config=o.default},{"./config":44,"./parsers":47}],46:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=e("babel-runtime/helpers/objectWithoutProperties"),o=s(a),u=e("babel-runtime/core-js/json/stringify"),l=s(u),c=e("babel-runtime/core-js/object/assign"),p=s(c),h=e("babel-runtime/core-js/get-iterator"),f=s(h),d=e("babel-runtime/helpers/typeof"),m=s(d),y=e("babel-runtime/helpers/classCallCheck"),g=s(y),b=e("../../../api/node"),v=i(b),x=e("../../plugin"),E=s(x),A=e("babel-messages"),D=i(A),C=e("./index"),S=e("../../../helpers/resolve-plugin"),_=s(S),w=e("../../../helpers/resolve-preset"),k=s(w),F=e("lodash/cloneDeepWith"),T=s(F),P=e("lodash/clone"),B=s(P),O=e("../../../helpers/merge"),j=s(O),N=e("./config"),I=s(N),L=e("./removed"),M=s(L),R=e("./build-config-chain"),U=s(R),V=e("path"),q=s(V),G=function(){function t(e){(0,g.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){for(var s=t.memoisedPlugins,a=Array.isArray(s),o=0,s=a?s:(0,f.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.container===e)return l.plugin}var c=void 0;if(c="function"==typeof e?e(v):e,"object"===(void 0===c?"undefined":(0,m.default)(c))){var p=new E.default(c,i);return t.memoisedPlugins.push({container:e,plugin:p}),p}throw new TypeError(D.get("pluginNotObject",r,n,void 0===c?"undefined":(0,m.default)(c))+r+n)},t.createBareOptions=function(){var e={};for(var t in I.default){
-var r=I.default[t];e[t]=(0,B.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof E.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,m.default)(e)))throw new TypeError(D.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,m.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,_.default)(a,n);if(!l)throw new ReferenceError(D.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,u=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,m.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var l=(0,T.default)(i,function(e){if(e instanceof E.default)return e});u=u||n.cwd(),o=o||a;for(var c in l){if(!I.default[c]&&this.log)if(M.default[c])this.log.error("Using removed Babel 5 option: "+a+"."+c+" - "+M.default[c].message,ReferenceError);else{var h="Unknown option: "+a+"."+c+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(h+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,C.normaliseOptions)(l),l.plugins&&(l.plugins=t.normalisePlugins(o,u,l.plugins)),l.presets&&(l.passPerPreset?l.presets=this.resolvePresets(l.presets,u,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:u})}):(this.mergePresets(l.presets,u),delete l.presets)),i===s?(0,p.default)(s,l):(0,j.default)(s||this.options,l)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:q.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,l.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var a=void 0;try{if("string"==typeof t){if(!(a=(0,k.default)(t,r)))throw new Error("Couldn't find preset "+(0,l.default)(t)+" relative to directory "+(0,l.default)(r));t=e(a)}if("object"===(void 0===t?"undefined":(0,m.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var u=t,c=(u.__esModule,(0,o.default)(u,["__esModule"]));t=c}if("object"===(void 0===t?"undefined":(0,m.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,l.default)(i)+" passed to "+(a||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(v,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,m.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,a)}catch(e){throw a&&(e.message+=" (While processing preset: "+(0,l.default)(a)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in I.default){var r=I.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,U.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,f.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=G,G.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":29,"../../../helpers/merge":32,"../../../helpers/resolve-plugin":35,"../../../helpers/resolve-preset":36,"../../plugin":53,"./build-config-chain":43,"./config":44,"./index":45,"./removed":48,_process:539,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/objectWithoutProperties":129,"babel-runtime/helpers/typeof":131,"lodash/clone":480,"lodash/cloneDeepWith":482,path:535}],47:[function(e,t,r){"use strict";function n(e){return!!e}function i(e){return l.booleanify(e)}function s(e){return l.list(e)}r.__esModule=!0,r.filename=void 0,r.boolean=n,r.booleanString=i,r.list=s;var a=e("slash"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=e("../../../util"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.filename=o.default},{"../../../util":54,slash:589}],48:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],49:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../plugin"),s=n(i),a=e("lodash/sortBy"),o=n(a);r.default=new s.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n<t.body.length;n++){var i=t.body[n];if(i&&null!=i._blockHoist){r=!0;break}}r&&(t.body=(0,o.default)(t.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),!0===t&&(t=2),-1*t}))}}}}),t.exports=r.default},{"../plugin":53,"lodash/sortBy":520}],50:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return!!e.is("_forceShadow")||t}function s(e,t){var r=e.inShadow(t);if(i(e,r)){var n=e.node._shadowedFunctionLiteral,s=void 0,a=!1,o=e.find(function(t){if(t.parentPath&&t.parentPath.isClassProperty()&&"value"===t.key)return!0;if(e===t)return!1;if((t.isProgram()||t.isFunction())&&(s=s||t),t.isProgram())return a=!0,!0;if(t.isFunction()&&!t.isArrowFunctionExpression()){if(n){if(t===n||t.node===n.node)return!0}else if(!t.is("shadow"))return!0;return a=!0,!1}return!1});if(n&&o.isProgram()&&!n.isProgram()&&(o=e.findParent(function(e){return e.isProgram()||e.isFunction()})),o!==s&&a){var u=o.getData(t);if(u)return e.replaceWith(u);var l=e.scope.generateUidIdentifier(t);o.setData(t,l);var c=o.findParent(function(e){return e.isClass()}),h=!!(c&&c.node&&c.node.superClass);if("this"===t&&o.isMethod({kind:"constructor"})&&h)o.scope.push({id:l}),o.traverse(f,{id:l});else{var d="this"===t?p.thisExpression():p.identifier(t);n&&(d._shadowedFunctionLiteral=n),o.scope.push({id:l,init:d})}return e.replaceWith(l)}}}r.__esModule=!0;var a=e("babel-runtime/core-js/symbol"),o=n(a),u=e("../plugin"),l=n(u),c=e("babel-types"),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),h=(0,o.default)("super this bound"),f={CallExpression:function(e){if(e.get("callee").isSuper()){var t=e.node;t[h]||(t[h]=!0,e.replaceWith(p.assignmentExpression("=",this.id,t)))}}};r.default=new l.default({name:"internal.shadowFunctions",visitor:{ThisExpression:function(e){s(e,"this")},ReferencedIdentifier:function(e){"arguments"===e.node.name&&s(e,"arguments")}}}),t.exports=r.default},{"../plugin":53,"babel-runtime/core-js/symbol":122,"babel-types":169}],51:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("../helpers/normalize-ast"),o=n(a),u=e("./plugin"),l=n(u),c=e("./file"),p=n(c),h=function(){function e(){(0,s.default)(this,e)}return e.prototype.lint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new p.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new p.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new l.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,o.default)(e);var n=new p.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=h,t.exports=r.default},{"../helpers/normalize-ast":33,"./file":40,"./plugin":53,"babel-runtime/helpers/classCallCheck":127}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("babel-runtime/helpers/possibleConstructorReturn"),o=n(a),u=e("babel-runtime/helpers/inherits"),l=n(u),c=e("../store"),p=n(c),h=e("./file"),f=(n(h),function(e){function t(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,s.default)(this,t);var a=(0,o.default)(this,e.call(this));return a.plugin=n,a.key=n.key,a.file=r,a.opts=i,a}return(0,l.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(p.default));r.default=f,t.exports=r.default},{"../store":38,"./file":40,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],53:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c),h=e("./file/options/option-manager"),f=n(h),d=e("babel-messages"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("../store"),g=n(y),b=e("babel-traverse"),v=n(b),x=e("lodash/assign"),E=n(x),A=e("lodash/clone"),D=n(A),C=["enter","exit"],S=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,l.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,E.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,D.default)(i.take("visitor"))||{}),i}return(0,p.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var a=r,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(c){var p=c.apply(this,n);null!=p&&(e=p)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=f.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=v.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(m.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=C,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}if(e[i])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return v.default.explode(e),e},t}(g.default);r.default=S,t.exports=r.default},{"../store":38,"./file/options/option-manager":46,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"lodash/assign":477,"lodash/clone":480}],54:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=S.default.extname(e);return(0,E.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(m.default).join("|"),"i")),"string"==typeof e){e=(0,w.default)(e),((0,g.default)(e,"./")||(0,g.default)(e,"*/"))&&(e=e.slice(2)),(0,g.default)(e,"**/")&&(e=e.slice(3));var t=v.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,D.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?"boolean"==typeof e?o([e],t):"string"==typeof e?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,h.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(c(a,e))return!1}return!0}if(t.length)for(var o=t,u=Array.isArray(o),l=0,o=u?o:(0,h.default)(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if(l=o.next(),l.done)break;p=l.value}var f=p;if(c(f,e))return!0}return!1}function c(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var p=e("babel-runtime/core-js/get-iterator"),h=n(p),f=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return f.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return f.inspect}}),r.canCompile=i,r.list=s,r.regexify=a,r.arrayify=o,r.booleanify=u,r.shouldIgnore=l;var d=e("lodash/escapeRegExp"),m=n(d),y=e("lodash/startsWith"),g=n(y),b=e("minimatch"),v=n(b),x=e("lodash/includes"),E=n(x),A=e("lodash/isRegExp"),D=n(A),C=e("path"),S=n(C),_=e("slash"),w=n(_);i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":113,"lodash/escapeRegExp":486,"lodash/includes":496,"lodash/isRegExp":508,"lodash/startsWith":521,minimatch:531,path:535,slash:589,util:601}],55:[function(e,t,r){function n(){this._array=[],this._set=Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i<s;i++)r.add(e[i],t);return r},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=i.toSetString(e),n=s.call(this._set,r),a=this._array.length;n&&!t||this._array.push(e),n||(this._set[r]=a)},n.prototype.has=function(e){var t=i.toSetString(e);return s.call(this._set,t)},n.prototype.indexOf=function(e){var t=i.toSetString(e);if(s.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},r.ArraySet=n},{"./util":64}],56:[function(e,t,r){function n(e){return e<0?1+(-e<<1):0+(e<<1)}function i(e){var t=1==(1&e),r=e>>1;return t?-r:r}var s=e("./base64");r.encode=function(e){var t,r="",i=n(e);do{t=31&i,i>>>=5,i>0&&(t|=32),r+=s.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var n,a,o=e.length,u=0,l=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&a),a&=31,u+=a<<l,l+=5}while(n);r.value=i(u),r.rest=t}},{"./base64":57}],57:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},r.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],58:[function(e,t,r){function n(e,t,i,s,a,o){var u=Math.floor((t-e)/2)+e,l=a(i,s[u],!0);return 0===l?u:l>0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t<s.length?t:-1:u:u-e>1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],59:[function(e,t,r){function n(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=i},{"./util":64}],60:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,r,a){if(r<a){var o=i(r,a),u=r-1;n(e,o,a);for(var l=e[a],c=r;c<a;c++)t(e[c],l)<=0&&(u+=1,n(e,u,c));n(e,u+1,c);var p=u+1;s(e,t,r,p-1),s(e,t,p+1,a)}}r.quickSort=function(e,t){s(e,t,0,e.length-1)}},{}],61:[function(e,t,r){function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sources"),i=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),c=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(n,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=c}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),i=o.getArg(t,"column");if(r<s.line||r===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new n(o.getArg(e,"map"))}})}var o=e("./util"),u=e("./binary-search"),l=e("./array-set").ArraySet,c=e("./base64-vlq"),p=e("./quick-sort").quickSort;n.fromSourceMap=function(e){return i.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var i,s=t||null,a=r||n.GENERATED_ORDER;switch(a){case n.GENERATED_ORDER:i=this._generatedMappings;break;case n.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},n.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,i.prototype=Object.create(n.prototype),i.prototype.consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h<f;h++){var d=a[h],m=new s;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=n.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=r.indexOf(d.name)),c.push(m)),u.push(m)}return p(t.__originalMappings,o.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?o.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var r,n,i,a,u,l=1,h=0,f=0,d=0,m=0,y=0,g=e.length,b=0,v={},x={},E=[],A=[];b<g;)if(";"===e.charAt(b))l++,b++,h=0;else if(","===e.charAt(b))b++;else{for(r=new s,r.generatedLine=l,a=b;a<g&&!this._charIsMappingSeparator(e,a);a++);if(n=e.slice(b,a),i=v[n])b+=n.length;else{for(i=[];b<a;)c.decode(e,b,x),u=x.value,b=x.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");v[n]=i}r.generatedColumn=h+i[0],h=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var r={source:t,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,a.prototype=Object.create(n.prototype),a.prototype.constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),a.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=u.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r],i=n.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer.sources.indexOf(o.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n){return{line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},a.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],u=n.consumer._sources.at(a.source);null!==n.consumer.sourceRoot&&(u=o.join(n.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=n.consumer._names.at(a.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:a.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(n.generatedOffset.generatedLine===a.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}p(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),p(this.__originalMappings,o.compareByOriginalPositions)},r.IndexedSourceMapConsumer=a},{"./array-set":55,"./base64-vlq":56,"./binary-search":58,"./quick-sort":60,"./util":64}],62:[function(e,t,r){function n(e){e||(e={}),this._file=s.getArg(e,"file",null),this._sourceRoot=s.getArg(e,"sourceRoot",null),this._skipValidation=s.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var i=e("./base64-vlq"),s=e("./util"),a=e("./array-set").ArraySet,o=e("./mapping-list").MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=s.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),r=s.getArg(e,"original",null),n=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i
-})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=s.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=s.relative(i,n));var o=new a,u=new a;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=s.join(r,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=o,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=s.join(r,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d<m;d++){if(t=f[d],e="",t.generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":55,"./base64-vlq":56,"./mapping-list":59,"./util":64}],63:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[a]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=r?s.join(r,e.source):e.source;a.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new n,o=e.split(/(\r?\n)/),u=function(){return o.shift()+(o.shift()||"")},l=1,c=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(l<e.generatedLine)){var t=o[0],r=t.substr(0,e.generatedColumn-c);return o[0]=t.substr(e.generatedColumn-c),c=e.generatedColumn,i(p,r),void(p=e)}i(p,u()),l++,c=0}for(;l<e.generatedLine;)a.add(u()),l++;if(c<e.generatedColumn){var t=o[0];a.add(t.substr(0,e.generatedColumn)),o[0]=t.substr(e.generatedColumn),c=e.generatedColumn}p=e},this),o.length>0&&(p&&i(p,u()),a.add(o.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),a.setSourceContent(e,n))}),a},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)t=this.children[r],t[a]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[a]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),t=0,r=n.length;t<r;t++)e(s.fromSetString(n[t]),this.sourceContents[n[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new i(e),n=!1,s=null,a=null,o=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&a===i.line&&o===i.column&&u===i.name||r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,a=i.line,o=i.column,u=i.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,n=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(t.line++,t.column=0,l+1===c?(s=null,n=!1):n&&r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:t.code,map:r}},r.SourceNode=n},{"./source-map-generator":62,"./util":64}],64:[function(e,t,r){function n(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}function i(e){var t=e.match(g);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function s(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(e){var t=e,n=i(e);if(n){if(!n.path)return e;t=n.path}for(var a,o=r.isAbsolute(t),u=t.split(/\/+/),l=0,c=u.length-1;c>=0;c--)a=u[c],"."===a?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return t=u.join("/"),""===t&&(t=o?"/":"."),n?(n.path=t,s(n)):t}function o(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),n=i(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),s(r);if(r||t.match(b))return t;if(n&&!n.host&&!n.path)return n.host=t,s(n);var o="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,s(n)):o}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function l(e){return e}function c(e){return h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function f(e,t,r){var n=e.source-t.source;return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name)}function d(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=e.source-t.source)?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name)}function m(e,t){return e===t?0:e>t?1:-1}function y(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=m(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:m(e.name,t.name))}r.getArg=n;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,b=/^data:.+\,.+$/;r.urlParse=i,r.urlGenerate=s,r.normalize=a,r.join=o,r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},r.relative=u;var v=function(){return!("__proto__"in Object.create(null))}();r.toSetString=v?l:c,r.fromSetString=v?l:p,r.compareByOriginalPositions=f,r.compareByGeneratedPositionsDeflated=d,r.compareByGeneratedPositionsInflated=y},{}],65:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":61,"./lib/source-map-generator":62,"./lib/source-node":63}],66:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv-v4/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.24.0",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/babel-core-6.24.0.tgz_1489371490272_0.8722315817140043"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"3.10.10",_phantomChildren:{},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz",_shasum:"8f36a0a77f5c155aed6f920b844d23ba56742a02",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/JSON/ajv-v4/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.22.0","babel-generator":"^6.24.0","babel-helpers":"^6.23.0","babel-messages":"^6.23.0","babel-register":"^6.24.0","babel-runtime":"^6.22.0","babel-template":"^6.23.0","babel-traverse":"^6.23.1","babel-types":"^6.23.0",babylon:"^6.11.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.5.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-is-absolute":"^1.0.0",private:"^0.1.6",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.22.0","babel-helper-transform-fixture-test-runner":"^6.24.0","babel-polyfill":"^6.23.0"},directories:{},dist:{shasum:"8f36a0a77f5c155aed6f920b844d23ba56742a02",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"amasad",email:"amjad.masad@gmail.com"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"jmm",email:"npm-public@jessemccarthy.net"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"thejameskyle",email:"me@thejameskyle.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.24.0"}},{}],67:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("trim-right"),o=n(a),u=/^[ \t]+$/,l=function(){function e(t){(0,s.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,o.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&u.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s<e.length;s++)"\n"===e[s]?(this._position.line++,this._position.column=0):this._position.column++},e.prototype.removeTrailingNewline=function(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r<e.length;r++)"\n"===e[r]&&t++;return this._position.line+t},e}();r.default=l,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127,"trim-right":596}],68:[function(e,t,r){"use strict";function n(e){this.print(e.program,e)}function i(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline(),this.printSequence(e.body,e)}function s(e){this.token("{"),this.printInnerComments(e);var t=e.directives&&e.directives.length;e.body.length||t?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),t&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith("\n")||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))}function a(){}function o(e){this.print(e.value,e),this.semicolon()}r.__esModule=!0,r.File=n,r.Program=i,r.BlockStatement=s,r.Noop=a,r.Directive=o;var u=e("./types");Object.defineProperty(r,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},{"./types":77}],69:[function(e,t,r){"use strict";function n(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function i(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e)),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function a(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}r.__esModule=!0,r.ClassDeclaration=n,r.ClassBody=i,r.ClassProperty=s,r.ClassMethod=a,r.ClassExpression=n},{}],70:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function s(e){this.word("do"),this.space(),this.print(e.body,e)}function a(e){this.token("("),this.print(e.expression,e),this.token(")")}function o(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function u(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function l(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||_.isCallExpression(t,{callee:e})||_.isMemberExpression(t)||_.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function c(e){this.printList(e.expressions,e)}function p(){this.word("this")}function h(){this.word("super")}function f(e){this.token("@"),this.print(e.expression,e),this.newline()}function d(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function m(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=d,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function y(){this.word("import")}function g(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function b(){this.semicolon(!0)}function v(e){this.print(e.expression,e),this.semicolon()}function x(e){this.print(e.left,e),e.left.optional&&this.token("?"),this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function E(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!k.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function A(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function D(e){if(this.print(e.object,e),!e.computed&&_.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;_.isLiteral(e.property)&&"number"==typeof e.property.value&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function C(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}r.__esModule=!0,r.LogicalExpression=r.BinaryExpression=r.AwaitExpression=r.YieldExpression=void 0,r.UnaryExpression=i,r.DoExpression=s,r.ParenthesizedExpression=a,r.UpdateExpression=o,r.ConditionalExpression=u,r.NewExpression=l,r.SequenceExpression=c,r.ThisExpression=p,r.Super=h,r.Decorator=f,r.CallExpression=m,r.Import=y,r.EmptyStatement=b,r.ExpressionStatement=v,r.AssignmentPattern=x,r.AssignmentExpression=E,r.BindExpression=A,r.MemberExpression=D,r.MetaProperty=C;var S=e("babel-types"),_=n(S),w=e("../node"),k=n(w);r.YieldExpression=g("yield"),r.AwaitExpression=g("await");r.BinaryExpression=E,r.LogicalExpression=E},{"../node":79,"babel-types":169}],71:[function(e,t,r){"use strict";function n(){this.word("any")}function i(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("boolean")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e){this.word("declare"),this.space(),this.word("class"),this.space(),this._interfaceish(e)}function l(e){this.word("declare"),this.space(),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()}function c(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)}function p(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)}function h(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)}function f(e){this.word("declare"),this.space(),this.TypeAlias(e)}function d(e){this.word("declare"),this.space(),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()}function m(){this.token("*")}function y(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)}function g(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)}function b(e){this.print(e.id,e),this.print(e.typeParameters,e)}function v(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)}function x(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")}function E(e){this.word("interface"),this.space(),this._interfaceish(e)}function A(){this.space(),this.token("&"),this.space()}function D(e){this.printJoin(e.types,e,{separator:A})}function C(){this.word("mixed")}function S(){this.word("empty")}function _(e){this.token("?"),this.print(e.typeAnnotation,e)}function w(){this.word("number")}function k(){this.word("string")}function F(){this.word("this")}function T(e){this.token("["),this.printList(e.types,e),this.token("]")}function P(e){this.word("typeof"),this.space(),this.print(e.argument,e)}function B(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()}function O(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)}function j(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))}function N(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function I(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")}function L(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)}function M(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)}function R(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)}function U(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)}function V(){this.space(),this.token("|"),this.space()}function q(e){this.printJoin(e.types,e,{separator:V})}function G(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")}function X(){this.word("void")}r.__esModule=!0,r.AnyTypeAnnotation=n,r.ArrayTypeAnnotation=i,r.BooleanTypeAnnotation=s,r.BooleanLiteralTypeAnnotation=a,r.NullLiteralTypeAnnotation=o,r.DeclareClass=u,r.DeclareFunction=l,r.DeclareInterface=c,r.DeclareModule=p,r.DeclareModuleExports=h,r.DeclareTypeAlias=f,r.DeclareVariable=d,r.ExistentialTypeParam=m,r.FunctionTypeAnnotation=y,r.FunctionTypeParam=g,r.InterfaceExtends=b,r._interfaceish=v,r._variance=x,r.InterfaceDeclaration=E,r.IntersectionTypeAnnotation=D,r.MixedTypeAnnotation=C,r.EmptyTypeAnnotation=S,r.NullableTypeAnnotation=_;var J=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.StringLiteral}}),r.NumberTypeAnnotation=w,r.StringTypeAnnotation=k,r.ThisTypeAnnotation=F,r.TupleTypeAnnotation=T,r.TypeofTypeAnnotation=P,r.TypeAlias=B,r.TypeAnnotation=O,r.TypeParameter=j,r.TypeParameterInstantiation=N,r.ObjectTypeAnnotation=I,r.ObjectTypeCallProperty=L,r.ObjectTypeIndexer=M,r.ObjectTypeProperty=R,r.QualifiedTypeIdentifier=U,r.UnionTypeAnnotation=q,r.TypeCastExpression=G,r.VoidTypeAnnotation=X,r.ClassImplements=b,r.GenericTypeAnnotation=b,r.TypeParameterDeclaration=N},{"./types":77}],72:[function(e,t,r){"use strict";function n(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))}function i(e){this.word(e.name)}function s(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)}function a(e){this.print(e.object,e),this.token("."),this.print(e.property,e)}function o(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")}function u(e){this.token("{"),this.print(e.expression,e),this.token("}")}function l(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")}function c(e){this.token(e.value)}function p(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(var r=e.children,n=Array.isArray(r),i=0,r=n?r:(0,g.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.print(a,e)}this.dedent(),this.print(e.closingElement,e)}}function h(){this.space()}function f(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:h})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")}function d(e){this.token("</"),this.print(e.name,e),this.token(">")}function m(){}r.__esModule=!0;var y=e("babel-runtime/core-js/get-iterator"),g=function(e){return e&&e.__esModule?e:{default:e}}(y);r.JSXAttribute=n,r.JSXIdentifier=i,r.JSXNamespacedName=s,r.JSXMemberExpression=a,r.JSXSpreadAttribute=o,r.JSXExpressionContainer=u,r.JSXSpreadChild=l,r.JSXText=c,r.JSXElement=p,r.JSXOpeningElement=f,r.JSXClosingElement=d,r.JSXEmptyExpression=m},{"babel-runtime/core-js/get-iterator":113}],73:[function(e,t,r){"use strict";function n(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)}function i(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)}function s(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}function a(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&l.isIdentifier(t)&&!o(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)}function o(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=n,r._method=i,r.FunctionExpression=s,r.ArrowFunctionExpression=a;var u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.FunctionDeclaration=s},{"babel-types":169}],74:[function(e,t,r){"use strict";function n(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function i(e){this.print(e.local,e)}function s(e){this.print(e.exported,e)}function a(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function o(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}function u(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()}function l(){this.word("export"),this.space(),p.apply(this,arguments)}function c(){this.word("export"),this.space(),this.word("default"),this.space(),p.apply(this,arguments)}function p(e){if(e.declaration){var t=e.declaration;this.print(t,e),m.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var i=r[0];if(!m.isExportDefaultSpecifier(i)&&!m.isExportNamespaceSpecifier(i))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}function h(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!m.isImportDefaultSpecifier(r)&&!m.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()}function f(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)}r.__esModule=!0,r.ImportSpecifier=n,r.ImportDefaultSpecifier=i,r.ExportDefaultSpecifier=s,r.ExportSpecifier=a,
-r.ExportNamespaceSpecifier=o,r.ExportAllDeclaration=u,r.ExportNamedDeclaration=l,r.ExportDefaultDeclaration=c,r.ImportDeclaration=h,r.ImportNamespaceSpecifier=f;var d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d)},{"babel-types":169}],75:[function(e,t,r){"use strict";function n(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)}function i(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&D.isIfStatement(s(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))}function s(e){return D.isStatement(e.body)?s(e.body):e}function a(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)}function o(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)}function u(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function c(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)}function p(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))}function h(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)}function f(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")}function d(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))}function m(){this.word("debugger"),this.semicolon()}function y(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function g(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}function b(e,t){this.word(e.kind),this.space();var r=!1;if(!D.isFor(t))for(var n=e.declarations,i=Array.isArray(n),s=0,n=i?n:(0,E.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;o.init&&(r=!0)}var u=void 0;r&&(u="const"===e.kind?g:y),this.printList(e.declarations,e,{separator:u}),(!D.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()}function v(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var x=e("babel-runtime/core-js/get-iterator"),E=function(e){return e&&e.__esModule?e:{default:e}}(x);r.WithStatement=n,r.IfStatement=i,r.ForStatement=a,r.WhileStatement=o,r.DoWhileStatement=u,r.LabeledStatement=c,r.TryStatement=p,r.CatchClause=h,r.SwitchStatement=f,r.SwitchCase=d,r.DebuggerStatement=m,r.VariableDeclaration=b,r.VariableDeclarator=v;var A=e("babel-types"),D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(A),C=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=C("in"),r.ForOfStatement=C("of"),r.ForAwaitStatement=C("await"),r.ContinueStatement=l("continue"),r.ReturnStatement=l("return","argument"),r.BreakStatement=l("break"),r.ThrowStatement=l("throw","argument")},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],76:[function(e,t,r){"use strict";function n(e){this.print(e.tag,e),this.print(e.quasi,e)}function i(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)}function s(e){for(var t=e.quasis,r=0;r<t.length;r++)this.print(t[r],e),r+1<t.length&&this.print(e.expressions[r],e)}r.__esModule=!0,r.TaggedTemplateExpression=n,r.TemplateElement=i,r.TemplateLiteral=s},{}],77:[function(e,t,r){"use strict";function n(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function i(e){this.token("..."),this.print(e.argument,e)}function s(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function a(e){this.printJoin(e.decorators,e),this._method(e)}function o(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(m.isAssignmentPattern(e.value)&&m.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&m.isIdentifier(e.key)&&m.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)}function u(e){var t=e.elements,r=t.length;this.token("["),this.printInnerComments(e);for(var n=0;n<t.length;n++){var i=t[n];i?(n>0&&this.space(),this.print(i,e),n<r-1&&this.token(",")):this.token(",")}this.token("]")}function l(e){this.word("/"+e.pattern+"/"+e.flags)}function c(e){this.word(e.value?"true":"false")}function p(){this.word("null")}function h(e){var t=this.getPossibleRaw(e),r=e.value+"";null==t?this.number(r):this.format.minified?this.number(t.length<r.length?t:r):this.number(t)}function f(e,t){var r=this.getPossibleRaw(e);if(!this.format.minified&&null!=r)return void this.token(r);var n={quotes:m.isJSX(t)?"double":this.format.quotes,wrap:!0};this.format.jsonCompatibleStrings&&(n.json=!0);var i=(0,g.default)(e.value,n);return this.token(i)}r.__esModule=!0,r.ArrayPattern=r.ObjectPattern=r.RestProperty=r.SpreadProperty=r.SpreadElement=void 0,r.Identifier=n,r.RestElement=i,r.ObjectExpression=s,r.ObjectMethod=a,r.ObjectProperty=o,r.ArrayExpression=u,r.RegExpLiteral=l,r.BooleanLiteral=c,r.NullLiteral=p,r.NumericLiteral=h,r.StringLiteral=f;var d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("jsesc"),g=function(e){return e&&e.__esModule?e:{default:e}}(y);r.SpreadElement=i,r.SpreadProperty=i,r.RestProperty=i,r.ObjectPattern=s,r.ArrayPattern=u},{"babel-types":169,jsesc:312}],78:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,f.default)(e).indent;i&&" "!==i&&(n=i)}var a={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||s(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return a.minified?(a.compact=!0,a.shouldPrintComment=a.shouldPrintComment||function(){return a.comments}):a.shouldPrintComment=a.shouldPrintComment||function(e){return a.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===a.compact&&(a.compact=e.length>5e5,a.compact&&console.error("[BABEL] "+g.get("codeGeneratorDeopt",t.filename,"500KB"))),a.compact&&(a.indent.adjustMultilineComment=!1),a}function s(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i<t.length;i++){var s=t[i];if("string"===s.type.label){if("'"===e.slice(s.start,s.end)[0]?r.single++:r.double++,++n>=3)break}}return r.single>r.double?"single":"double"}r.__esModule=!0,r.CodeGenerator=void 0;var a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c);r.default=function(e,t,r){return new x(e,t,r).generate()};var h=e("detect-indent"),f=n(h),d=e("./source-map"),m=n(d),y=e("babel-messages"),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(y),b=e("./printer"),v=n(b),x=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments[2];(0,o.default)(this,t);var a=r.tokens||[],u=i(s,n,a),c=n.sourceMaps?new m.default(n,s):null,p=(0,l.default)(this,e.call(this,u,c,a));return p.ast=r,p}return(0,p.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(v.default);r.CodeGenerator=function(){function e(t,r,n){(0,o.default)(this,e),this._generator=new x(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":82,"./source-map":83,"babel-messages":103,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"detect-indent":299}],79:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}for(var r={},n=(0,m.default)(e),i=Array.isArray(n),s=0,n=i?n:(0,f.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a,u=E.FLIPPED_ALIAS_KEYS[o];if(u)for(var l=u,c=Array.isArray(l),p=0,l=c?l:(0,f.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var d=h;t(d,e[o])}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!E.isCallExpression(e)||!!E.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;E.isExpressionStatement(e)&&(e=e.expression);var n=a(D,e,t);if(!n){var i=a(C,e,t);if(i)for(var s=0;s<i.length&&!(n=u(i[s],e,r));s++);}return n&&n[r]||0}function l(e,t){return u(e,t,"before")}function c(e,t){return u(e,t,"after")}function p(e,t,r){return!!t&&(!(!E.isNewExpression(t)||t.callee!==e||!o(e))||a(A,e,t,r))}r.__esModule=!0;var h=e("babel-runtime/core-js/get-iterator"),f=i(h),d=e("babel-runtime/core-js/object/keys"),m=i(d);r.needsWhitespace=u,r.needsWhitespaceBefore=l,r.needsWhitespaceAfter=c,r.needsParens=p;var y=e("./whitespace"),g=i(y),b=e("./parentheses"),v=n(b),x=e("babel-types"),E=n(x),A=s(v),D=s(g.default.nodes),C=s(g.default.list)},{"./parentheses":80,"./whitespace":81,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/keys":120,"babel-types":169}],80:[function(e,t,r){"use strict";function n(e,t){return v.isArrayTypeAnnotation(t)}function i(e,t){return v.isMemberExpression(t)&&t.object===e}function s(e,t,r){return g(r,{considerArrow:!0})}function a(e,t,r){return g(r)}function o(e,t){if((v.isCallExpression(t)||v.isNewExpression(t))&&t.callee===e||v.isUnaryLike(t)||v.isMemberExpression(t)&&t.object===e||v.isAwaitExpression(t))return!0;if(v.isBinary(t)){var r=t.operator,n=x[r],i=e.operator,s=x[i];if(n===s&&t.right===e&&!v.isLogicalExpression(t)||n>s)return!0}return!1}function u(e,t){return"in"===e.operator&&(v.isVariableDeclarator(t)||v.isFor(t))}function l(e,t){return!(v.isForStatement(t)||v.isThrowStatement(t)||v.isReturnStatement(t)||v.isIfStatement(t)&&t.test===e||v.isWhileStatement(t)&&t.test===e||v.isForInStatement(t)&&t.right===e||v.isSwitchStatement(t)&&t.discriminant===e||v.isExpressionStatement(t)&&t.expression===e)}function c(e,t){return v.isBinary(t)||v.isUnaryLike(t)||v.isCallExpression(t)||v.isMemberExpression(t)||v.isNewExpression(t)||v.isConditionalExpression(t)&&e===t.test}function p(e,t,r){return g(r,{considerDefaultExports:!0})}function h(e,t){return v.isMemberExpression(t,{object:e})||v.isCallExpression(t,{callee:e})||v.isNewExpression(t,{callee:e})}function f(e,t,r){return g(r,{considerDefaultExports:!0})}function d(e,t){return!!(v.isExportDeclaration(t)||v.isBinaryExpression(t)||v.isLogicalExpression(t)||v.isUnaryExpression(t)||v.isTaggedTemplateExpression(t))||h(e,t)}function m(e,t){return!!(v.isUnaryLike(t)||v.isBinary(t)||v.isConditionalExpression(t,{test:e})||v.isAwaitExpression(t))||h(e,t)}function y(e){return!!v.isObjectPattern(e.left)||m.apply(void 0,arguments)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a];a--;for(var u=e[a];a>0;){if(v.isExpressionStatement(u,{expression:o})||v.isTaggedTemplateExpression(u)||s&&v.isExportDefaultDeclaration(u,{declaration:o})||n&&v.isArrowFunctionExpression(u,{body:o}))return!0;if(!(v.isCallExpression(u,{callee:o})||v.isSequenceExpression(u)&&u.expressions[0]===o||v.isMemberExpression(u,{object:o})||v.isConditional(u,{test:o})||v.isBinary(u,{left:o})||v.isAssignmentExpression(u,{left:o})))return!1;o=u,a--,u=e[a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=i,r.ObjectExpression=s,r.DoExpression=a,r.Binary=o,r.BinaryExpression=u,r.SequenceExpression=l,r.YieldExpression=c,r.ClassExpression=p,r.UnaryLike=h,r.FunctionExpression=f,r.ArrowFunctionExpression=d,r.ConditionalExpression=m,r.AssignmentExpression=y;var b=e("babel-types"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=c},{"babel-types":169}],81:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):l.isBinary(e)||l.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):l.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):l.isFunction(e)?t.hasFunction=!0:l.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return l.isMemberExpression(e)?i(e.object)||i(e.property):l.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:l.isCallExpression(e)?i(e.callee):!(!l.isBinary(e)&&!l.isAssignmentExpression(e))&&(l.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return l.isLiteral(e)||l.isObjectExpression(e)||l.isArrayExpression(e)||l.isIdentifier(e)||l.isMemberExpression(e)}var a=e("lodash/map"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(l.isFunction(e.left)||l.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(l.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var r=e.declarations[t],a=i(r.id)&&!s(r.init);if(!a){var o=n(r.init);a=i(r.init)&&o.hasCall||o.hasFunction}if(a)return{before:!0,after:!0}}},IfStatement:function(e){if(l.isBlockStatement(e.consequent))return{before:!0,after:!0}}},r.nodes.ObjectProperty=r.nodes.ObjectTypeProperty=r.nodes.ObjectMethod=r.nodes.SpreadProperty=function(e,t){if(t.properties[0]===e)return{before:!0}},r.list={VariableDeclaration:function(e){return(0,o.default)(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function(e){var t=e[0],n=e[1];"boolean"==typeof n&&(n={after:n,before:n}),[t].concat(l.FLIPPED_ALIAS_KEYS[t]||[]).forEach(function(e){r.nodes[e]=function(){return n}})})},{"babel-types":169,"lodash/map":514}],82:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){this.token(","),this.space()}r.__esModule=!0;var a=e("babel-runtime/core-js/object/assign"),o=i(a),u=e("babel-runtime/core-js/get-iterator"),l=i(u),c=e("babel-runtime/core-js/json/stringify"),p=i(c),h=e("babel-runtime/core-js/weak-set"),f=i(h),d=e("babel-runtime/helpers/classCallCheck"),m=i(d),y=e("lodash/find"),g=i(y),b=e("lodash/findLast"),v=i(b),x=e("lodash/isInteger"),E=i(x),A=e("lodash/repeat"),D=i(A),C=e("./buffer"),S=i(C),_=e("./node"),w=n(_),k=e("./whitespace"),F=i(k),T=e("babel-types"),P=n(T),B=/e/i,O=/\.0+$/,j=/^0[box]/,N=function(){function e(t,r,n){(0,m.default)(this,e),this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._printedCommentStarts={},this._parenPushNewlineState=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new f.default,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=t||{},this._buf=new S.default(r),this._whitespace=n.length>0?new F.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,E.default)(+e)&&!j.test(e)&&!B.test(e)&&!O.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t<e;t++)this._newline()}},e.prototype.endsWith=function(e){return this._buf.endsWith(e)},e.prototype.removeTrailingNewline=function(){this._buf.removeTrailingNewline()},e.prototype.source=function(e,t){this._catchUp(e,t),this._buf.source(e,t)},e.prototype.withSource=function(e,t,r){this._catchUp(e,t),this._buf.withSource(e,t,r)},e.prototype._space=function(){this._append(" ",!0)},e.prototype._newline=function(){this._append("\n",!0)},e.prototype._append=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r<e.length&&" "===e[r];r++);if(r!==e.length){var n=e[r];"\n"!==n&&"/"!==n||(this.token("("),this.indent(),t.printed=!0)}}},e.prototype._catchUp=function(e,t){if(this.format.retainLines){var r=t?t[e]:null;if(r&&null!==r.line)for(var n=r.line-this._buf.getCurrentLine(),i=0;i<n;i++)this._newline()}},e.prototype._getIndent=function(){return(0,D.default)(this.format.indent.style,this._indent)},e.prototype.startTerminatorless=function(){return this._parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.token(")"))},e.prototype.print=function(e,t){var r=this;if(e){var n=this.format.concise;e._compact&&(this.format.concise=!0);if(!this[e.type])throw new ReferenceError("unknown node of type "+(0,p.default)(e.type)+" with constructor "+(0,p.default)(e&&e.constructor.name));this._printStack.push(e);var i=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!i);var s=w.needsParens(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(s=!0),s&&this.token("("),this._printLeadingComments(e,t);var a=P.isProgram(e)||P.isFile(e)?null:e.loc;this.withSource("start",a,function(){r[e.type](e,t)}),this._printTrailingComments(e,t),s&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}},e.prototype._maybeAddAuxComment=function(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()},e.prototype._printAuxBeforeComment=function(){if(!this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!0;var e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype._printAuxAfterComment=function(){if(this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!1;var e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype.getPossibleRaw=function(e){var t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw},e.prototype.printJoin=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i<e.length;i++){var s=e[i];s&&(r.statement&&this._printNewline(!0,s,t,n),this.print(s,t),r.iterator&&r.iterator(s,i),r.separator&&i<e.length-1&&r.separator.call(this),r.statement&&this._printNewline(!1,s,t,n))}r.indent&&this.dedent()}},e.prototype.printAndIndentOnComments=function(e,t){var r=!!e.leadingComments;r&&this.indent(),this.print(e,t),r&&this.dedent()},e.prototype.printBlock=function(e){var t=e.body;P.isEmptyStatement(t)||this.space(),this.print(t,e)},e.prototype._printTrailingComments=function(e,t){this._printComments(this._getComments(!1,e,t))},e.prototype._printLeadingComments=function(e,t){this._printComments(this._getComments(!0,e,t))},e.prototype.printInnerComments=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,g.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,v.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=w.needsWhitespaceAfter;e&&(c=w.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,D.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this._printComment(s)}},e}();r.default=N;for(var I=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],L=0;L<I.length;L++){var M=I[L];(0,o.default)(N.prototype,M)}t.exports=r.default},{"./buffer":67,"./generators/base":68,"./generators/classes":69,"./generators/expressions":70,"./generators/flow":71,"./generators/jsx":72,"./generators/methods":73,"./generators/modules":74,"./generators/statements":75,"./generators/template-literals":76,"./generators/types":77,"./node":79,"./whitespace":84,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/assign":117,"babel-runtime/core-js/weak-set":126,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,"lodash/find":488,"lodash/findLast":490,"lodash/isInteger":503,"lodash/repeat":519}],83:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/object/keys"),s=n(i),a=e("babel-runtime/helpers/typeof"),o=n(a),u=e("babel-runtime/helpers/classCallCheck"),l=n(u),c=e("source-map"),p=n(c),h=function(){function e(t,r){(0,l.default)(this,e),this._cachedMap=null,this._code=r,this._opts=t,this._rawMappings=[]}return e.prototype.get=function(){if(!this._cachedMap){var e=this._cachedMap=new p.default.SourceMapGenerator({file:this._opts.sourceMapTarget,sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName,t):"object"===(void 0===t?"undefined":(0,o.default)(t))&&(0,s.default)(t).forEach(function(r){e.setSourceContent(r,t[r])}),this._rawMappings.forEach(e.addMapping,e)}return this._cachedMap.toJSON()},e.prototype.getRawMappings=function(){return this._rawMappings.slice()},e.prototype.mark=function(e,t,r,n,i,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===n||(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==r?void 0:s||this._opts.sourceFileName,original:null==r?void 0:{line:r,column:n}}))},e}();r.default=h,t.exports=r.default},{"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/typeof":131,"source-map":95}],84:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(){function e(t){(0,i.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.start-e.start},0,n.length);if(i>=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],r=n[i+1],","===r.type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s<n;s++)void 0===this.used[s]&&(this.used[s]=!0,i++);return i},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],85:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"./util":94,dup:55}],86:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{"./base64":87,dup:56}],87:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{dup:57}],88:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],89:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{"./util":94,dup:59}],90:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60}],91:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./binary-search":88,"./quick-sort":90,"./util":94,dup:61}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./mapping-list":89,"./util":94,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./source-map-generator":92,"./util":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./lib/source-map-consumer":91,"./lib/source-map-generator":92,"./lib/source-node":93,dup:65}],96:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return!g.isClassMethod(e)&&!g.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}function s(e,t,r,n,s){var a=g.toKeyAlias(t),o={};if((0,m.default)(e,a)&&(o=e[a]),e[a]=o,o._inherits=o._inherits||[],o._inherits.push(t),o._key=t.key,t.computed&&(o._computed=!0),t.decorators){var u=o.decorators=o.decorators||g.arrayExpression([]);u.elements=u.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(o.value||o.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var l=void 0,c=void 0;(g.isObjectProperty(t)||g.isObjectMethod(t)||g.isClassMethod(t))&&(l=g.toComputedKey(t,t.key)),
-g.isObjectProperty(t)||g.isClassProperty(t)?c=t.value:(g.isObjectMethod(t)||g.isClassMethod(t))&&(c=g.functionExpression(null,t.params,t.body,t.generator,t.async),c.returnType=t.returnType);var p=i(t);return r&&"value"===p||(r=p),s&&g.isStringLiteral(l)&&("value"===r||"initializer"===r)&&g.isFunctionExpression(c)&&(c=(0,f.default)({id:l,node:c,scope:s})),c&&(g.inheritsComments(c,t),o[r]=c),o}function a(e){for(var t in e)if(e[t]._computed)return!0;return!1}function o(e){for(var t=g.arrayExpression([]),r=0;r<e.properties.length;r++){var n=e.properties[r],i=n.value;i.properties.unshift(g.objectProperty(g.identifier("key"),g.toComputedKey(n))),t.elements.push(i)}return t}function u(e){var t=g.objectExpression([]);return(0,p.default)(e).forEach(function(r){var n=e[r],i=g.objectExpression([]),s=g.objectProperty(n._key,i,n._computed);(0,p.default)(n).forEach(function(e){var t=n[e];if("_"!==e[0]){var r=t;(g.isClassMethod(t)||g.isClassProperty(t))&&(t=t.value);var s=g.objectProperty(g.identifier(e),t);g.inheritsComments(s,r),g.removeComments(r),i.properties.push(s)}}),t.properties.push(s)}),t}function l(e){return(0,p.default)(e).forEach(function(t){var r=e[t];r.value&&(r.writable=g.booleanLiteral(!0)),r.configurable=g.booleanLiteral(!0),r.enumerable=g.booleanLiteral(!0)}),u(e)}r.__esModule=!0;var c=e("babel-runtime/core-js/object/keys"),p=n(c);r.push=s,r.hasComputed=a,r.toComputedObjectFromClass=o,r.toClassObject=u,r.toDefineObject=l;var h=e("babel-helper-function-name"),f=n(h),d=e("lodash/has"),m=n(d),y=e("babel-types"),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(y)},{"babel-helper-function-name":97,"babel-runtime/core-js/object/keys":120,"babel-types":169,"lodash/has":493}],97:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){if(!p.isFunction(t))return;var i=h;t.generator&&(i=f);var s=i({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)}).expression;s.callee._skipModulesRemap=!0;for(var a=s.callee.body.body[0].params,u=0,l=(0,o.default)(t);u<l;u++)a.push(n.generateUidIdentifier("x"));return s}n.rename(r.name)}t.id=r,n.getProgramParent().references[r.name]=!0}function s(e,t,r){var n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},i=r.getOwnBinding(t);return i?"param"===i.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,d,n),n}r.__esModule=!0,r.default=function(e){var t=e.node,r=e.parent,n=e.scope,a=e.id;if(!t.id){if(!p.isObjectProperty(r)&&!p.isObjectMethod(r,{kind:"method"})||r.computed&&!p.isLiteral(r.key)){if(p.isVariableDeclarator(r)){if(a=r.id,p.isIdentifier(a)){var o=n.parent.getBinding(a.name);if(o&&o.constant&&n.getBinding(a.name)===o)return t.id=a,void(t.id[p.NOT_LOCAL_BINDING]=!0)}}else if(p.isAssignmentExpression(r))a=r.left;else if(!a)return}else a=r.key;var u=void 0;if(a&&p.isLiteral(a))u=a.value;else{if(!a||!p.isIdentifier(a))return;u=a.name}u=p.toBindingIdentifierName(u),a=p.identifier(u),a[p.NOT_LOCAL_BINDING]=!0;return i(s(t,u,n),t,a,n)||t}};var a=e("babel-helper-get-function-arity"),o=n(a),u=e("babel-template"),l=n(u),c=e("babel-types"),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),h=(0,l.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),f=(0,l.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),d={"ReferencedIdentifier|BindingIdentifier":function(e,t){if(e.node.name===t.name){e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}};t.exports=r.default},{"babel-helper-get-function-arity":98,"babel-template":132,"babel-types":169}],98:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){for(var t=e.params,r=0;r<t.length;r++){var n=t[r];if(i.isAssignmentPattern(n)||i.isRestElement(n))return r}return t.length};var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.exports=r.default},{"babel-types":169}],99:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){return 1===r.length&&i.isSpreadElement(r[0])&&i.isIdentifier(r[0].argument,{name:"arguments"})?i.callExpression(i.memberExpression(e,i.identifier("apply")),[t,r[0].argument]):i.callExpression(i.memberExpression(e,i.identifier("call")),[t].concat(r))};var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.exports=r.default},{"babel-types":169}],100:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return!!g.isSuper(e)&&(!g.isMemberExpression(t,{computed:!1})&&!g.isCallExpression(t,{callee:e}))}function a(e){return g.isMemberExpression(e)&&g.isSuper(e.object)}function o(e,t){var r=t?e:g.memberExpression(e,g.identifier("prototype"));return g.logicalExpression("||",g.memberExpression(r,g.identifier("__proto__")),g.callExpression(g.memberExpression(g.identifier("Object"),g.identifier("getPrototypeOf")),[r]))}r.__esModule=!0;var u=e("babel-runtime/helpers/classCallCheck"),l=i(u),c=e("babel-runtime/core-js/symbol"),p=i(c),h=e("babel-helper-optimise-call-expression"),f=i(h),d=e("babel-messages"),m=n(d),y=e("babel-types"),g=n(y),b=(0,p.default)(),v={Function:function(e){e.inShadow("this")||e.skip()},ReturnStatement:function(e,t){e.inShadow("this")||t.returns.push(e)},ThisExpression:function(e,t){e.node[b]||t.thises.push(e)},enter:function(e,t){var r=t.specHandle;t.isLoose&&(r=t.looseHandle);var n=e.isCallExpression()&&e.get("callee").isSuper(),i=r.call(t,e);i&&(t.hasSuper=!0),n&&t.bareSupers.push(e),!0===i&&e.requeue(),!0!==i&&i&&(Array.isArray(i)?e.replaceWithMultiple(i):e.replaceWith(i))}},x=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,l.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return g.callExpression(this.file.addHelper("set"),[o(this.getObjectRef(),this.isStatic),r?e:g.stringLiteral(e.name),t,g.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return g.callExpression(this.file.addHelper("get"),[o(this.getObjectRef(),this.isStatic),t?e:g.stringLiteral(e.name),g.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(v,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||g.identifier("Function");return t.property===e?void 0:g.isCallExpression(t,{callee:e})?void 0:g.isMemberExpression(t)&&!r.static?g.memberExpression(n,g.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!g.isMemberExpression(r))return;if(!g.isSuper(r.object))return;return g.appendToMemberExpression(r,g.identifier("call")),t.arguments.unshift(g.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[g.variableDeclaration("var",[g.variableDeclarator(e,r.left)]),g.expressionStatement(g.assignmentExpression("=",r.left,g.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,o=e.node;if(s(o,i))throw e.buildCodeFrameError(m.get("classesIllegalBareSuper"));if(g.isCallExpression(o)){var u=o.callee;if(g.isSuper(u))return;a(u)&&(t=u.property,r=u.computed,n=o.arguments)}else if(g.isMemberExpression(o)&&g.isSuper(o.object))t=o.property,r=o.computed;else{if(g.isUpdateExpression(o)&&a(o.argument)){var l=g.binaryExpression(o.operator[0],o.argument,g.numericLiteral(1));if(o.prefix)return this.specHandleAssignmentExpression(null,e,l);var c=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(c,e,l).concat(g.expressionStatement(c))}if(g.isAssignmentExpression(o)&&a(o.left))return this.specHandleAssignmentExpression(null,e,o)}if(t){var p=this.getSuperProperty(t,r);return n?this.optimiseCall(p,n):p}},e.prototype.optimiseCall=function(e,t){var r=g.thisExpression();return r[b]=!0,(0,f.default)(e,r,t)},e}();r.default=x,t.exports=r.default},{"babel-helper-optimise-call-expression":99,"babel-messages":103,"babel-runtime/core-js/symbol":122,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],101:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-template"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s={};r.default=s,s.typeof=(0,i.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),s.jsx=(0,i.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),s.asyncIterator=(0,i.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),s.asyncGenerator=(0,i.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),s.asyncGeneratorDelegate=(0,i.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),s.asyncToGenerator=(0,i.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),s.classCallCheck=(0,i.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),s.createClass=(0,i.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),s.defineEnumerableProperties=(0,i.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),s.defaults=(0,i.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),s.defineProperty=(0,i.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),s.extends=(0,i.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),s.get=(0,i.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),s.inherits=(0,i.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),s.instanceof=(0,i.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),s.interopRequireDefault=(0,i.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),s.interopRequireWildcard=(0,i.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),s.newArrowCheck=(0,i.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),s.objectDestructuringEmpty=(0,i.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),s.objectWithoutProperties=(0,i.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),s.possibleConstructorReturn=(0,i.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),s.selfGlobal=(0,i.default)('\n typeof global === "undefined" ? self : global\n'),s.set=(0,i.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),s.slicedToArray=(0,i.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),s.slicedToArrayLoose=(0,i.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),s.taggedTemplateLiteral=(0,i.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),s.taggedTemplateLiteralLoose=(0,i.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),s.temporalRef=(0,i.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),s.temporalUndefined=(0,i.default)("\n ({})\n"),s.toArray=(0,i.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),s.toConsumableArray=(0,i.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":132}],102:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=e("babel-runtime/core-js/object/keys"),a=n(s);r.get=i;var o=e("./helpers"),u=n(o);r.list=(0,a.default)(u.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":101,"babel-runtime/core-js/object/keys":120}],103:[function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var s=l[e];if(!s)throw new ReferenceError("Unknown message "+(0,a.default)(e));return r=i(r),s.replace(/\$(\d+)/g,function(e,t){return r[t-1]})}function i(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,a.default)(e)||e+""}catch(t){return u.inspect(e)}})}r.__esModule=!0,r.MESSAGES=void 0;var s=e("babel-runtime/core-js/json/stringify"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);r.get=n,r.parseArgs=i;var o=e("util"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o),l=r.MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"}},{"babel-runtime/core-js/json/stringify":114,util:601}],104:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},t.exports=r.default},{}],105:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncGenerators")}}},t.exports=r.default},{}],106:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var n=e.node;if(n.shadow)return;n.shadow={this:!1},n.type="FunctionExpression";var i=t.thisExpression();i._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),i]))),e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},t.exports=r.default},{}],107:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return v.isLoop(e.parent)||v.isCatchClause(e.parent)}function s(e){return!!v.isVariableDeclaration(e)&&(!!e[v.BLOCK_SCOPED_SYMBOL]||("let"===e.kind||"const"===e.kind))}function a(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!v.isFor(r))for(var s=0;s<t.declarations.length;s++){var a=t.declarations[s];a.init=a.init||n.buildUndefinedNode()}if(t[v.BLOCK_SCOPED_SYMBOL]=!0,t.kind="var",i){var o=n.getFunctionParent(),u=e.getBindingIdentifiers();for(var l in u){var c=n.getOwnBinding(l);c&&(c.kind="var"),n.moveBindingTo(l,o)}}}function o(e){return v.isVariableDeclaration(e,{kind:"var"})&&!s(e)}function u(e){return v.isBreakStatement(e)?"break":v.isContinueStatement(e)?"continue":void 0}r.__esModule=!0;var l=e("babel-runtime/core-js/symbol"),c=n(l),p=e("babel-runtime/core-js/object/create"),h=n(p),f=e("babel-runtime/helpers/classCallCheck"),d=n(f);r.default=function(){return{visitor:{VariableDeclaration:function(e,t){var r=e.node,n=e.parent,i=e.scope;if(s(r)&&(a(e,null,n,i,!0),r._tdzThis)){for(var o=[r],u=0;u<r.declarations.length;u++){var l=r.declarations[u];if(l.init){var c=v.assignmentExpression("=",l.id,l.init);c._ignoreBlockScopingTDZ=!0,o.push(v.expressionStatement(c))}l.init=t.addHelper("temporalUndefined")}r._blockHoist=2,e.isCompletionRecord()&&o.push(v.expressionStatement(i.buildUndefinedNode())),e.replaceWithMultiple(o)}},Loop:function(e,t){var r=e.node,n=e.parent,i=e.scope;v.ensureBlock(r);var s=new O(e,e.get("body"),n,i,t),a=s.run();a&&e.replaceWith(a)},CatchClause:function(e,t){var r=e.parent,n=e.scope;new O(null,e.get("body"),r,n,t).run()},
-"BlockStatement|SwitchStatement|Program":function(e,t){if(!i(e)){new O(null,e,e.parent,e.scope,t).run()}}}}};var m=e("babel-traverse"),y=n(m),g=e("./tdz"),b=e("babel-types"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x=e("lodash/values"),E=n(x),A=e("lodash/extend"),D=n(A),C=e("babel-template"),S=n(C),_=(0,S.default)('\n if (typeof RETURN === "object") return RETURN.v;\n'),w=y.default.visitors.merge([{Loop:{enter:function(e,t){t.loopDepth++},exit:function(e,t){t.loopDepth--}},Function:function(e,t){return t.loopDepth>0&&e.traverse(k,t),e.skip()}},g.visitor]),k=y.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},g.visitor]),F={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(o(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=v.sequenceExpression(n)}}else if(e.isFor())o(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(o(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return v.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},T={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},P={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},B={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(B,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(B,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=u(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(v.isBreakStatement(r)&&v.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=v.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=v.objectExpression([v.objectProperty(v.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&(s=v.returnStatement(s),s[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(v.inherits(s,r)))}}},O=function(){function e(t,r,n,i,s){(0,d.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,h.default)(null),this.hasLetReferences=!1,this.letReferences=(0,h.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=v.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(v.isFunction(this.parent)||v.isProgram(this.block))return void this.updateScopeInfo();if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!v.isLabeledStatement(this.loopParent)?v.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,E.default)(t),s=(0,E.default)(t),a=this.blockPath.isSwitchStatement(),o=v.functionExpression(null,i,v.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(v.variableDeclaration("var",[v.variableDeclarator(u,o)])));var l=v.callExpression(u,s),c=this.scope.generateUidIdentifier("ret");y.default.hasType(o.body,this.scope,"YieldExpression",v.FUNCTION_TYPES)&&(o.generator=!0,l=v.yieldExpression(l,!0)),y.default.hasType(o.body,this.scope,"AwaitExpression",v.FUNCTION_TYPES)&&(o.async=!0,l=v.awaitExpression(l)),this.buildClosure(c,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(v.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,P,t);for(var r=0;r<e.params.length;r++){var n=e.params[r];if(t.reassignments[n.name]){var i=this.scope.generateUidIdentifier(n.name);e.params[r]=i,this.scope.rename(n.name,i.name,e),e.body.body.push(v.expressionStatement(v.assignmentExpression("=",n,i)))}}},e.prototype.getLetReferences=function(){var e=this,t=this.block,r=[];if(this.loop){var n=this.loop.left||this.loop.init;s(n)&&(r.push(n),(0,D.default)(this.outsideLetReferences,v.getBindingIdentifiers(n)))}var i=function n(i,o){o=o||i.node,(v.isClassDeclaration(o)||v.isFunctionDeclaration(o)||s(o))&&(s(o)&&a(i,o,t,e.scope),r=r.concat(o.declarations||o)),v.isLabeledStatement(o)&&n(i.get("body"),o.body)};if(t.body)for(var o=0;o<t.body.length;o++){var u=this.blockPath.get("body")[o];i(u)}if(t.cases)for(var l=0;l<t.cases.length;l++)for(var c=t.cases[l].consequent,p=0;p<c.length;p++){var h=this.blockPath.get("cases")[l],f=c[p];i(h,f)}for(var d=0;d<r.length;d++){var m=r[d],y=v.getBindingIdentifiers(m,!1,!0);(0,D.default)(this.letReferences,y),this.hasLetReferences=!0}if(this.hasLetReferences){var g={letReferences:this.letReferences,closurify:!1,file:this.file,loopDepth:0},b=this.blockPath.find(function(e){return e.isLoop()||e.isFunction()});return b&&b.isLoop()&&g.loopDepth++,this.blockPath.traverse(w,g),g.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,inSwitchCase:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{},LOOP_IGNORE:(0,c.default)()};return this.blockPath.traverse(T,e),this.blockPath.traverse(B,e),e},e.prototype.hoistVarDeclarations=function(){this.blockPath.traverse(F,this)},e.prototype.pushDeclar=function(e){var t=[],r=v.getBindingIdentifiers(e);for(var n in r)t.push(v.variableDeclarator(r[n]));this.body.push(v.variableDeclaration(e.kind,t));for(var i=[],s=0;s<e.declarations.length;s++){var a=e.declarations[s];if(a.init){var o=v.assignmentExpression("=",a.id,a.init);i.push(v.inherits(o,a))}}return i},e.prototype.buildHas=function(e,t){var r=this.body;r.push(v.variableDeclaration("var",[v.variableDeclarator(e,t)]));var n=void 0,i=this.has,s=[];if(i.hasReturn&&(n=_({RETURN:e})),i.hasBreakContinue){for(var a in i.map)s.push(v.switchCase(v.stringLiteral(a),[i.map[a]]));if(i.hasReturn&&s.push(v.switchCase(null,[n])),1===s.length){var o=s[0];r.push(v.ifStatement(v.binaryExpression("===",e,o.test),o.consequent[0]))}else{if(this.loop)for(var u=0;u<s.length;u++){var l=s[u].consequent[0];v.isBreakStatement(l)&&!l.label&&(l.label=this.loopLabel=this.loopLabel||this.scope.generateUidIdentifier("loop"))}r.push(v.switchStatement(e,s))}}else i.hasReturn&&r.push(n)},e}();t.exports=r.default},{"./tdz":108,"babel-runtime/core-js/object/create":118,"babel-runtime/core-js/symbol":122,"babel-runtime/helpers/classCallCheck":127,"babel-template":132,"babel-traverse":136,"babel-types":169,"lodash/extend":487,"lodash/values":530}],108:[function(e,t,r){"use strict";function n(e,t){var r=t._guessExecutionStatusRelativeTo(e);return"before"===r?"inside":"after"===r?"outside":"maybe"}function i(e,t){return o.callExpression(t.addHelper("temporalRef"),[e,o.stringLiteral(e.name),t.addHelper("temporalUndefined")])}function s(e,t,r){var n=r.letReferences[e.name];return!!n&&t.getBindingIdentifier(e.name)===n}r.__esModule=!0,r.visitor=void 0;var a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a);r.visitor={ReferencedIdentifier:function(e,t){if(this.file.opts.tdz){var r=e.node,a=e.parent,u=e.scope;if(!e.parentPath.isFor({left:r})&&s(r,u,t)){var l=u.getBinding(r.name).path,c=n(e,l);if("inside"!==c)if("maybe"===c){var p=i(r,t.file);if(l.parent._tdzThis=!0,e.skip(),e.parentPath.isUpdateExpression()){if(a._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(o.sequenceExpression([p,a]))}else e.replaceWith(p)}else"outside"===c&&e.replaceWith(o.throwStatement(o.inherits(o.newExpression(o.identifier("ReferenceError"),[o.stringLiteral(r.name+" is not defined - temporal dead zone")]),r)))}}},AssignmentExpression:{exit:function(e,t){if(this.file.opts.tdz){var r=e.node;if(!r._ignoreBlockScopingTDZ){var n=[],a=e.getBindingIdentifiers();for(var u in a){var l=a[u];s(l,e.scope,t)&&n.push(i(l,t.file))}n.length&&(r._ignoreBlockScopingTDZ=!0,n.push(r),e.replaceWithMultiple(n.map(o.expressionStatement)))}}}}}},{"babel-types":169}],109:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/symbol"),s=n(i);r.default=function(e){var t=e.types,r=(0,s.default)();return{visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var r=e.node,n=r.declaration.id||e.scope.generateUidIdentifier("class");r.declaration.id=n,e.replaceWith(r.declaration),e.insertAfter(t.exportDefaultDeclaration(n))}},ClassDeclaration:function(e){var r=e.node,n=r.id||e.scope.generateUidIdentifier("class");e.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(n,t.toExpression(r))]))},ClassExpression:function(e,t){var n=e.node;if(!n[r]){var i=(0,p.default)(e);if(i&&i!==n)return e.replaceWith(i);n[r]=!0;var s=l.default;t.opts.loose&&(s=o.default),e.replaceWith(new s(e,t.file).run())}}}}};var a=e("./loose"),o=n(a),u=e("./vanilla"),l=n(u),c=e("babel-helper-function-name"),p=n(c);t.exports=r.default},{"./loose":110,"./vanilla":111,"babel-helper-function-name":97,"babel-runtime/core-js/symbol":122}],110:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("babel-runtime/helpers/possibleConstructorReturn"),o=n(a),u=e("babel-runtime/helpers/inherits"),l=n(u),c=e("babel-helper-function-name"),p=n(c),h=e("./vanilla"),f=n(h),d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=function(e){function t(){(0,s.default)(this,t);var r=(0,o.default)(this,e.apply(this,arguments));return r.isLoose=!0,r}return(0,l.default)(t,e),t.prototype._processMethod=function(e,t){if(!e.decorators){var r=this.classRef;e.static||(r=m.memberExpression(r,m.identifier("prototype")));var n=m.memberExpression(r,e.key,e.computed||m.isLiteral(e.key)),i=m.functionExpression(null,e.params,e.body,e.generator,e.async);i.returnType=e.returnType;var s=m.toComputedKey(e,e.key);m.isStringLiteral(s)&&(i=(0,p.default)({node:i,id:s,scope:t}));var a=m.expressionStatement(m.assignmentExpression("=",n,i));return m.inheritsComments(a,e),this.body.push(a),!0}},t}(f.default);r.default=y,t.exports=r.default},{"./vanilla":111,"babel-helper-function-name":97,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-types":169}],111:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/helpers/classCallCheck"),u=i(o),l=e("babel-traverse"),c=e("babel-helper-replace-supers"),p=i(c),h=e("babel-helper-optimise-call-expression"),f=i(h),d=e("babel-helper-define-map"),m=n(d),y=e("babel-template"),g=i(y),b=e("babel-types"),v=n(b),x=(0,g.default)("\n (function () {\n super(...arguments);\n })\n"),E={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([E,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:function(e){if(e.get("callee").isSuper()&&(this.hasBareSuper=!0,!this.isDerived))throw e.buildCodeFrameError("super() is only allowed in a derived constructor")}},ThisExpression:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.inShadow("this"))throw e.buildCodeFrameError("'this' is not allowed before super()")}}]),D=l.visitors.merge([E,{ThisExpression:function(e){this.superThises.push(e)}}]),C=function(){function e(t,r){(0,u.default)(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=r,this.clearDescriptors(),this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.bareSuperAfter=[],this.bareSupers=[],this.pushedConstructor=!1,this.pushedInherits=!1,this.isLoose=!1,this.superThises=[],this.classId=this.node.id,this.classRef=this.node.id?v.identifier(this.node.id.name):this.scope.generateUidIdentifier("class"),this.superName=this.node.superClass||v.identifier("Function"),this.isDerived=!!this.node.superClass}return e.prototype.run=function(){var e=this,t=this.superName,r=this.file,n=this.body,i=this.constructorBody=v.blockStatement([]);this.constructor=this.buildConstructor();var s=[],a=[];if(this.isDerived&&(a.push(t),t=this.scope.generateUidIdentifierBasedOnNode(t),s.push(t),this.superName=t),this.buildBody(),i.body.unshift(v.expressionStatement(v.callExpression(r.addHelper("classCallCheck"),[v.thisExpression(),this.classRef]))),n=n.concat(this.staticPropBody.map(function(t){return t(e.classRef)})),this.classId&&1===n.length)return v.toExpression(n[0]);n.push(v.returnStatement(this.classRef));var o=v.functionExpression(null,s,v.blockStatement(n));return o.shadow=!0,v.callExpression(o,a)},e.prototype.buildConstructor=function(){var e=v.functionDeclaration(this.classRef,[],this.constructorBody);return v.inherits(e,this.node),e},e.prototype.pushToMap=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=m.push(i,e,r,this.file,n);return t&&(s.enumerable=v.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(e=s.equals("kind","constructor"))break}if(!e){var o=void 0,u=void 0;if(this.isDerived){var l=x().expression;o=l.params,u=l.body}else o=[],u=v.blockStatement([]);this.path.get("body").unshiftContainer("body",v.classMethod("constructor",v.identifier("constructor"),o,u))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),v.inherits(this.constructor,this.userConstructor),v.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=e,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,o=s.node;if(s.isClassProperty())throw s.buildCodeFrameError("Missing class properties transform.");if(o.decorators)throw s.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(v.isClassMethod(o)){var u="constructor"===o.kind;if(u&&(s.traverse(A,this),!this.hasBareSuper&&this.isDerived))throw s.buildCodeFrameError("missing super() call in constructor");var l=new p.default({forceSuperMemoisation:u,methodPath:s,methodNode:o,objectRef:this.classRef,superRef:this.superName,isStatic:o.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),u?this.pushConstructor(l,o,s):this.pushMethod(o,s)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=m.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=m.toClassObject(this.staticMutatorMap)),t||r){t&&(t=m.toComputedObjectFromClass(t)),r&&(r=m.toComputedObjectFromClass(r));var n=v.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a<i.length;a++)i[a]!==n&&(s=a);i=i.slice(0,s+1),e.push(v.expressionStatement(v.callExpression(this.file.addHelper("createClass"),i)))}this.clearDescriptors()},e.prototype.buildObjectAssignment=function(e){return v.variableDeclaration("var",[v.variableDeclarator(e,v.objectExpression([]))])},e.prototype.wrapSuperCall=function(e,t,r,n){var i=e.node;this.isLoose?(i.arguments.unshift(v.thisExpression()),2===i.arguments.length&&v.isSpreadElement(i.arguments[1])&&v.isIdentifier(i.arguments[1].argument,{name:"arguments"})?(i.arguments[1]=i.arguments[1].argument,i.callee=v.memberExpression(t,v.identifier("apply"))):i.callee=v.memberExpression(t,v.identifier("call"))):i=(0,f.default)(v.logicalExpression("||",v.memberExpression(this.classRef,v.identifier("__proto__")),v.callExpression(v.memberExpression(v.identifier("Object"),v.identifier("getPrototypeOf")),[this.classRef])),v.thisExpression(),i.arguments);var s=v.callExpression(this.file.addHelper("possibleConstructorReturn"),[v.thisExpression(),i]),a=this.bareSuperAfter.map(function(e){return e(r)});e.parentPath.isExpressionStatement()&&e.parentPath.container===n.node.body&&n.node.body.length-1===e.parentPath.key?((this.superThises.length||a.length)&&(e.scope.push({id:r}),s=v.assignmentExpression("=",r,s)),a.length&&(s=v.toSequenceExpression([s].concat(a,[r]))),e.parentPath.replaceWith(v.returnStatement(s))):e.replaceWithMultiple([v.variableDeclaration("var",[v.variableDeclarator(r,s)])].concat(a,[v.expressionStatement(r)]))},e.prototype.verifyConstructor=function(){var e=this;if(this.isDerived){var t=this.userConstructorPath,r=t.get("body");t.traverse(D,this);for(var n=!!this.bareSupers.length,i=this.superName||v.identifier("Function"),s=t.scope.generateUidIdentifier("this"),o=this.bareSupers,u=Array.isArray(o),l=0,o=u?o:(0,a.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,s,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}for(var h=this.superThises,f=Array.isArray(h),d=0,h=f?h:(0,a.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}m.replaceWith(s)}var y=function(t){return v.callExpression(e.file.addHelper("possibleConstructorReturn"),[s].concat(t||[]))},g=r.get("body");g.length&&!g.pop().isReturnStatement()&&r.pushContainer("body",v.returnStatement(n?s:y()));for(var b=this.superReturns,x=Array.isArray(b),E=0,b=x?b:(0,a.default)(b);;){var A;if(x){if(E>=b.length)break;A=b[E++]}else{if(E=b.next(),E.done)break;A=E.value}var C=A;if(C.node.argument){var S=C.scope.generateDeclaredUidIdentifier("ret");C.get("argument").replaceWithMultiple([v.assignmentExpression("=",S,C.node.argument),y(S)])}else C.get("argument").replaceWith(y())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,v.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,v.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(v.expressionStatement(v.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=C,t.exports=r.default},{"babel-helper-define-map":96,"babel-helper-optimise-call-expression":99,"babel-helper-replace-supers":100,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-template":132,"babel-traverse":136,"babel-types":169}],112:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],113:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":188}],114:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":189}],115:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":190}],116:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":191}],117:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":192}],118:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":193}],119:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":194}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":195}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":196}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":198}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":197}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":199}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":200}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":201}],127:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],128:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../core-js/object/set-prototype-of"),s=n(i),a=e("../core-js/object/create"),o=n(a),u=e("../helpers/typeof"),l=n(u);r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,l.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.default?(0,s.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":118,"../core-js/object/set-prototype-of":121,"../helpers/typeof":131}],129:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],130:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("../helpers/typeof"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":131}],131:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../core-js/symbol/iterator"),s=n(i),a=e("../core-js/symbol"),o=n(a),u="function"==typeof o.default&&"symbol"==typeof s.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};r.default="function"==typeof o.default&&"symbol"===u(s.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":u(e)}},{"../core-js/symbol":122,"../core-js/symbol/iterator":124}],132:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){e=(0,l.default)(e);var r=e,n=r.program;return t.length&&(0,m.default)(e,A,null,t),n.body.length>1?n.body:n.body[0]}r.__esModule=!0;var a=e("babel-runtime/core-js/symbol"),o=i(a);r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,p.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=g.parse(e,t),i=m.default.removeProperties(i,{preserveComments:t.preserveComments}),m.default.cheap(i,function(e){e[x]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return s(n(),t)}};var u=e("lodash/cloneDeep"),l=i(u),c=e("lodash/assign"),p=i(c),h=e("lodash/has"),f=i(h),d=e("babel-traverse"),m=i(d),y=e("babylon"),g=n(y),b=e("babel-types"),v=n(b),x="_fromTemplate",E=(0,o.default)(),A={noScope:!0,enter:function(e,t){var r=e.node;if(r[E])return e.skip();v.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(v.isIdentifier(r)&&r[x])if((0,f.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[E]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||m.default.clearNode(t)}};t.exports=r.default},{"babel-runtime/core-js/symbol":122,"babel-traverse":136,"babel-types":169,babylon:177,"lodash/assign":477,"lodash/cloneDeep":481,"lodash/has":493}],133:[function(e,t,r){"use strict";function n(){i(),s()}function i(){r.path=u=new o.default}function s(){r.scope=l=new o.default}r.__esModule=!0,r.scope=r.path=void 0;var a=e("babel-runtime/core-js/weak-map"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);r.clear=n,r.clearPath=i,r.clearScope=s;var u=r.path=new o.default,l=r.scope=new o.default},{"babel-runtime/core-js/weak-map":125}],
-134:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/helpers/classCallCheck"),u=i(o),l=e("./path"),c=i(l),p=e("babel-types"),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(p),f="test"===n.env.NODE_ENV,d=function(){function e(t,r,n,i){(0,u.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=h.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,a.default)(n);;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return c.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&this.shouldVisit(s)&&n.push(this.create(t,e,i,r))}return this.visitQueue(n)},e.prototype.visitSingle=function(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])},e.prototype.visitQueue=function(e){this.queue=e,this.priorityQueue=[];for(var t=[],r=!1,n=e,i=Array.isArray(n),s=0,n=i?n:(0,a.default)(n);;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(f&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,c=Array.isArray(l),p=0,l=c?l:(0,a.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=d,t.exports=r.default}).call(this,e("_process"))},{"./path":143,_process:539,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],135:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function e(t,r){(0,i.default)(this,e),this.file=t,this.options=r};r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],136:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(g.get("traverseNeedsParent",e.type));m.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=e("babel-runtime/core-js/get-iterator"),u=i(o),l=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(l).default}});var c=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(c).default}});var p=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(p).default}}),r.default=s;var h=e("./context"),f=i(h),d=e("./visitors"),m=n(d),y=e("babel-messages"),g=n(y),b=e("lodash/includes"),v=i(b),x=e("babel-types"),E=n(x),A=e("./cache"),D=n(A);r.visitors=m,s.visitors=m,s.verify=m.verify,s.explode=m.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return E.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=E.VISITOR_KEYS[e.type];if(a)for(var o=new f.default(r,t,n,i),l=a,c=Array.isArray(l),p=0,l=c?l:(0,u.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var d=h;if((!s||!s[d])&&o.visit(e,d))return}},s.clearNode=function(e,t){E.removeProperties(e,t),D.path.delete(e)},s.removeProperties=function(e,t){return E.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,v.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},s.clearCache=function(){D.clear()},s.clearCache.clearPath=D.clearPath,s.clearCache.clearScope=D.clearScope,s.copyCache=function(e,t){D.path.has(e)&&D.path.set(t,D.path.get(e))}},{"./cache":133,"./context":134,"./hub":135,"./path":143,"./scope":155,"./visitors":157,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-types":169,"lodash/includes":496}],137:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function s(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function a(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function o(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)}function u(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n=void 0,i=b.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,y.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,c=l[t+1];if(n)if(c.listKey&&n.listKey===c.listKey&&c.key<n.key)n=c;else{var p=i.indexOf(n.parentKey),h=i.indexOf(c.parentKey);p>h&&(n=c)}else n=c}return n})}function l(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,i=void 0,s=void 0,a=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length<n&&(n=t.length),t}),o=a[0];e:for(var u=0;u<n;u++){for(var l=o[u],c=a,p=Array.isArray(c),h=0,c=p?c:(0,y.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;if(d[u]!==l)break e}i=u,s=l}if(s)return t?t(s,i,a):s;throw new Error("Couldn't find intersection")}function c(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t}function p(e){return e.isDescendant(this)}function h(e){return!!this.findParent(function(t){return t===e})}function f(){for(var e=this;e;){for(var t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(e.node.type===s)return!0}e=e.parentPath}return!1}function d(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}}r.__esModule=!0;var m=e("babel-runtime/core-js/get-iterator"),y=n(m);r.findParent=i,r.find=s,r.getFunctionParent=a,r.getStatementParent=o,r.getEarliestCommonAncestorFrom=u,r.getDeepestCommonAncestorFrom=l,r.getAncestry=c,r.isAncestor=p,r.isDescendant=h,r.inType=f,r.inShadow=d;var g=e("babel-types"),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(g),v=e("./index");n(v)},{"./index":143,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],138:[function(e,t,r){"use strict";function n(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}}function i(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])}function s(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}r.__esModule=!0,r.shareCommentsWithSiblings=n,r.addComment=i,r.addComments=s},{}],139:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])}function s(e){if(!e)return!1;for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,S.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(s){var a=this.node;if(!a)return!0;if(s.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+s);if(this.node!==a)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1}function a(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1}function o(){return!!this.node&&(!this.isBlacklisted()&&((!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),w.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))))}function u(){this.shouldSkip=!0}function l(e){this.skipKeys[e]=!0}function c(){this.shouldStop=!0,this.shouldSkip=!0}function p(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}}function h(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this}function f(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function d(){this.parentPath&&(this.parent=this.parentPath.node)}function m(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(var t in this.container)if(this.container[t]===this.node)return this.setKey(t);this.key=null}}function y(){if(this.parent&&this.inList){var e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}}function g(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()}function b(){this.contexts.pop(),this.setContext(this.contexts[this.contexts.length-1])}function v(e){this.contexts.push(e),this.setContext(e)}function x(e,t,r,n){this.inList=!!r,this.listKey=r,this.parentKey=r||n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)}function E(e){this.key=e,this.node=this.container[this.key],this.type=this.node&&this.node.type}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed)for(var t=this.contexts,r=t,n=Array.isArray(r),i=0,r=n?r:(0,S.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.maybeQueue(e)}}function D(){for(var e=this,t=this.contexts;!t.length;)e=e.parentPath,t=e.contexts;return t}r.__esModule=!0;var C=e("babel-runtime/core-js/get-iterator"),S=n(C);r.call=i,r._call=s,r.isBlacklisted=a,r.visit=o,r.skip=u,r.skipKey=l,r.stop=c,r.setScope=p,r.setContext=h,r.resync=f,r._resyncParent=d,r._resyncKey=m,r._resyncList=y,r._resyncRemoved=g,r.popContext=b,r.pushContext=v,r.setup=x,r.setKey=E,r.requeue=A,r._getQueueContexts=D;var _=e("../index"),w=n(_)},{"../index":136,"babel-runtime/core-js/get-iterator":113}],140:[function(e,t,r){"use strict";function n(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||o.isIdentifier(t)&&(t=o.stringLiteral(t.name)),t}function i(){return o.ensureBlock(this.node)}function s(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}}r.__esModule=!0,r.toComputedKey=n,r.ensureBlock=i,r.arrowFunctionToShadowed=s;var a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},{"babel-types":169}],141:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this.evaluate();if(e.confident)return!!e.value}function s(){function e(e){i&&(s=e,i=!1)}function r(t){var r=t.node;if(a.has(r)){var s=a.get(r);return s.resolved?s.value:void e(t)}var o={resolved:!1};a.set(r,o);var u=n(t);return i&&(o.resolved=!0,o.value=u),u}function n(n){if(i){var s=n.node;if(n.isSequenceExpression()){var a=n.get("expressions");return r(a[a.length-1])}if(n.isStringLiteral()||n.isNumericLiteral()||n.isBooleanLiteral())return s.value;if(n.isNullLiteral())return null;if(n.isTemplateLiteral()){for(var u="",c=0,p=n.get("expressions"),d=s.quasis,m=Array.isArray(d),y=0,d=m?d:(0,l.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if(y=d.next(),y.done)break;g=y.value}var b=g;if(!i)break;u+=b.value.cooked;var v=p[c++];v&&(u+=String(r(v)))}if(!i)return;return u}if(n.isConditionalExpression()){var x=r(n.get("test"));if(!i)return;return r(x?n.get("consequent"):n.get("alternate"))}if(n.isExpressionWrapper())return r(n.get("expression"));if(n.isMemberExpression()&&!n.parentPath.isCallExpression({callee:s})){var E=n.get("property"),A=n.get("object");if(A.isLiteral()&&E.isIdentifier()){var D=A.node.value,C=void 0===D?"undefined":(0,o.default)(D);if("number"===C||"string"===C)return D[E.node.name]}}if(n.isReferencedIdentifier()){var S=n.scope.getBinding(s.name);if(S&&S.constantViolations.length>0)return e(S.path);if(S&&n.node.start<S.path.node.end)return e(S.path);if(S&&S.hasValue)return S.value;if("undefined"===s.name)return S?e(S.path):void 0;if("Infinity"===s.name)return S?e(S.path):1/0;if("NaN"===s.name)return S?e(S.path):NaN;var _=n.resolve();return _===n?e(n):r(_)}if(n.isUnaryExpression({prefix:!0})){if("void"===s.operator)return;var w=n.get("argument");if("typeof"===s.operator&&(w.isFunction()||w.isClass()))return"function";var k=r(w);if(!i)return;switch(s.operator){case"!":return!k;case"+":return+k;case"-":return-k;case"~":return~k;case"typeof":return void 0===k?"undefined":(0,o.default)(k)}}if(n.isArrayExpression()){for(var F=[],T=n.get("elements"),P=T,B=Array.isArray(P),O=0,P=B?P:(0,l.default)(P);;){var j;if(B){if(O>=P.length)break;j=P[O++]}else{if(O=P.next(),O.done)break;j=O.value}var N=j;if(N=N.evaluate(),!N.confident)return e(N);F.push(N.value)}return F}if(n.isObjectExpression()){for(var I={},L=n.get("properties"),M=L,R=Array.isArray(M),U=0,M=R?M:(0,l.default)(M);;){var V;if(R){if(U>=M.length)break;V=M[U++]}else{if(U=M.next(),U.done)break;V=U.value}var q=V;if(q.isObjectMethod()||q.isSpreadProperty())return e(q);var G=q.get("key"),X=G;if(q.node.computed){if(X=X.evaluate(),!X.confident)return e(G);X=X.value}else X=X.isIdentifier()?X.node.name:X.node.value;var J=q.get("value"),W=J.evaluate();if(!W.confident)return e(J);W=W.value,I[X]=W}return I}if(n.isLogicalExpression()){var K=i,z=r(n.get("left")),Y=i;i=K;var H=r(n.get("right")),$=i;switch(i=Y&&$,s.operator){case"||":if(z&&Y)return i=!0,z;if(!i)return;return z||H;case"&&":if((!z&&Y||!H&&$)&&(i=!0),!i)return;return z&&H}}if(n.isBinaryExpression()){var Q=r(n.get("left"));if(!i)return;var Z=r(n.get("right"));if(!i)return;switch(s.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q<Z;case">":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<<Z;case">>":return Q>>Z;case">>>":return Q>>>Z}}if(n.isCallExpression()){var ee=n.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!n.scope.getBinding(ee.node.name,!0)&&h.indexOf(ee.node.name)>=0&&(re=t[s.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&h.indexOf(ne.node.name)>=0&&f.indexOf(ie.node.name)<0&&(te=t[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,o.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=n.get("arguments").map(r);if(!i)return;return re.apply(te,ae)}}e(n)}}var i=!0,s=void 0,a=new p.default,u=r(this);return i||(u=void 0),{confident:i,deopt:s,value:u}}r.__esModule=!0;var a=e("babel-runtime/helpers/typeof"),o=n(a),u=e("babel-runtime/core-js/get-iterator"),l=n(u),c=e("babel-runtime/core-js/map"),p=n(c);r.evaluateTruthy=i,r.evaluate=s;var h=["String","Number","Math"],f=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/helpers/typeof":131}],142:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function s(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function a(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function o(e){return C.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function u(){return this.getSibling(this.key-1)}function l(){return this.getSibling(this.key+1)}function c(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r}function p(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r}function h(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function f(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,a){return C.default.get({listKey:e,parentPath:r,parent:n,container:i,key:a}).setContext(t)}):C.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)}function d(e,t){for(var r=this,n=e,i=Array.isArray(n),s=0,n=i?n:(0,A.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function m(e){return _.getBindingIdentifiers(this.node,e)}function y(e){return _.getOuterBindingIdentifiers(this.node,e)}function g(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this,n=[].concat(r),i=(0,x.default)(null);n.length;){var s=n.shift();if(s&&s.node){var a=_.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())if(e){var o=i[s.node.name]=i[s.node.name]||[];o.push(s)}else i[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&n.push(u)}else{if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l<a.length;l++){var c=a[l],p=s.get(c);(Array.isArray(p)||p.node)&&(n=n.concat(p))}}}}return i}function b(e){return this.getBindingIdentifierPaths(e,!0)}r.__esModule=!0;var v=e("babel-runtime/core-js/object/create"),x=n(v),E=e("babel-runtime/core-js/get-iterator"),A=n(E);r.getStatementParent=i,r.getOpposite=s,r.getCompletionRecords=a,r.getSibling=o,r.getPrevSibling=u,r.getNextSibling=l,r.getAllNextSiblings=c,r.getAllPrevSiblings=p,r.get=h,r._getKey=f,r._getPattern=d,r.getBindingIdentifiers=m,r.getOuterBindingIdentifiers=y,r.getBindingIdentifierPaths=g,r.getOuterBindingIdentifierPaths=b;var D=e("./index"),C=n(D),S=e("babel-types"),_=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(S)},{"./index":143,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/create":118,"babel-types":169}],143:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/helpers/classCallCheck"),u=i(o),l=e("./lib/virtual-types"),c=n(l),p=e("debug"),h=i(p),f=e("invariant"),d=i(f),m=e("../index"),y=i(m),g=e("lodash/assign"),b=i(g),v=e("../scope"),x=i(v),E=e("babel-types"),A=n(E),D=e("../cache"),C=(0,h.default)("babel"),S=function(){function e(t,r){(0,u.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&n&&(r=n.hub),(0,d.default)(i,"To get a node path the parent needs to exist");var u=s[o],l=D.path.get(i)||[];D.path.has(i)||D.path.set(i,l);for(var c=void 0,p=0;p<l.length;p++){var h=l[p];if(h.node===u){c=h;break}}return c||(c=new e(r,i),l.push(c)),c.setup(n,s,a,o),c},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new x.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,y.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){A.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){C.enabled&&C(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=S,(0,b.default)(S.prototype,e("./ancestry")),(0,b.default)(S.prototype,e("./inference")),(0,b.default)(S.prototype,e("./replacement")),(0,b.default)(S.prototype,e("./evaluation")),(0,b.default)(S.prototype,e("./conversion")),(0,b.default)(S.prototype,e("./introspection")),(0,b.default)(S.prototype,e("./context")),(0,b.default)(S.prototype,e("./removal")),(0,b.default)(S.prototype,e("./modification")),(0,b.default)(S.prototype,e("./family")),(0,b.default)(S.prototype,e("./comments"));for(var _=A.TYPES,w=Array.isArray(_),k=0,_=w?_:(0,a.default)(_);;){var F;if("break"===function(){if(w){if(k>=_.length)return"break";F=_[k++]}else{if(k=_.next(),k.done)return"break";F=k.value}var e=F,t="is"+e;S.prototype[t]=function(e){return A[t](this.node,e)},S.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}}())break}for(var T in c){(function(e){if("_"===e[0])return"continue";A.TYPES.indexOf(e)<0&&A.TYPES.push(e);var t=c[e];S.prototype["is"+e]=function(e){return t.checkPath(this,e)}})(T)}t.exports=r.default},{"../cache":133,"../index":136,"../scope":155,"./ancestry":137,"./comments":138,"./context":139,"./conversion":140,"./evaluation":141,"./family":142,"./inference":144,"./introspection":147,"./lib/virtual-types":150,"./modification":151,"./removal":152,"./replacement":153,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,debug:296,invariant:307,"lodash/assign":477}],144:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||y.anyTypeAnnotation();return y.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e}function s(){var e=this.node;{if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=d[e.type];return t?t.call(this,e):(t=d[this.parentPath.type],t&&t.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?y.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?y.anyTypeAnnotation():y.voidTypeAnnotation()}}}function a(e,t){return o(e,this.getTypeAnnotation(),t)}function o(e,t,r){if("string"===e)return y.isStringTypeAnnotation(t);if("number"===e)return y.isNumberTypeAnnotation(t);if("boolean"===e)return y.isBooleanTypeAnnotation(t);if("any"===e)return y.isAnyTypeAnnotation(t);if("mixed"===e)return y.isMixedTypeAnnotation(t);if("empty"===e)return y.isEmptyTypeAnnotation(t);if("void"===e)return y.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}function u(e){var t=this.getTypeAnnotation();if(y.isAnyTypeAnnotation(t))return!0;if(y.isUnionTypeAnnotation(t)){for(var r=t.types,n=Array.isArray(r),i=0,r=n?r:(0,h.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(y.isAnyTypeAnnotation(a)||o(e,a,!0))return!0}return!1}return o(e,t,!0)}function l(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!y.isAnyTypeAnnotation(t)&&y.isFlowBaseAnnotation(t))return e.type===t.type}function c(e){var t=this.getTypeAnnotation();return y.isGenericTypeAnnotation(t)&&y.isIdentifier(t.id,{name:e})}r.__esModule=!0;var p=e("babel-runtime/core-js/get-iterator"),h=function(e){return e&&e.__esModule?e:{default:e}}(p);r.getTypeAnnotation=i,r._getTypeAnnotation=s,r.isBaseType=a,r.couldBeBaseType=u,r.baseTypeStrictlyMatches=l,r.isGenericType=c;var f=e("./inferers"),d=n(f),m=e("babel-types"),y=n(m)},{"./inferers":146,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],145:[function(e,t,r){"use strict";function n(e,t){var r=e.scope.getBinding(t),n=[];e.typeAnnotation=p.unionTypeAnnotation(n);var s=[],a=i(r,e,s),u=o(e,t);if(u&&function(){var e=i(r,u.ifStatement);a=a.filter(function(t){return e.indexOf(t)<0}),n.push(u.typeAnnotation)}(),a.length){a=a.concat(s);for(var c=a,h=Array.isArray(c),f=0,c=h?c:(0,l.default)(c);;){var d;if(h){if(f>=c.length)break;d=c[f++]}else{if(f=c.next(),f.done)break;d=f.value}var m=d;n.push(m.getTypeAnnotation())}}if(n.length)return p.createUnionTypeAnnotation(n)}function i(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){e=e.resolve();var n=e._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function s(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():p.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?p.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,o=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,o=i),(o||a)&&(o=o.resolve(),o.isLiteral())){if("string"==typeof o.node.value&&a.get("argument").isIdentifier({name:e}))return p.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function a(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function o(e,t){var r=a(e);if(r){var n=r.get("test"),i=[n],u=[];do{var l=i.shift().resolve();if(l.isLogicalExpression()&&(i.push(l.get("left")),i.push(l.get("right"))),l.isBinaryExpression()){var c=s(t,l);c&&u.push(c)}}while(i.length);return u.length?{typeAnnotation:p.createUnionTypeAnnotation(u),ifStatement:r}:o(r,t)}}r.__esModule=!0;var u=e("babel-runtime/core-js/get-iterator"),l=function(e){return e&&e.__esModule?e:{default:e}}(u);r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:n(this,e.name):"undefined"===e.name?p.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?p.numberTypeAnnotation():void e.name}};var c=e("babel-types"),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c);t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0}function s(e){return e.typeAnnotation}function a(e){if(this.get("callee").isIdentifier())return F.genericTypeAnnotation(e.callee)}function o(){return F.stringTypeAnnotation()}function u(e){var t=e.operator;return"void"===t?F.voidTypeAnnotation():F.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?F.numberTypeAnnotation():F.STRING_UNARY_OPERATORS.indexOf(t)>=0?F.stringTypeAnnotation():F.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?F.booleanTypeAnnotation():void 0}function l(e){var t=e.operator;if(F.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return F.numberTypeAnnotation();if(F.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return F.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?F.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?F.stringTypeAnnotation():F.unionTypeAnnotation([F.stringTypeAnnotation(),F.numberTypeAnnotation()])}}function c(){return F.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function p(){return F.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function h(){return this.get("expressions").pop().getTypeAnnotation()}function f(){return this.get("right").getTypeAnnotation()}function d(e){var t=e.operator;if("++"===t||"--"===t)return F.numberTypeAnnotation()}function m(){return F.stringTypeAnnotation()}function y(){return F.numberTypeAnnotation()}function g(){return F.booleanTypeAnnotation()}function b(){return F.nullLiteralTypeAnnotation()}function v(){return F.genericTypeAnnotation(F.identifier("RegExp"))}function x(){return F.genericTypeAnnotation(F.identifier("Object"))}function E(){return F.genericTypeAnnotation(F.identifier("Array"))}function A(){return E()}function D(){return F.genericTypeAnnotation(F.identifier("Function"))}function C(){return _(this.get("callee"))}function S(){return _(this.get("tag"))}function _(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?F.genericTypeAnnotation(F.identifier("AsyncIterator")):F.genericTypeAnnotation(F.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var w=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return n(w).default}}),r.VariableDeclarator=i,
-r.TypeCastExpression=s,r.NewExpression=a,r.TemplateLiteral=o,r.UnaryExpression=u,r.BinaryExpression=l,r.LogicalExpression=c,r.ConditionalExpression=p,r.SequenceExpression=h,r.AssignmentExpression=f,r.UpdateExpression=d,r.StringLiteral=m,r.NumericLiteral=y,r.BooleanLiteral=g,r.NullLiteral=b,r.RegExpLiteral=v,r.ObjectExpression=x,r.ArrayExpression=E,r.RestElement=A,r.CallExpression=C,r.TaggedTemplateExpression=S;var k=e("babel-types"),F=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(k);s.validParent=!0,A.validParent=!0,r.FunctionExpression=D,r.ArrowFunctionExpression=D,r.FunctionDeclaration=D,r.ClassExpression=D,r.ClassDeclaration=D},{"./inferer-reference":145,"babel-types":169}],147:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(k.isIdentifier(a)){if(!r(a.name))return!1}else if(k.isLiteral(a)){if(!r(a.value))return!1}else{if(k.isMemberExpression(a)){if(a.computed&&!k.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!k.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length}function s(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function a(){return this.scope.isStatic(this.node)}function o(e){return!this.has(e)}function u(e,t){return this.node[e]===t}function l(e){return k.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function p(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?k.isBlockStatement(e):!!this.isBlockStatement()&&k.isExpression(e))}function h(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function f(){return!this.parentPath.isLabeledStatement()&&!k.isBlockStatement(this.container)&&(0,_.default)(k.STATEMENT_OR_BLOCK_KEYS,this.key)}function d(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!!i.isImportDeclaration()&&(i.node.source.value===e&&(!t||(!(!n.isImportDefaultSpecifier()||"default"!==t)||(!(!n.isImportNamespaceSpecifier()||"*"!==t)||!(!n.isImportSpecifier()||n.node.imported.name!==t)))))}function m(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if((o=i.indexOf(l))>=0){a=l;break}}if(!a)return"before";var c=i[o-1],p=s[u-1];return c&&p?c.listKey&&c.container===p.container?c.key>p.key?"before":"after":k.VISITOR_KEYS[c.type].indexOf(c.key)>k.VISITOR_KEYS[p.type].indexOf(p.key)?"before":"after":"before"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var n=r.referencePaths,i=n,s=Array.isArray(i),a=0,i=s?i:(0,C.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,c=n,p=Array.isArray(c),h=0,c=p?c:(0,C.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;if(!!!d.find(function(e){return e.node===t.node})){var m=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==m)return}else l=m}}return l}}function v(e,t){return this._resolve(e,t)||this}function x(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){var i=function(){var i=n.path.resolve(e,t);return r.find(function(e){return e.node===i.node})?{v:void 0}:{v:i}}();if("object"===(void 0===i?"undefined":(0,A.default)(i)))return i.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!k.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,c=Array.isArray(l),p=0,l=c?l:(0,C.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var f=h;if(f.isProperty()){var d=f.get("key"),m=f.isnt("computed")&&d.isIdentifier({name:a});if(m=m||d.isLiteral({value:a}))return f.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var y=o.get("elements"),g=y[a];if(g)return g.resolve(e,t)}}}}r.__esModule=!0,r.is=void 0;var E=e("babel-runtime/helpers/typeof"),A=n(E),D=e("babel-runtime/core-js/get-iterator"),C=n(D);r.matchesPattern=i,r.has=s,r.isStatic=a,r.isnt=o,r.equals=u,r.isNodeType=l,r.canHaveVariableDeclarationOrExpression=c,r.canSwapBetweenExpressionAndStatement=p,r.isCompletionRecord=h,r.isStatementOrBlock=f,r.referencesImport=d,r.getSource=m,r.willIMaybeExecuteBefore=y,r._guessExecutionStatusRelativeTo=g,r._guessExecutionStatusRelativeToDifferentFunctions=b,r.resolve=v,r._resolve=x;var S=e("lodash/includes"),_=n(S),w=e("babel-types"),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(w);r.is=s},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/typeof":131,"babel-types":169,"lodash/includes":496}],148:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!u.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},p=function(){function e(t,r){(0,o.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;for(var i=n.constantViolations,a=Array.isArray(i),o=0,i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e}},e.prototype._getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return t.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(c,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=l.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:l.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=l.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=p,t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],149:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],150:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":169}],151:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(S.blockStatement(e))}return[this]}function s(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n<t.length;n++){var i=e+n,s=t[n];if(this.container.splice(i,0,s),this.context){var a=this.context.create(this.parent,this.container,i,this.listKey);this.context.queue&&a.pushContext(this.context),r.push(a)}else r.push(D.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:i}))}for(var o=this._getQueueContexts(),u=r,l=Array.isArray(u),c=0,u=l?u:(0,b.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;h.setScope(),h.debug(function(){return"Inserted."});for(var f=o,d=Array.isArray(f),m=0,f=d?f:(0,b.default)(f);;){var y;if(d){if(m>=f.length)break;y=f[m++]}else{if(m=f.next(),m.done)break;y=m.value}y.maybeQueue(h,!0)}}return r}function a(e){return this._containerInsert(this.key,e)}function o(e){return this._containerInsert(this.key+1,e)}function u(e){var t=e[e.length-1];(S.isIdentifier(t)||S.isExpressionStatement(t)&&S.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()}function l(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(S.expressionStatement(S.assignmentExpression("=",t,this.node))),e.push(S.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(S.blockStatement(e))}return[this]}function c(e,t){if(this.parent)for(var r=v.path.get(this.parent),n=0;n<r.length;n++){var i=r[n];i.key>=e&&(i.key+=t)}}function p(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t],n=void 0;if(r?"object"!==(void 0===r?"undefined":(0,y.default)(r))?n="contains a non-object node":r.type?r instanceof D.default&&(n="has a NodePath when it expected a raw object"):n="without a type":n="has falsy node",n){var i=Array.isArray(r)?"array":void 0===r?"undefined":(0,y.default)(r);throw new Error("Node list "+n+" with the index of "+t+" and type of "+i)}}return e}function h(e,t){return this._assertUnremoved(),t=this._verifyNodeList(t),D.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).insertBefore(t)}function f(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e];return D.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length}).replaceWithMultiple(t)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.scope;return new E.default(this,e).run()}r.__esModule=!0;var m=e("babel-runtime/helpers/typeof"),y=n(m),g=e("babel-runtime/core-js/get-iterator"),b=n(g);r.insertBefore=i,r._containerInsert=s,r._containerInsertBefore=a,r._containerInsertAfter=o,r._maybePopFromStatements=u,r.insertAfter=l,r.updateSiblingKeys=c,r._verifyNodeList=p,r.unshiftContainer=h,r.pushContainer=f,r.hoist=d;var v=e("../cache"),x=e("./lib/hoister"),E=n(x),A=e("./index"),D=n(A),C=e("babel-types"),S=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(C)},{"../cache":133,"./index":143,"./lib/hoister":148,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/typeof":131,"babel-types":169}],152:[function(e,t,r){"use strict";function n(){if(this._assertUnremoved(),this.resync(),this._callRemovalHooks())return void this._markRemoved();this.shareCommentsWithSiblings(),this._remove(),this._markRemoved()}function i(){for(var e=c.hooks,t=Array.isArray(e),r=0,e=t?e:(0,l.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if(r=e.next(),r.done)break;n=r.value}if(n(this,this.parentPath))return!0}}function s(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)}function a(){this.shouldSkip=!0,this.removed=!0,this.node=null}function o(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}r.__esModule=!0;var u=e("babel-runtime/core-js/get-iterator"),l=function(e){return e&&e.__esModule?e:{default:e}}(u);r.remove=n,r._callRemovalHooks=i,r._remove=s,r._markRemoved=a,r._assertUnremoved=o;var c=e("./lib/removal-hooks")},{"./lib/removal-hooks":149,"babel-runtime/core-js/get-iterator":113}],153:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){this.resync(),e=this._verifyNodeList(e),x.inheritLeadingComments(e[0],this.node),x.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()}function s(e){this.resync();try{e="("+e+")",e=(0,b.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,f.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,m.default.removeProperties(e),this.replaceWith(e)}function a(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof g.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!x.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&x.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||(e=x.expressionStatement(e))),this.isNodeType("Expression")&&x.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(x.inheritsComments(e,t),x.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}}function o(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?x.validate(this.parent,this.key,[e]):x.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e}function u(e){this.resync();var t=x.toSequenceExpression(e,this.scope);if(x.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=x.functionExpression(null,[],x.blockStatement(e));n.shadow=!0,this.replaceWith(x.callExpression(n,[])),this.traverse(E);for(var i=this.get("callee").getCompletionRecords(),s=i,a=Array.isArray(s),o=0,s=a?s:(0,p.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.isExpressionStatement()){var c=l.findParent(function(e){return e.isLoop()});if(c){var h=c.getData("expressionReplacementReturnUid");if(h)h=x.identifier(h.name);else{var f=this.get("callee");h=f.scope.generateDeclaredUidIdentifier("ret"),f.get("body").pushContainer("body",x.returnStatement(h)),c.setData("expressionReplacementReturnUid",h)}l.get("expression").replaceWith(x.assignmentExpression("=",h,l.node.expression))}else l.replaceWith(x.returnStatement(l.node.expression))}}return this.node}this.replaceWith(t)}}function l(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)}r.__esModule=!0;var c=e("babel-runtime/core-js/get-iterator"),p=n(c);r.replaceWithMultiple=i,r.replaceWithSourceString=s,r.replaceWith=a,r._replaceWith=o,r.replaceExpressionWithStatements=u,r.replaceInline=l;var h=e("babel-code-frame"),f=n(h),d=e("../index"),m=n(d),y=e("./index"),g=n(y),b=e("babylon"),v=e("babel-types"),x=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(v),E={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});for(var n=[],i=e.node.declarations,s=Array.isArray(i),a=0,i=s?i:(0,p.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;u.init&&n.push(x.expressionStatement(x.assignmentExpression("=",u.id,u.init)))}e.replaceWithMultiple(n)}}}},{"../index":136,"./index":143,"babel-code-frame":23,"babel-runtime/core-js/get-iterator":113,"babel-types":169,babylon:177}],154:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(){function e(t){var r=t.existing,n=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,i.default)(this,e),this.identifier=n,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],155:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var n=N.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),N.scope.has(e.node)||N.scope.set(e.node,n)}function a(e,t){if(j.isModuleDeclaration(e))if(e.source)a(e.source,t);else if(e.specifiers&&e.specifiers.length)for(var r=e.specifiers,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;a(o,t)}else e.declaration&&a(e.declaration,t);else if(j.isModuleSpecifier(e))a(e.local,t);else if(j.isMemberExpression(e))a(e.object,t),a(e.property,t);else if(j.isIdentifier(e))t.push(e.name);else if(j.isLiteral(e))t.push(e.value);else if(j.isCallExpression(e))a(e.callee,t);else if(j.isObjectExpression(e)||j.isObjectPattern(e))for(var u=e.properties,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;a(h.key||h.argument,t)}}r.__esModule=!0;var o=e("babel-runtime/core-js/object/keys"),u=i(o),l=e("babel-runtime/core-js/object/create"),c=i(l),p=e("babel-runtime/core-js/map"),h=i(p),f=e("babel-runtime/helpers/classCallCheck"),d=i(f),m=e("babel-runtime/core-js/get-iterator"),y=i(m),g=e("lodash/includes"),b=i(g),v=e("lodash/repeat"),x=i(v),E=e("./lib/renamer"),A=i(E),D=e("../index"),C=i(D),S=e("lodash/defaults"),_=i(S),w=e("babel-messages"),k=n(w),F=e("./binding"),T=i(F),P=e("globals"),B=i(P),O=e("babel-types"),j=n(O),N=e("../cache"),I=0,L={For:function(e){for(var t=j.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(j.isClassDeclaration(n)||j.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(j.isVariableDeclaration(n))for(var a=n.declarations,o=Array.isArray(a),u=0,a=o?a:(0,y.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l,p=j.getBindingIdentifiers(c);for(var h in p){var f=r.getBinding(h);f&&f.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},M=0,R=function(){function e(t,r){if((0,d.default)(this,e),r&&r.block===t.node)return r;var n=s(t,r,this);if(n)return n;this.uid=M++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new h.default}return e.prototype.traverse=function(e,t,r){(0,C.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return j.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=j.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;j.isAssignmentExpression(e)?r=e.left:j.isVariableDeclarator(e)?r=e.id:(j.isObjectProperty(r)||j.isObjectMethod(r))&&(r=r.key);var n=[];a(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(j.isThisExpression(e)||j.isSuper(e))return!0;if(j.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,k.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new A.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,x.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(j.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(j.isArrayExpression(e))return e;if(j.isIdentifier(e,{name:"arguments"}))return j.callExpression(j.memberExpression(j.memberExpression(j.memberExpression(j.identifier("Array"),j.identifier("prototype")),j.identifier("slice")),j.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(j.numericLiteral(t)),i="slicedToArray"),j.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;this.registerBinding("module",h)}else if(e.isExportDeclaration()){var f=e.get("declaration");(f.isClassDeclaration()||f.isFunctionDeclaration()||f.isVariableDeclaration())&&this.registerDeclaration(f)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?j.unaryExpression("void",j.numericLiteral(0),!0):j.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r)
-;n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var n=t.get("declarations"),i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;this.registerBinding(e,u)}else{var l=this.getProgramParent(),c=t.getBindingIdentifiers(!0);for(var p in c)for(var h=c[p],f=Array.isArray(h),d=0,h=f?h:(0,y.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}var g=m,b=this.getOwnBinding(p);if(b){if(b.identifier===g)continue;this.checkBlockScopedCollisions(b,e,p,g)}b&&b.path.isFlow()&&(b=null),l.references[p]=!0,this.bindings[p]=new T.default({identifier:g,existing:b,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(j.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(j.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(j.isClassBody(e)){for(var n=e.body,i=Array.isArray(n),s=0,n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(j.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(j.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;if(!this.isPure(h,t))return!1}return!0}if(j.isObjectExpression(e)){for(var f=e.properties,d=Array.isArray(f),m=0,f=d?f:(0,y.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if(m=f.next(),m.done)break;g=m.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return j.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):j.isClassProperty(e)||j.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):j.isUnaryExpression(e)?this.isPure(e.argument,t):j.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){I++,this._crawl(),I--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,c.default)(null),this.bindings=(0,c.default)(null),this.globals=(0,c.default)(null),this.uids=(0,c.default)(null),this.data=(0,c.default)(null),e.isLoop())for(var t=j.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[j.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[j.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,y.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if(p=u.next(),p.done)break;h=p.value}var f=h;this.registerBinding("param",f)}if(e.isCatchClause()&&this.registerBinding("let",e),!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(L,d),this.crawling=!1;for(var m=d.assignments,g=Array.isArray(m),b=0,m=g?m:(0,y.default)(m);;){var v;if(g){if(b>=m.length)break;v=m[b++]}else{if(b=m.next(),b.done)break;v=b.value}var x=v,E=x.getBindingIdentifiers(),A=void 0;for(var D in E)x.scope.getBinding(D)||(A=A||x.scope.getProgramParent(),A.addGlobal(E[D]));x.scope.registerConstantViolation(x)}for(var C=d.references,S=Array.isArray(C),_=0,C=S?C:(0,y.default)(C);;){var w;if(S){if(_>=C.length)break;w=C[_++]}else{if(_=C.next(),_.done)break;w=_.value}var k=w,F=k.scope.getBinding(k.node.name);F?F.reference(k):k.scope.getProgramParent().addGlobal(k.node)}for(var T=d.constantViolations,P=Array.isArray(T),B=0,T=P?T:(0,y.default)(T);;){var O;if(P){if(B>=T.length)break;O=T[B++]}else{if(B=T.next(),B.done)break;O=B.value}var N=O;N.scope.registerConstantViolation(N)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(j.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=j.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=j.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,c.default)(null),t=this;do{(0,_.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=(0,c.default)(null),t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=this;do{for(var o in a.bindings){var u=a.bindings[o];u.kind===s&&(e[o]=u)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===I&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,b.default)(e.globals,t))||!(r||!(0,b.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();R.globals=(0,u.default)(B.default.builtin),R.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=R,t.exports=r.default},{"../cache":133,"../index":136,"./binding":154,"./lib/renamer":156,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/core-js/object/create":118,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,globals:303,"lodash/defaults":484,"lodash/includes":496,"lodash/repeat":519}],156:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("../binding"),o=(n(a),e("babel-types")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o),l={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},c=function(){function e(t,r,n){(0,s.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var s in n){var a=s===this.oldName?this.newName:s,o=r?"default":s;i.push(u.exportSpecifier(u.identifier(a),u.identifier(o)))}if(i.length){var l=u.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.maybeConvertFromClassFunctionDeclaration=function(e){},e.prototype.maybeConvertFromClassFunctionExpression=function(e){},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path,a=s.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});a&&this.maybeConvertFromExportDeclaration(a),i.traverse(e||i.block,l,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type,a&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},e}();r.default=c,t.exports=r.default},{"../binding":154,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],157:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!f(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,s=Array.isArray(i),o=0,i=s?i:(0,x.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;e[l]=n}}}a(e),delete e.__esModule,c(e),p(e);for(var m=(0,b.default)(e),y=Array.isArray(m),g=0,m=y?m:(0,x.default)(m);;){var v;if(y){if(g>=m.length)break;v=m[g++]}else{if(g=m.next(),g.done)break;v=g.value}var E=v;if(!f(E)){var D=A[E];if(D){var C=e[E];for(var S in C)C[S]=h(D,C[S]);if(delete e[E],D.types)for(var w=D.types,F=Array.isArray(w),T=0,w=F?w:(0,x.default)(w);;){var P;if(F){if(T>=w.length)break;P=w[T++]}else{if(T=w.next(),T.done)break;P=T.value}var B=P;e[B]?d(e[B],C):e[B]=C}else d(e,C)}}}for(var O in e)if(!f(O)){var j=e[O],N=_.FLIPPED_ALIAS_KEYS[O],I=_.DEPRECATED_KEYS[O];if(I&&(console.trace("Visitor defined for "+O+" but it has been renamed to "+I),N=[I]),N){delete e[O];for(var L=N,M=Array.isArray(L),R=0,L=M?L:(0,x.default)(L);;){var U;if(M){if(R>=L.length)break;U=L[R++]}else{if(R=L.next(),R.done)break;U=R.value}var V=U,q=e[V];q?d(q,j):e[V]=(0,k.default)(j)}}}for(var G in e)f(G)||p(e[G]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(C.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!f(t)){if(_.TYPES.indexOf(t)<0)throw new Error(C.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,y.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(C.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){for(var r=[].concat(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,x.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===o?"undefined":(0,y.default)(o)))}}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i<e.length;i++){var a=e[i],o=t[i];s(a);for(var u in a){var c=a[u];(o||r)&&(c=l(c,o,r));d(n[u]=n[u]||{},c)}}return n}function l(e,t,r){var n={};for(var i in e){(function(i){var s=e[i];if(!Array.isArray(s))return"continue";s=s.map(function(e){var n=e;return t&&(n=function(r){return e.call(t,r,t)}),r&&(n=r(t.key,i,n)),n}),n[i]=s})(i)}return n}function c(e){for(var t in e)if(!f(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function p(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function h(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function f(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function d(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}r.__esModule=!0;var m=e("babel-runtime/helpers/typeof"),y=i(m),g=e("babel-runtime/core-js/object/keys"),b=i(g),v=e("babel-runtime/core-js/get-iterator"),x=i(v);r.explode=s,r.verify=a,r.merge=u;var E=e("./path/lib/virtual-types"),A=n(E),D=e("babel-messages"),C=n(D),S=e("babel-types"),_=n(S),w=e("lodash/clone"),k=i(w)},{"./path/lib/virtual-types":150,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/typeof":131,"babel-types":169,"lodash/clone":480}],158:[function(e,t,r){"use strict";r.__esModule=!0,r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var n=e("babel-runtime/core-js/symbol/for"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=(r.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],r.FLATTENABLE_KEYS=["body","expressions"],r.FOR_INIT_KEYS=["left","init"],r.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],r.LOGICAL_OPERATORS=["||","&&"],r.UPDATE_OPERATORS=["++","--"],r.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),a=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],o=r.COMPARISON_BINARY_OPERATORS=[].concat(a,["in","instanceof"]),u=r.BOOLEAN_BINARY_OPERATORS=[].concat(o,s),l=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],c=(r.BINARY_OPERATORS=["+"].concat(l,u),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),p=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],h=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(c,p,h),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,i.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,i.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":123}],159:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||C.isIdentifier(t)&&(t=C.stringLiteral(t.name)),t}function s(e,t){function r(e){for(var s=!1,a=[],o=e,u=Array.isArray(o),l=0,o=u?o:(0,b.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var p=c;if(C.isExpression(p))a.push(p);else if(C.isExpressionStatement(p))a.push(p.expression);else{if(C.isVariableDeclaration(p)){if("var"!==p.kind)return i=!0;for(var h=p.declarations,f=Array.isArray(h),d=0,h=f?h:(0,b.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}var y=m,g=C.getBindingIdentifiers(y);for(var v in g)n.push({kind:p.kind,id:g[v]});y.init&&a.push(C.assignmentExpression("=",y.id,y.init))}s=!0;continue}if(C.isIfStatement(p)){var x=p.consequent?r([p.consequent]):t.buildUndefinedNode(),E=p.alternate?r([p.alternate]):t.buildUndefinedNode();if(!x||!E)return i=!0;a.push(C.conditionalExpression(p.test,x,E))}else{if(!C.isBlockStatement(p)){if(C.isEmptyStatement(p)){s=!0;continue}return i=!0}a.push(r(p.body))}}s=!1}return(s||0===a.length)&&a.push(t.buildUndefinedNode()),1===a.length?a[0]:C.sequenceExpression(a)}if(e&&e.length){var n=[],i=!1,s=r(e);if(!i){for(var a=0;a<n.length;a++)t.push(n[a]);return s}}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?a.increment()+"":(r=C.isIdentifier(t)?t.name:C.isStringLiteral(t)?(0,y.default)(t.value):(0,y.default)(C.removePropertiesDeep(C.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function o(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),C.isValidIdentifier(e)||(e="_"+e),e||"_"}function u(e){return e=o(e),"eval"!==e&&"arguments"!==e||(e="_"+e),e}function l(e,t){if(C.isStatement(e))return e;var r=!1,n=void 0;if(C.isClass(e))r=!0,n="ClassDeclaration";else if(C.isFunction(e))r=!0,n="FunctionDeclaration";else if(C.isAssignmentExpression(e))return C.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e}function c(e){if(C.isExpressionStatement(e)&&(e=e.expression),C.isExpression(e))return e;if(C.isClass(e)?e.type="ClassExpression":C.isFunction(e)&&(e.type="FunctionExpression"),!C.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e}function p(e,t){return C.isBlockStatement(e)?e:(C.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(C.isStatement(e)||(e=C.isFunction(t)?C.returnStatement(e):C.expressionStatement(e)),e=[e]),C.blockStatement(e))}function h(e){if(void 0===e)return C.identifier("undefined");if(!0===e||!1===e)return C.booleanLiteral(e);if(null===e)return C.nullLiteral();if("string"==typeof e)return C.stringLiteral(e);if("number"==typeof e)return C.numericLiteral(e);if((0,A.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return C.regExpLiteral(t,r)}if(Array.isArray(e))return C.arrayExpression(e.map(C.valueToNode));if((0,x.default)(e)){var n=[];for(var i in e){var s=void 0;s=C.isValidIdentifier(i)?C.identifier(i):C.stringLiteral(i),n.push(C.objectProperty(s,C.valueToNode(e[i])))}return C.objectExpression(n)}throw new Error("don't know how to turn this value into a node")}r.__esModule=!0;var f=e("babel-runtime/core-js/number/max-safe-integer"),d=n(f),m=e("babel-runtime/core-js/json/stringify"),y=n(m),g=e("babel-runtime/core-js/get-iterator"),b=n(g);r.toComputedKey=i,r.toSequenceExpression=s,r.toKeyAlias=a,r.toIdentifier=o,r.toBindingIdentifierName=u,r.toStatement=l,r.toExpression=c,r.toBlock=p,r.valueToNode=h;var v=e("lodash/isPlainObject"),x=n(v),E=e("lodash/isRegExp"),A=n(E),D=e("./index"),C=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(D);a.uid=0,a.increment=function(){return a.uid>=d.default?a.uid=0:a.uid++}},{"./index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/number/max-safe-integer":116,"lodash/isPlainObject":507,"lodash/isRegExp":508}],160:[function(e,t,r){"use strict";var n=e("../index"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n),s=e("../constants"),a=e("./index"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);(0,o.default)("ArrayExpression",{fields:{elements:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,o.default)("AssignmentExpression",{fields:{operator:{validate:(0,a.assertValueType)("string")},left:{validate:(0,a.assertNodeType)("LVal")},right:{validate:(0,a.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,o.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.BINARY_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,o.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,a.assertNodeType)("DirectiveLiteral")}}}),(0,o.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),(0,o.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,o.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,o.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,o.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Expression")},alternate:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,o.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("DebuggerStatement",{aliases:["Statement"]}),(0,o.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,o.default)("EmptyStatement",{aliases:["Statement"]}),(0,o.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,o.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,a.assertNodeType)("Program")}}}),(0,o.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,a.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,a.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},update:{validate:(0,a.assertNodeType)("Expression"),optional:!0},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,a.assertNodeType)("Identifier")},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,o.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}}}),(0,o.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){i.isValidIdentifier(r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,a.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,a.assertValueType)("string")},flags:{validate:(0,a.assertValueType)("string"),default:""}}}),(0,o.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.LOGICAL_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,a.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,o.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}}}),(0,o.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,o.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,o.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,o.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,a.assertNodeType)("Expression")},shorthand:{validate:(0,a.assertValueType)("boolean"),default:!1},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,o.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,a.assertNodeType)("LVal")},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),(0,o.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,o.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}}}),(0,o.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,a.assertNodeType)("Expression")},cases:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("SwitchCase")))}}}),(0,o.default)("ThisExpression",{aliases:["Expression"]}),(0,o.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,a.assertNodeType)("BlockStatement")},handler:{optional:!0,
-handler:(0,a.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,a.assertNodeType)("BlockStatement")}}}),(0,o.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,o.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,o.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("var","let","const"))},declarations:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("VariableDeclarator")))}}}),(0,o.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,a.assertNodeType)("LVal")},init:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}}),(0,o.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":158,"../index":169,"./index":164}],161:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],162:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],163:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":164}],164:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,g.default)(e)}function s(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)e(t,r+"["+i+"]",n[i])}return t.each=e,t}function a(){function e(e,t,n){if(r.indexOf(n)<0)throw new TypeError("Property "+t+" expected value to be one of "+(0,m.default)(r)+" but got "+(0,m.default)(n))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOf=r,e}function o(){function e(e,t,n){for(var i=!1,s=r,a=Array.isArray(s),o=0,s=a?s:(0,f.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(v.is(l,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeTypes=r,e}function u(){function e(e,t,n){for(var s=!1,a=r,o=Array.isArray(a),u=0,a=o?a:(0,f.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(i(n)===c||v.is(c,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeOrValueTypes=r,e}function l(e){function t(t,r,n){if(i(n)!==e)throw new TypeError("Property "+r+" expected type of "+e+" but got "+i(n))}return t.type=e,t}function c(){function e(){for(var e=r,t=Array.isArray(e),n=0,e=t?e:(0,f.default)(e);;){var i;if(t){if(n>=e.length)break;i=e[n++]}else{if(n=e.next(),n.done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.chainOf=r,e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&S[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(C[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),s=Array.isArray(n),a=0,n=s?n:(0,f.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;t.fields[u]=t.fields[u]||{}}for(var c in t.fields){var p=t.fields[c];-1===t.builder.indexOf(c)&&(p.optional=!0),void 0===p.default?p.default=null:p.validate||(p.validate=l(i(p.default)))}x[e]=t.visitor,D[e]=t.builder,A[e]=t.fields,E[e]=t.aliases,S[e]=t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var h=e("babel-runtime/core-js/get-iterator"),f=n(h),d=e("babel-runtime/core-js/json/stringify"),m=n(d),y=e("babel-runtime/helpers/typeof"),g=n(y);r.assertEach=s,r.assertOneOf=a,r.assertNodeType=o,r.assertNodeOrValueType=u,r.assertValueType=l,r.chain=c,r.default=p;var b=e("../index"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x=r.VISITOR_KEYS={},E=r.ALIAS_KEYS={},A=r.NODE_FIELDS={},D=r.BUILDER_KEYS={},C=r.DEPRECATED_KEYS={},S={}},{"../index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/helpers/typeof":131}],165:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":160,"./es2015":161,"./experimental":162,"./flow":163,"./index":164,"./jsx":166,"./misc":167}],166:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":164}],167:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],168:[function(e,t,r){"use strict";function n(e){var t=i(e);return 1===t.length?t[0]:o.unionTypeAnnotation(t)}function i(e){for(var t={},r={},n=[],s=[],a=0;a<e.length;a++){var u=e[a];if(u&&!(s.indexOf(u)>=0)){if(o.isAnyTypeAnnotation(u))return[u];if(o.isFlowBaseAnnotation(u))r[u.type]=u;else if(o.isUnionTypeAnnotation(u))n.indexOf(u.types)<0&&(e=e.concat(u.types),n.push(u.types));else if(o.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=i(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else s.push(u)}}for(var p in r)s.push(r[p]);for(var h in t)s.push(t[h]);return s}function s(e){if("string"===e)return o.stringTypeAnnotation();if("number"===e)return o.numberTypeAnnotation();if("undefined"===e)return o.voidTypeAnnotation();if("boolean"===e)return o.booleanTypeAnnotation();if("function"===e)return o.genericTypeAnnotation(o.identifier("Function"));if("object"===e)return o.genericTypeAnnotation(o.identifier("Object"));if("symbol"===e)return o.genericTypeAnnotation(o.identifier("Symbol"));throw new Error("Invalid typeof value")}r.__esModule=!0,r.createUnionTypeAnnotation=n,r.removeTypeDuplicates=i,r.createTypeAnnotationBasedOnTypeof=s;var a=e("./index"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},{"./index":169}],169:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=H["is"+e];t||(t=H["is"+e]=function(t,r){return H.is(e,t,r)}),H["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,N.default)(e)+" with option "+(0,N.default)(n))}}function s(e,t,r){return!!t&&(!!a(t.type,e)&&(void 0===r||H.shallowEqual(t,r)))}function a(e,t){if(e===t)return!0;if(H.ALIAS_KEYS[t])return!1;var r=H.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(e===a)return!0}}return!1}function o(e,t,r){if(e){var n=H.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function u(e,t){for(var r=(0,O.default)(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(e[o]!==t[o])return!1}return!0}function l(e,t,r){return e.object=H.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function c(e,t){return e.object=H.memberExpression(t,e.object),e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=H.toBlock(e[t],e)}function h(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function f(e){var t=h(e);return delete t.loc,t}function d(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=H.cloneDeep(n):Array.isArray(n)&&(n=n.map(H.cloneDeep))),t[r]=n}return t}function m(e,t){var r=e.split(".");return function(e){if(!H.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(H.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!H.isStringLiteral(s)){if(H.isMemberExpression(s)){if(s.computed&&!H.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}}function y(e){for(var t=H.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,P.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}delete e[i]}return e}function g(e,t){return b(e,t),v(e,t),x(e,t),e}function b(e,t){E("trailingComments",e,t)}function v(e,t){E("leadingComments",e,t)}function x(e,t){E("innerComments",e,t)}function E(e,t,r){t&&r&&(t[e]=(0,W.default)([].concat(t[e],r[e]).filter(Boolean)))}function A(e,t){if(!e||!t)return e;for(var r=H.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,P.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=H.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,P.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;e[h]=t[h]}return H.inheritsComments(e,t),e}function D(e){if(!C(e))throw new TypeError("Not a valid node "+(e&&e.type))}function C(e){return!(!e||!K.VISITOR_KEYS[e.type])}function S(e,t,r){if(e){var n=H.VISITOR_KEYS[e.type];if(n){r=r||{},t(e,r);for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,P.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var c=l,p=Array.isArray(c),h=0,c=p?c:(0,P.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;S(d,t,r)}else S(l,t,r)}}}}function _(e,t){t=t||{};for(var r=t.preserveComments?Z:ee,n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,F.default)(e),c=l,p=Array.isArray(c),h=0,c=p?c:(0,P.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}e[f]=null}}function w(e,t){return S(e,_,t),e}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var k=e("babel-runtime/core-js/object/get-own-property-symbols"),F=n(k),T=e("babel-runtime/core-js/get-iterator"),P=n(T),B=e("babel-runtime/core-js/object/keys"),O=n(B),j=e("babel-runtime/core-js/json/stringify"),N=n(j),I=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return I.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return I.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return I.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return I.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return I.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return I.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return I.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return I.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return I.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return I.NOT_LOCAL_BINDING}}),r.is=s,r.isType=a,r.validate=o,r.shallowEqual=u,r.appendToMemberExpression=l,r.prependToMemberExpression=c,r.ensureBlock=p,r.clone=h,r.cloneWithoutLoc=f,r.cloneDeep=d,r.buildMatchMemberExpression=m,r.removeComments=y,r.inheritsComments=g,r.inheritTrailingComments=b,r.inheritLeadingComments=v,r.inheritInnerComments=x,r.inherits=A,r.assertNode=D,r.isNode=C,r.traverseFast=S,r.removeProperties=_,r.removePropertiesDeep=w;var L=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return L.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return L.getOuterBindingIdentifiers}});var M=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return M.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return M.isReferenced}}),
-Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return M.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return M.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return M.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return M.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return M.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return M.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return M.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return M.isNodesEquivalent}});var R=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return R.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return R.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return R.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return R.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return R.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return R.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return R.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return R.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return R.valueToNode}});var U=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return U.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return U.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return U.createTypeAnnotationBasedOnTypeof}});var V=e("to-fast-properties"),q=n(V),G=e("lodash/clone"),X=n(G),J=e("lodash/uniq"),W=n(J);e("./definitions/init");var K=e("./definitions"),z=e("./react"),Y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(z),H=r;r.VISITOR_KEYS=K.VISITOR_KEYS,r.ALIAS_KEYS=K.ALIAS_KEYS,r.NODE_FIELDS=K.NODE_FIELDS,r.BUILDER_KEYS=K.BUILDER_KEYS,r.DEPRECATED_KEYS=K.DEPRECATED_KEYS,r.react=Y;for(var $ in H.VISITOR_KEYS)i($);H.FLIPPED_ALIAS_KEYS={},(0,O.default)(H.ALIAS_KEYS).forEach(function(e){H.ALIAS_KEYS[e].forEach(function(t){(H.FLIPPED_ALIAS_KEYS[t]=H.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,O.default)(H.FLIPPED_ALIAS_KEYS).forEach(function(e){H[e.toUpperCase()+"_TYPES"]=H.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,O.default)(H.VISITOR_KEYS).concat((0,O.default)(H.FLIPPED_ALIAS_KEYS)).concat((0,O.default)(H.DEPRECATED_KEYS));(0,O.default)(H.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;for(var n=0,i=r,s=Array.isArray(i),a=0,i=s?i:(0,P.default)(i);;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if(a=i.next(),a.done)break;u=a.value}var l=u,c=H.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,X.default)(c.default)),t[l]=p}for(var h in t)o(t,h,t[h]);return t}var r=H.BUILDER_KEYS[e];H[e]=t,H[e[0].toLowerCase()+e.slice(1)]=t});for(var Q in H.DEPRECATED_KEYS)!function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=H.DEPRECATED_KEYS[e];H[e]=H[e[0].toLowerCase()+e.slice(1)]=t(H[r]),H["is"+e]=t(H["is"+r]),H["assert"+e]=t(H["assert"+r])}(Q);(0,q.default)(H),(0,q.default)(H.VISITOR_KEYS);var Z=["tokens","start","end","loc","raw","rawValue"],ee=H.COMMENT_KEYS.concat(["comments"]).concat(Z)},{"./constants":158,"./converters":159,"./definitions":164,"./definitions/init":165,"./flow":168,"./react":170,"./retrievers":171,"./validators":172,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/get-own-property-symbols":119,"babel-runtime/core-js/object/keys":120,"lodash/clone":480,"lodash/uniq":529,"to-fast-properties":595}],170:[function(e,t,r){"use strict";function n(e){return!!e&&/^[a-z]|\-/.test(e)}function i(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,i=0;i<r.length;i++)r[i].match(/[^ \t]/)&&(n=i);for(var s="",a=0;a<r.length;a++){var u=r[a],l=0===a,c=a===r.length-1,p=a===n,h=u.replace(/\t/g," ");l||(h=h.replace(/^[ ]+/,"")),c||(h=h.replace(/[ ]+$/,"")),h&&(p||(h+=" "),s+=h)}s&&t.push(o.stringLiteral(s))}function s(e){for(var t=[],r=0;r<e.children.length;r++){var n=e.children[r];o.isJSXText(n)?i(n,t):(o.isJSXExpressionContainer(n)&&(n=n.expression),o.isJSXEmptyExpression(n)||t.push(n))}return t}r.__esModule=!0,r.isReactComponent=void 0,r.isCompatTag=n,r.buildChildren=s;var a=e("./index"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a);r.isReactComponent=o.buildMatchMemberExpression("React.Component")},{"./index":169}],171:[function(e,t,r){"use strict";function n(e,t,r){for(var n=[].concat(e),i=(0,a.default)(null);n.length;){var s=n.shift();if(s){var o=u.getBindingIdentifiers.keys[s.type];if(u.isIdentifier(s))if(t){var l=i[s.name]=i[s.name]||[];l.push(s)}else i[s.name]=s;else if(u.isExportDeclaration(s))u.isDeclaration(s.declaration)&&n.push(s.declaration);else{if(r){if(u.isFunctionDeclaration(s)){n.push(s.id);continue}if(u.isFunctionExpression(s))continue}if(o)for(var c=0;c<o.length;c++){var p=o[c];s[p]&&(n=n.concat(s[p]))}}}}return i}function i(e,t){return n(e,t,!0)}r.__esModule=!0;var s=e("babel-runtime/core-js/object/create"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);r.getBindingIdentifiers=n,r.getOuterBindingIdentifiers=i;var o=e("./index"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o);n.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],RestProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},{"./index":169,"babel-runtime/core-js/object/create":118}],172:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=x.getBindingIdentifiers.keys[t.type];if(r)for(var n=0;n<r.length;n++){var i=r[n],s=t[i];if(Array.isArray(s)){if(s.indexOf(e)>=0)return!0}else if(s===e)return!0}return!1}function s(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=Array.isArray(r),i=0,r=n?r:(0,v.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function a(e){return"string"==typeof e&&!A.default.keyword.isReservedWordES6(e,!0)&&A.default.keyword.isIdentifierNameES6(e)}function o(e){return C.isVariableDeclaration(e)&&("var"!==e.kind||e[S.BLOCK_SCOPED_SYMBOL])}function u(e){return C.isFunctionDeclaration(e)||C.isClassDeclaration(e)||C.isLet(e)}function l(e){return C.isVariableDeclaration(e,{kind:"var"})&&!e[S.BLOCK_SCOPED_SYMBOL]}function c(e){return C.isImportDefaultSpecifier(e)||C.isIdentifier(e.imported||e.exported,{name:"default"})}function p(e,t){return(!C.isBlockStatement(e)||!C.isFunction(t,{body:e}))&&C.isScopable(e)}function h(e){return!!C.isType(e.type,"Immutable")||!!C.isIdentifier(e)&&"undefined"===e.name}function f(e,t){if("object"!==(void 0===e?"undefined":(0,g.default)(e))||"object"!==(void 0===e?"undefined":(0,g.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=(0,m.default)(C.NODE_FIELDS[e.type]||e.type),n=r,i=Array.isArray(n),s=0,n=i?n:(0,v.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if((0,g.default)(e[o])!==(0,g.default)(t[o]))return!1;if(Array.isArray(e[o])){if(!Array.isArray(t[o]))return!1;if(e[o].length!==t[o].length)return!1;for(var u=0;u<e[o].length;u++)if(!f(e[o][u],t[o][u]))return!1}else if(!f(e[o],t[o]))return!1}return!0}r.__esModule=!0;var d=e("babel-runtime/core-js/object/keys"),m=n(d),y=e("babel-runtime/helpers/typeof"),g=n(y),b=e("babel-runtime/core-js/get-iterator"),v=n(b);r.isBinding=i,r.isReferenced=s,r.isValidIdentifier=a,r.isLet=o,r.isBlockScoped=u,r.isVar=l,r.isSpecifierDefault=c,r.isScope=p,r.isImmutable=h,r.isNodesEquivalent=f;var x=e("./retrievers"),E=e("esutils"),A=n(E),D=e("./index"),C=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(D),S=e("./constants")},{"./constants":158,"./index":169,"./retrievers":171,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/typeof":131,esutils:176}],173:[function(e,t,r){arguments[4][24][0].apply(r,arguments)},{dup:24}],174:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],175:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{"./code":174,dup:26}],176:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"./ast":173,"./code":174,"./keyword":175,dup:27}],177:[function(e,t,r){"use strict";function n(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function i(e,t){for(var r=65536,n=0;n<t.length;n+=2){if((r+=t[n])>e)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&E.test(String.fromCharCode(e)):i(e,D)))}function a(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):i(e,D)||i(e,C))))}function o(e){var t={};for(var r in S)t[r]=e&&r in e?e[r]:S[r];return t}function u(e){return 10===e||13===e||8232===e||8233===e}function l(e,t){for(var r=1,n=0;;){L.lastIndex=n;var i=L.exec(e);if(!(i&&i.index<t))return new V(r,t-n);++r,n=i.index+i[0].length}}function c(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function p(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function h(e){return e[e.length-1]}function f(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function d(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?d(e.object)+"."+d(e.property):void 0}function m(e,t){return new z(t,e).parse()}function y(e,t){var r=new z(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}Object.defineProperty(r,"__esModule",{value:!0});var g={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},b=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",x="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",E=new RegExp("["+v+"]"),A=new RegExp("["+v+x+"]");v=x=null;var D=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],C=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],S={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},k=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},F=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},T=!0,P=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},B=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,t),n.keyword=r,F(this,e.call(this,r,n))}return k(t,e),t}(P),O=function(e){function t(r,n){return w(this,t),F(this,e.call(this,r,{beforeExpr:T,binop:n}))}return k(t,e),t}(P),j={num:new P("num",{startsExpr:!0}),regexp:new P("regexp",{startsExpr:!0}),string:new P("string",{startsExpr:!0}),name:new P("name",{startsExpr:!0}),eof:new P("eof"),bracketL:new P("[",{beforeExpr:T,startsExpr:!0}),bracketR:new P("]"),braceL:new P("{",{beforeExpr:T,startsExpr:!0}),braceBarL:new P("{|",{beforeExpr:T,startsExpr:!0}),braceR:new P("}"),braceBarR:new P("|}"),parenL:new P("(",{beforeExpr:T,startsExpr:!0}),parenR:new P(")"),comma:new P(",",{beforeExpr:T}),semi:new P(";",{beforeExpr:T}),colon:new P(":",{beforeExpr:T}),doubleColon:new P("::",{beforeExpr:T}),dot:new P("."),question:new P("?",{beforeExpr:T}),arrow:new P("=>",{beforeExpr:T}),template:new P("template"),ellipsis:new P("...",{beforeExpr:T}),backQuote:new P("`",{startsExpr:!0}),dollarBraceL:new P("${",{beforeExpr:T,startsExpr:!0}),at:new P("@"),eq:new P("=",{beforeExpr:T,isAssign:!0}),assign:new P("_=",{beforeExpr:T,isAssign:!0}),incDec:new P("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new P("prefix",{beforeExpr:T,prefix:!0,startsExpr:!0}),logicalOR:new O("||",1),logicalAND:new O("&&",2),bitwiseOR:new O("|",3),bitwiseXOR:new O("^",4),bitwiseAND:new O("&",5),equality:new O("==/!=",6),relational:new O("</>",7),bitShift:new O("<</>>",8),plusMin:new P("+/-",{beforeExpr:T,binop:9,prefix:!0,startsExpr:!0}),modulo:new O("%",10),star:new O("*",10),slash:new O("/",10),exponent:new P("**",{beforeExpr:T,binop:11,rightAssociative:!0})},N={break:new B("break"),case:new B("case",{beforeExpr:T}),catch:new B("catch"),continue:new B("continue"),debugger:new B("debugger"),default:new B("default",{beforeExpr:T}),do:new B("do",{isLoop:!0,beforeExpr:T}),else:new B("else",{beforeExpr:T}),finally:new B("finally"),for:new B("for",{isLoop:!0}),function:new B("function",{startsExpr:!0}),if:new B("if"),return:new B("return",{beforeExpr:T}),switch:new B("switch"),throw:new B("throw",{beforeExpr:T}),try:new B("try"),var:new B("var"),let:new B("let"),const:new B("const"),while:new B("while",{isLoop:!0}),with:new B("with"),new:new B("new",{beforeExpr:T,startsExpr:!0}),this:new B("this",{startsExpr:!0}),super:new B("super",{startsExpr:!0}),class:new B("class"),extends:new B("extends",{beforeExpr:T}),export:new B("export"),import:new B("import"),yield:new B("yield",{beforeExpr:T,startsExpr:!0}),null:new B("null",{startsExpr:!0}),true:new B("true",{startsExpr:!0}),false:new B("false",{startsExpr:!0}),in:new B("in",{beforeExpr:T,binop:7}),instanceof:new B("instanceof",{beforeExpr:T,binop:7}),typeof:new B("typeof",{beforeExpr:T,prefix:!0,startsExpr:!0}),void:new B("void",{beforeExpr:T,prefix:!0,startsExpr:!0}),delete:new B("delete",{beforeExpr:T,prefix:!0,startsExpr:!0})};Object.keys(N).forEach(function(e){j["_"+e]=N[e]});var I=/\r\n?|\n|\u2028|\u2029/,L=new RegExp(I.source,"g"),M=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=function e(t,r,n,i){w(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},U={braceStatement:new R("{",!1),braceExpression:new R("{",!0),templateQuasi:new R("${",!0),parenStatement:new R("(",!1),parenExpression:new R("(",!0),template:new R("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new R("function",!0)};j.parenR.updateContext=j.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var e=this.state.context.pop();e===U.braceStatement&&this.curContext()===U.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===U.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr},j.name.updateContext=function(e){this.state.exprAllowed=!1,e!==j._let&&e!==j._const&&e!==j._var||I.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},j.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?U.braceStatement:U.braceExpression),this.state.exprAllowed=!0},j.dollarBraceL.updateContext=function(){this.state.context.push(U.templateQuasi),this.state.exprAllowed=!0},j.parenL.updateContext=function(e){var t=e===j._if||e===j._for||e===j._with||e===j._while;this.state.context.push(t?U.parenStatement:U.parenExpression),this.state.exprAllowed=!0},j.incDec.updateContext=function(){},j._function.updateContext=function(){this.curContext()!==U.braceStatement&&this.state.context.push(U.functionExpression),this.state.exprAllowed=!1},j.backQuote.updateContext=function(){this.curContext()===U.template?this.state.context.pop():this.state.context.push(U.template),this.state.exprAllowed=!1};var V=function e(t,r){w(this,e),this.line=t,this.column=r},q=function e(t,r){w(this,e),this.start=t,this.end=r},G=function(){function e(){w(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=j.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[U.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new V(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),X=function e(t){w(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new q(t.startLoc,t.endLoc)},J=function(){function e(t,r){w(this,e),this.state=new G,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new X(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return b(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(j.num)||this.match(j.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(j.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new q(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,L.lastIndex=t;for(var n=void 0;(n=L.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())},e.prototype.skipLineComment=function(e){for(var t=this.state.pos,r=this.state.curPosition(),n=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.state.pos,n=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())},e.prototype.skipSpace=function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&M.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(j.ellipsis)):(++this.state.pos,this.finishToken(j.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?j.star:j.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=j.exponent),61===n&&(r++,t=j.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?j.logicalOR:j.logicalAND,2):61===t?this.finishOp(j.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(j.braceBarR,2):this.finishOp(124===e?j.bitwiseOR:j.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&I.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(j.incDec,2):61===t?this.finishOp(j.assign,2):this.finishOp(j.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(j.assign,r+1):this.finishOp(j.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(j.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(j.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(j.arrow)):this.finishOp(61===e?j.eq:j.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(j.parenL);case 41:return++this.state.pos,this.finishToken(j.parenR);case 59:return++this.state.pos,this.finishToken(j.semi);case 44:return++this.state.pos,this.finishToken(j.comma);case 91:return++this.state.pos,this.finishToken(j.bracketL);case 93:return++this.state.pos,this.finishToken(j.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.braceBarL,2):(++this.state.pos,this.finishToken(j.braceL));case 125:return++this.state.pos,this.finishToken(j.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.doubleColon,2):(++this.state.pos,this.finishToken(j.colon));case 63:return++this.state.pos,this.finishToken(j.question);case 64:return++this.state.pos,this.finishToken(j.at);case 96:return++this.state.pos,this.finishToken(j.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(j.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+c(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(I.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(j.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i<s;++i){var a=this.input.charCodeAt(this.state.pos),o=void 0;if((o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e)
-;return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(j.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(this.state.pos),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.state.pos);46===i&&(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||(i=this.input.charCodeAt(++this.state.pos),43!==i&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?/[89]/.test(a)||this.state.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(j.num,o)},e.prototype.readCodePoint=function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(u(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(j.template)?36===r?(this.state.pos+=2,this.finishToken(j.dollarBraceL)):(++this.state.pos,this.finishToken(j.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if(u(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return c(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(r,8);return n>255&&(r=r.slice(0,-1),n=parseInt(r,8)),n>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(n)}return String.fromCharCode(t)}},e.prototype.readHexChar=function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(a(n))this.state.pos+=n<=65535?1:2;else{if(92!==n)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var i=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint();(t?s:a)(o,!0)||this.raise(i,"Invalid Unicode escape"),e+=c(o),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)},e.prototype.readWord=function(){var e=this.readWord1(),t=j.name;return!this.state.containsEsc&&this.isKeyword(e)&&(t=N[e]),this.finishToken(t,e)},e.prototype.braceIsBlock=function(e){if(e===j.colon){var t=this.curContext();if(t===U.braceStatement||t===U.braceExpression)return!t.isExpr}return e===j._return?I.test(this.input.slice(this.state.lastTokEnd,this.state.start)):e===j._else||e===j.semi||e===j.eof||e===j.parenR||(e===j.braceL?this.curContext()===U.braceStatement:!this.state.exprAllowed)},e.prototype.updateContext=function(e){var t=this.state.type,r=void 0;t.keyword&&e===j.dot?this.state.exprAllowed=!1:(r=t.updateContext)?r.call(this,e):this.state.exprAllowed=t.beforeExpr},e}(),W={},K=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],z=function(e){function t(r,n){w(this,t),r=o(r);var i=F(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return k(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:g[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&K.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(W).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=W[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow")),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e}),e.unshift("estree"));for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=W[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(J),Y=z.prototype;Y.addExtra=function(e,t,r){if(e){(e.extra=e.extra||{})[t]=r}},Y.isRelational=function(e){return this.match(j.relational)&&this.state.value===e},Y.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,j.relational)},Y.isContextual=function(e){return this.match(j.name)&&this.state.value===e},Y.eatContextual=function(e){return this.state.value===e&&this.eat(j.name)},Y.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},Y.canInsertSemicolon=function(){return this.match(j.eof)||this.match(j.braceR)||I.test(this.input.slice(this.state.lastTokEnd,this.state.start))},Y.isLineTerminator=function(){return this.eat(j.semi)||this.canInsertSemicolon()},Y.semicolon=function(){this.isLineTerminator()||this.unexpected(null,j.semi)},Y.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},Y.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":_(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var H=z.prototype;H.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,j.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var $={kind:"loop"},Q={kind:"switch"};H.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},H.parseStatement=function(e,t){this.match(j.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case j._break:case j._continue:return this.parseBreakContinueStatement(n,r.keyword);case j._debugger:return this.parseDebuggerStatement(n);case j._do:return this.parseDoStatement(n);case j._for:return this.parseForStatement(n);case j._function:return e||this.unexpected(),this.parseFunctionStatement(n);case j._class:return e||this.unexpected(),this.parseClass(n,!0);case j._if:return this.parseIfStatement(n);case j._return:return this.parseReturnStatement(n);case j._switch:return this.parseSwitchStatement(n);case j._throw:return this.parseThrowStatement(n);case j._try:return this.parseTryStatement(n);case j._let:case j._const:e||this.unexpected();case j._var:return this.parseVarStatement(n,r);case j._while:return this.parseWhileStatement(n);case j._with:return this.parseWithStatement(n);case j.braceL:return this.parseBlock();case j.semi:return this.parseEmptyStatement(n);case j._export:case j._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===j.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===j._import?this.parseImport(n):this.parseExport(n);case j.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(j._function)&&!this.canInsertSemicolon())return this.expect(j._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===j.name&&"Identifier"===a.type&&this.eat(j.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},H.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},H.parseDecorators=function(e){for(;this.match(j.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(j._export)||this.match(j._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},H.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},H.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(j.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n<this.state.labels.length;++n){var i=this.state.labels[n];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return n===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},H.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},H.parseDoStatement=function(e){return this.next(),this.state.labels.push($),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(j._while),e.test=this.parseParenExpression(),this.eat(j.semi),this.finishNode(e,"DoWhileStatement")},H.parseForStatement=function(e){this.next(),this.state.labels.push($);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(j.parenL),this.match(j.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(j._var)||this.match(j._let)||this.match(j._const)){var r=this.startNode(),n=this.state.type;return this.next(),(this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),!this.match(j._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init)?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var i={start:0},s=this.parseExpression(!0,i);if(this.match(j._in)||this.isContextual("of")){var a=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(s,void 0,a),this.checkLVal(s,void 0,void 0,a),this.parseForIn(e,s,t)}return i.start&&this.unexpected(i.start),t&&this.unexpected(),this.parseFor(e,s)},H.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(j._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},H.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},H.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(j.braceL),this.state.labels.push(Q);for(var t,r=void 0;!this.match(j.braceR);)if(this.match(j._case)||this.match(j._default)){var n=this.match(j._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(j.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")},H.parseThrowStatement=function(e){return this.next(),I.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Z=[];H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(j._catch)){var t=this.startNode();this.next(),this.expect(j.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0,Object.create(null),"catch clause"),this.expect(j.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.guardedHandlers=Z,e.finalizer=this.eat(j._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},H.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},H.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.state.labels.push($),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"WhileStatement")},H.parseWithStatement=function(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},H.parseLabeledStatement=function(e,t,r){for(var n=this.state.labels,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(j._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e){var t=this.startNode();return this.expect(j.braceL),this.parseBlockBody(t,e,!1,j.braceR),this.finishNode(t,"BlockStatement")},H.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},H.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},H.parseFor=function(e,t){return e.init=t,this.expect(j.semi),e.test=this.match(j.semi)?null:this.parseExpression(),this.expect(j.semi),e.update=this.match(j.parenR)?null:this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(j._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},H.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(j.eq)?n.init=this.parseMaybeAssign(t):r!==j._const||this.match(j._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(j._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(j.comma))break}return e},H.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},H.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(j.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(j.name)||this.match(j._yield)||this.unexpected(),(this.match(j.name)||this.match(j._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect(j.parenL),e.params=this.parseBindingList(j.parenR)},H.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.isClassProperty=function(){return this.match(j.eq)||this.isLineTerminator()},H.isClassMutatorStarter=function(){return!1},H.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(j.braceL);!this.eat(j.braceR);)if(this.eat(j.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(j.at))i.push(this.parseDecorator());else{var a=this.startNode();i.length&&(a.decorators=i,i=[]);var o=!1,u=this.match(j.name)&&"static"===this.state.value,l=this.eat(j.star),c=!1,p=!1;if(this.parsePropertyName(a),a.static=u&&!this.match(j.parenL),a.static&&(l=this.eat(j.star),this.parsePropertyName(a)),!l){if(this.isClassProperty()){s.body.push(this.parseClassProperty(a));continue}"Identifier"===a.key.type&&!a.computed&&this.hasPlugin("classConstructorCall")&&"call"===a.key.name&&this.match(j.name)&&"constructor"===this.state.value&&(o=!0,this.parsePropertyName(a))}var h=!this.match(j.parenL)&&!a.computed&&"Identifier"===a.key.type&&"async"===a.key.name;if(h&&(this.hasPlugin("asyncGenerators")&&this.eat(j.star)&&(l=!0),p=!0,this.parsePropertyName(a)),a.kind="method",!a.computed){var f=a.key;p||l||this.isClassMutatorStarter()||"Identifier"!==f.type||this.match(j.parenL)||"get"!==f.name&&"set"!==f.name||(c=!0,a.kind=f.name,f=this.parsePropertyName(a));var d=!(o||a.static||"constructor"!==f.name&&"constructor"!==f.value);d&&(n&&this.raise(f.start,"Duplicate constructor in the same class"),c&&this.raise(f.start,"Constructor can't have get/set modifier"),l&&this.raise(f.start,"Constructor can't be a generator"),p&&this.raise(f.start,"Constructor can't be an async function"),a.kind="constructor",n=!0);var m=a.static&&("prototype"===f.name||"prototype"===f.value);m&&this.raise(f.start,"Classes may not have static property named prototype")}o&&(r&&this.raise(a.start,"Duplicate constructor call in the same class"),a.kind="constructorCall",r=!0),"constructor"!==a.kind&&"constructorCall"!==a.kind||!a.decorators||this.raise(a.start,"You can't attach decorators to a class constructor"),this.parseClassMethod(s,a,l,p),c&&this.checkGetterSetterParamCount(a)}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},H.parseClassProperty=function(e){return this.match(j.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.finishNode(e,"ClassProperty")},H.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},H.parseClassId=function(e,t,r){this.match(j.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},H.parseClassSuper=function(e){e.superClass=this.eat(j._extends)?this.parseExprSubscripts():null},H.parseExport=function(e){if(this.next(),this.match(j.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(j.comma)&&this.lookahead().type===j.star){this.expect(j.comma);var n=this.startNode();this.expect(j.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(j._default)){var i=this.startNode(),s=!1;return this.eat(j._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(j._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},H.parseExportDeclaration=function(){return this.parseStatement(!0)},H.isExportDefaultSpecifier=function(){if(this.match(j.name))return"type"!==this.state.value&&"async"!==this.state.value&&"interface"!==this.state.value;if(!this.match(j._default))return!1;var e=this.lookahead();return e.type===j.comma||e.type===j.name&&"from"===e.value},H.parseExportSpecifiersMaybe=function(e){this.eat(j.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},H.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(j.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},H.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},H.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},H.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},H.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},H.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},H.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;var n=this.match(j._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},H.parseImport=function(e){return this.eat(j._import),this.match(j.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(j.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},H.parseImportSpecifiers=function(e){var t=!0;if(this.match(j.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(j.comma))return}if(this.match(j.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.eat(j.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(j.comma),this.eat(j.braceR))break;this.parseImportSpecifier(e)}},H.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},H.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var ee=z.prototype;ee.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var u="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,u)}return e},ee.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a<n;a++){var o=e[a];o&&this.toAssignable(o,t,r)}return e},ee.toReferencedList=function(e){return e},ee.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ee.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.parseBindingIdentifier(),this.finishNode(e,"RestElement")},ee.shouldAllowYieldIdentifier=function(){return this.match(j._yield)&&!this.state.strict&&!this.state.inGenerator},ee.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},ee.parseBindingAtom=function(){switch(this.state.type){case j._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case j.name:return this.parseIdentifier(!0);case j.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(j.bracketR,!0),this.finishNode(e,"ArrayPattern");case j.braceL:return this.parseObj(!0);default:this.unexpected()}},ee.parseBindingList=function(e,t){for(var r=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(j.comma),t&&this.match(j.comma))r.push(null);else{if(this.eat(e))break;if(this.match(j.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var i=[];this.match(j.at);)i.push(this.parseDecorator());var s=this.parseMaybeDefault();i.length&&(s.decorators=i),this.parseAssignableListItemTypes(s),r.push(this.parseMaybeDefault(s.start,s.loc.start,s))}return r},ee.parseAssignableListItemTypes=function(e){return e},ee.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(j.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},ee.checkLVal=function(e,t,r,n){switch(e.type){case"Identifier":if(this.checkReservedWord(e.name,e.start,!1,!0),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var s=e.properties,a=Array.isArray(s),o=0,s=a?s:s[Symbol.iterator]();;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u
-;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,p=Array.isArray(c),h=0,c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var te=z.prototype;te.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},te.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(j.eof)||this.unexpected(),e},te.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(j.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(j.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},te.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(j._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(j.parenL)||this.match(j.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(j.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},te.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},te.parseConditional=function(e,t,r,n){if(this.eat(j.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(j.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},te.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},te.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(j._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===j.logicalOR||o===j.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},te.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(j.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==j.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},te.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},te.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(j.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(j.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(j.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(j.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(j.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(j.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(j.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(),e=this.finishNode(l,"TaggedTemplateExpression")}}},te.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;this.match(j.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},te.shouldParseAsyncArrow=function(){return this.match(j.arrow)},te.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(j.arrow),this.parseArrowExpression(e,t.arguments,!0)},te.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},te.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case j._super:return this.state.inMethod||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(j.parenL)||this.match(j.bracketL)||this.match(j.dot)||this.unexpected(),this.match(j.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case j._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(j.parenL)||this.unexpected(null,j.parenL),this.finishNode(r,"Import");case j._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case j._yield:this.state.inGenerator&&this.unexpected();case j.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(j._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(j.name)){var a=[this.parseIdentifier()];return this.expect(j.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(j.arrow)?this.parseArrowExpression(r,[s]):s;case j._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case j.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case j.num:return this.parseLiteral(this.state.value,"NumericLiteral");case j.string:return this.parseLiteral(this.state.value,"StringLiteral");case j._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case j._true:case j._false:return r=this.startNode(),r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteral");case j.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case j.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(j.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case j.braceL:return this.parseObj(!1,e);case j._function:return this.parseFunctionExpression();case j.at:this.parseDecorators();case j._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case j._new:return this.parseNew();case j.backQuote:return this.parseTemplate();case j.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},te.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(j.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},te.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},te.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},te.parseParenExpression=function(){this.expect(j.parenL);var e=this.parseExpression();return this.expect(j.parenR),e},te.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(j.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(j.parenR);){if(l)l=!1;else if(this.expect(j.comma,u.start||null),this.match(j.parenR)){p=this.state.start;break}if(this.match(j.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),f,h));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(j.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){for(var g=a,b=Array.isArray(g),v=0,g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if(v=g.next(),v.done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?(n=this.startNodeAt(i,s),n.expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},te.shouldParseArrow=function(){return!this.canInsertSemicolon()},te.parseArrow=function(e){if(this.eat(j.arrow))return e},te.parseParenItem=function(e){return e},te.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.eat(j.dot)?this.parseMetaProperty(e,t,"target"):(e.callee=this.parseNoCallExpr(),this.eat(j.parenL)?(e.arguments=this.parseExprList(j.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression"))},te.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(j.backQuote),this.finishNode(e,"TemplateElement")},te.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(j.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(j.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},te.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(j.braceR);){if(i)i=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;for(;this.match(j.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(j.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(j.braceR))break;if(this.match(j.comma)&&this.lookahead().type===j.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(j.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(j.colon)||this.match(j.parenL)||this.match(j.braceR)||this.match(j.eq)||this.match(j.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(j.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},te.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(j.string)||this.match(j.num)||this.match(j.bracketL)||this.match(j.name)||this.state.type.keyword)},te.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},te.parseObjectMethod=function(e,t,r,n){return r||t||this.match(j.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},te.parseObjectProperty=function(e,t,r,n,i){return this.eat(j.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(n?(this.checkReservedWord(e.key.name,e.key.start,!0,!0),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):this.match(j.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},te.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},te.parsePropertyName=function(e){if(this.eat(j.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(j.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},te.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},te.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(j.parenL),e.params=this.parseBindingList(j.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},te.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},te.isStrictBody=function(e,t){if(!t&&e.body.directives.length)for(var r=e.body.directives,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("use strict"===a.value.value)return!0}return!1},te.parseFunctionBody=function(e,t){var r=t&&!this.match(j.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var p=e.params,h=Array.isArray(p),f=0,p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if(f=p.next(),f.done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},te.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},te.parseExprListItem=function(e,t,r){return e&&this.match(j.comma)?null:this.match(j.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},te.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(j.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},te.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(g.strict(e)||n&&g.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},te.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(j.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},te.parseYield=function(){var e=this.startNode();return this.next(),this.match(j.semi)||this.canInsertSemicolon()||!this.match(j.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(j.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var re=z.prototype,ne=["leadingComments","trailingComments","innerComments"],ie=function(){function e(t,r,n){w(this,e),this.type="",this.start=t,this.end=0,this.loc=new q(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)ne.indexOf(r)<0&&(t[r]=this[r]);return t},e}();re.startNode=function(){return new ie(this.state.start,this.state.startLoc,this.filename)},re.startNodeAt=function(e,t){return new ie(e,t,this.filename)},re.finishNode=function(e,t){return p.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},re.finishNodeAt=function(e,t,r,n){return p.call(this,e,t,r,n)},z.prototype.raise=function(e,t){var r=l(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var se=z.prototype;se.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},se.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(n=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var a=h(t);t.length>0&&a.trailingComments&&a.trailingComments[0].start>=e.end&&(n=a.trailingComments,a.trailingComments=null)}for(;t.length>0&&h(t).start>=e.start;)r=t.pop();if(r){if(r.leadingComments)if(r!==e&&h(r.leadingComments).end<=e.start)e.leadingComments=r.leadingComments,r.leadingComments=null;else for(i=r.leadingComments.length-2;i>=0;--i)if(r.leadingComments[i].end<=e.start){e.leadingComments=r.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(h(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(s=0;s<this.state.leadingComments.length;s++)this.state.leadingComments[s].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(s,1),s--);this.state.leadingComments.length>0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;i<this.state.leadingComments.length&&!(this.state.leadingComments[i].end>e.start);i++);e.leadingComments=this.state.leadingComments.slice(0,i),0===e.leadingComments.length&&(e.leadingComments=null),n=this.state.leadingComments.slice(i),0===n.length&&(n=null)}this.state.commentPreviousNode=e,n&&(n.length&&n[0].start>=e.start&&h(n).end<=e.end?e.innerComments=n:e.trailingComments=n),t.push(e)}};var ae=z.prototype;ae.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ae.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ae.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var oe=function(e){e.extend("checkDeclaration",function(e){return function(t){f(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o<s;o++)a[o-3]=arguments[o];e.call.apply(e,[this,t,r,n].concat(a))}}}),e.extend("checkPropClash",function(){return function(e,t){if(!e.computed&&f(e)){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}}}),e.extend("isStrictBody",function(){return function(e,t){if(!t&&e.body.body.length>0)for(var r=e.body.body,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e.call.apply(e,[this,t].concat(i)),t.directives.reverse().forEach(function(e){t.body.unshift(r.directiveToStmt(e))}),delete t.directives}}),e.extend("parseClassMethod",function(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.call.apply(e,[this,t].concat(n));var s=t.body;s[s.length-1].type="MethodDefinition"}}),e.extend("parseExprAtom",function(e){return function(){switch(this.state.type){case j.regexp:return this.estreeParseRegExpLiteral(this.state.value);case j.num:case j.string:return this.estreeParseLiteral(this.state.value);case j._null:return this.estreeParseLiteral(null);case j._true:return this.estreeParseLiteral(!0);case j._false:return this.estreeParseLiteral(!1);default:for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.call.apply(e,[this].concat(r))}}}),e.extend("parseLiteral",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i.raw=i.extra.raw,delete i.extra,i}}),e.extend("parseMethod",function(e){return function(t){var r=this.startNode();r.kind=t.kind;for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r=e.call.apply(e,[this,r].concat(i)),delete r.kind,t.value=this.finishNode(r,"FunctionExpression"),t}}),e.extend("parseObjectMethod",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&("method"===i.kind&&(i.kind="init"),i.type="Property"),i}}),e.extend("parseObjectProperty",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&(i.kind="init",i.type="Property"),i}}),e.extend("toAssignable",function(e){return function(t,r){for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(f(t))return this.toAssignable.apply(this,[t.value,r].concat(i)),t;if("ObjectExpression"===t.type){t.type="ObjectPattern";for(var a=t.properties,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},ue=["any","mixed","empty","bool","boolean","number","string","void","null"],le=z.prototype;le.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||j.colon);var r=this.flowParseType();return this.state.inType=t,r},le.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(j.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(j.parenL)?(e.expression=this.parseExpression(),this.expect(j.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},le.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(j.colon);var t=null,r=null;return this.match(j.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(j.modulo)&&(r=this.flowParsePredicate())),[t,r]},le.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},le.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(j.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(j.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},le.flowParseDeclare=function(e){return this.match(j._class)?this.flowParseDeclareClass(e):this.match(j._function)?this.flowParseDeclareFunction(e):this.match(j._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===j.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):void this.unexpected()},le.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},le.flowParseDeclareModule=function(e){this.next(),this.match(j.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(j.braceL);!this.match(j.braceR);){var n=this.startNode();if(this.match(j._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(j.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},le.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(j.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},le.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},le.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},le.flowParseInterfaceish=function(e,t){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(j._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma))}e.body=this.flowParseObjectType(t)},le.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},le.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},le.flowParseRestrictedIdentifier=function(e){
-return ue.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},le.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(j.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},le.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(j.eq)&&(this.eat(j.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},le.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(j.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(j.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},le.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(j.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},le.flowParseObjectPropertyKey=function(){return this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0)},le.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(j.bracketL),this.lookahead().type===j.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(j.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},le.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(j.parenL);this.match(j.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(j.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},le.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},le.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},le.flowParseObjectType=function(e,t){var r=this.state.inType;this.state.inType=!0;var n=this.startNode(),i=void 0,s=void 0,a=!1;n.callProperties=[],n.properties=[],n.indexers=[];var o=void 0,u=void 0;for(t&&this.match(j.braceBarL)?(this.expect(j.braceBarL),o=j.braceBarR,u=!0):(this.expect(j.braceL),o=j.braceR,u=!1),n.exact=u;!this.match(o);){var l=!1,c=this.state.start,p=this.state.startLoc;i=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==j.colon&&(this.next(),a=!0);var h=this.state.start,f=this.flowParseVariance();this.match(j.bracketL)?n.indexers.push(this.flowParseObjectTypeIndexer(i,a,f)):this.match(j.parenL)||this.isRelational("<")?(f&&this.unexpected(h),n.callProperties.push(this.flowParseObjectTypeCallProperty(i,a))):(s=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(j.parenL)?(f&&this.unexpected(h),n.properties.push(this.flowParseObjectTypeMethod(c,p,a,s))):(this.eat(j.question)&&(l=!0),i.key=s,i.value=this.flowParseTypeInitialiser(),i.optional=l,i.static=a,i.variance=f,this.flowObjectTypeSemicolon(),n.properties.push(this.finishNode(i,"ObjectTypeProperty")))),a=!1}this.expect(o);var d=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=r,d},le.flowObjectTypeSemicolon=function(){this.eat(j.semi)||this.eat(j.comma)||this.match(j.braceR)||this.match(j.braceBarR)||this.unexpected()},le.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(j.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},le.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},le.flowParseTypeofType=function(){var e=this.startNode();return this.expect(j._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},le.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(j.bracketL);this.state.pos<this.input.length&&!this.match(j.bracketR)&&(e.types.push(this.flowParseType()),!this.match(j.bracketR));)this.expect(j.comma);return this.expect(j.bracketR),this.finishNode(e,"TupleTypeAnnotation")},le.flowParseFunctionTypeParam=function(){var e=null,t=!1,r=null,n=this.startNode(),i=this.lookahead();return i.type===j.colon||i.type===j.question?(e=this.parseIdentifier(),this.eat(j.question)&&(t=!0),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),n.name=e,n.optional=t,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")},le.reinterpretTypeAsFunctionTypeParam=function(e){var t=this.startNodeAt(e.start,e.loc);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")},le.flowParseFunctionTypeParams=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={params:e,rest:null};!this.match(j.parenR)&&!this.match(j.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),t},le.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},le.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case j.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case j.braceL:return this.flowParseObjectType(!1,!1);case j.braceBarL:return this.flowParseObjectType(!1,!0);case j.bracketL:return this.flowParseTupleType();case j.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(j.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case j.parenL:if(this.next(),!this.match(j.parenR)&&!this.match(j.ellipsis))if(this.match(j.name)){var o=this.lookahead().type;s=o!==j.question&&o!==j.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(j.comma)||this.match(j.parenR)&&this.lookahead().type===j.arrow))return this.expect(j.parenR),i;this.eat(j.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case j.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case j._true:case j._false:return r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case j.plusMin:if("-"===this.state.value)return this.next(),this.match(j.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case j.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case j._null:return r.value=this.match(j._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case j._this:return r.value=this.match(j._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case j.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},le.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(j.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(j.bracketL),this.expect(j.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},le.flowParsePrefixType=function(){var e=this.startNode();return this.eat(j.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},le.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(j.arrow)){var t=this.startNodeAt(e.start,e.loc);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},le.flowParseIntersectionType=function(){var e=this.startNode();this.eat(j.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(j.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},le.flowParseUnionType=function(){var e=this.startNode();this.eat(j.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(j.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},le.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},le.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(j.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},le.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},le.flowParseVariance=function(){var e=null;return this.match(j.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ce=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(j.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(j.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(j._class)||this.match(j.name)||this.match(j._function)||this.match(j._var))return this.flowParseDeclare(t)}else if(this.match(j.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(j.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(j.question)&&(t.optional=!0),this.match(j.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(j.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(j.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i<t.length;i++){var s=t[i];s&&"TypeCastExpression"===s.type&&(t[i]=this.typeCastToParameter(s))}return e.call(this,t,r,n)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(){for(var t=this.startNode(),r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=e.call.apply(e,[this].concat(n));return this.match(j.colon)?(t._exprListItem=!0,t.expression=s,t.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t,"TypeCastExpression")):s}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return delete t.variancePos,this.match(j.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(j.colon)||e.call(this)}}),e.extend("parseClassMethod",function(e){return function(t,r){r.variance&&this.unexpected(r.variancePos),delete r.variance,delete r.variancePos,this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterDeclaration());for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];e.call.apply(e,[this,t,r].concat(i))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var n=t.implements=[];do{var i=this.startNode();i.id=this.parseIdentifier(),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(j.comma))}}}),e.extend("parsePropertyName",function(e){return function(t){var r=this.state.start,n=this.flowParseVariance(),i=e.call(this,t);return t.variance=n,t.variancePos=r,i}}),e.extend("parseObjPropValue",function(e){return function(t){t.variance&&this.unexpected(t.variancePos),delete t.variance,delete t.variancePos;var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(j.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(j.question)&&(e.optional=!0),this.match(j.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseMaybeDefault",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.apply(this,r);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),i}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(j._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var n=this.lookahead();(n.type===j.name&&"from"!==n.value||n.type===j.braceL||n.type===j.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseImportSpecifier",function(){return function(e){var t=this.startNode(),r=this.state.start,n=this.parseIdentifier(!0),i=null;"type"===n.name?i="type":"typeof"===n.name&&(i="typeof");var s=!1;if(this.isContextual("as")){var a=this.parseIdentifier(!0);null===i||this.match(j.name)||this.state.type.keyword?(t.imported=n,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=a,t.importKind=i,t.local=a.__clone())}else null!==i&&(this.match(j.name)||this.state.type.keyword)?(t.imported=this.parseIdentifier(!0),t.importKind=i,this.eatContextual("as")?t.local=this.parseIdentifier():(s=!0,t.local=t.imported.__clone())):(s=!0,t.imported=n,t.importKind=null,t.local=t.imported.__clone());"type"!==e.importKind&&"typeof"!==e.importKind||"type"!==t.importKind&&"typeof"!==t.importKind||this.raise(r,"`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`"),s&&this.checkReservedWord(t.local.name,t.start,!0,!0),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(j.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){if(this.match(j.colon)){var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(j.colon)||e.call(this)}}),e.extend("parseMaybeAssign",function(e){return function(){for(var t=null,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];if(j.jsxTagStart&&this.match(j.jsxTagStart)){var s=this.state.clone();try{return e.apply(this,n)}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=s,t=e}}if(this.state.context.push(U.parenExpression),null!=t||this.isRelational("<")){var a=void 0,o=void 0;try{o=this.flowParseTypeParameterDeclaration(),a=e.apply(this,n),a.typeParameters=o,a.start=o.start,a.loc.start=o.loc.start}catch(e){throw t||e}if("ArrowFunctionExpression"===a.type)return a;if(null!=t)throw t;this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return this.state.context.pop(),e.apply(this,n)}}),e.extend("parseArrow",function(e){return function(t){if(this.match(j.colon)){var r=this.state.clone();try{var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var i=this.flowParseTypeAndPredicateAnnotation();this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(j.arrow)||this.unexpected(),t.returnType=i}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=r}}return e.call(this,t)}}),e.extend("shouldParseArrow",function(e){return function(){return this.match(j.colon)||e.call(this)}}),e.extend("isClassMutatorStarter",function(e){return function(){return!!this.isRelational("<")||e.call(this)}})},pe=String.fromCodePoint;if(!pe){var he=String.fromCharCode,fe=Math.floor;pe=function(){var e=[],t=void 0,r=void 0,n=-1,i=arguments.length;if(!i)return"";for(var s="";++n<i;){var a=Number(arguments[n]);if(!isFinite(a)||a<0||a>1114111||fe(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(a-=65536,t=55296+(a>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=he.apply(null,e),e.length=0)}return s}}var de=pe,me={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ye=/^[\da-fA-F]+$/,ge=/^\d+$/;U.j_oTag=new R("<tag",!1),U.j_cTag=new R("</tag",!1),U.j_expr=new R("<tag>...</tag>",!0,!0),j.jsxName=new P("jsxName"),j.jsxText=new P("jsxText",{beforeExpr:!0}),j.jsxTagStart=new P("jsxTagStart",{startsExpr:!0}),j.jsxTagEnd=new P("jsxTagEnd"),j.jsxTagStart.updateContext=function(){this.state.context.push(U.j_expr),this.state.context.push(U.j_oTag),this.state.exprAllowed=!1},j.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===U.j_oTag&&e===j.slash||t===U.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===U.j_expr):this.state.exprAllowed=!0};var be=z.prototype;be.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:u(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},be.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},be.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):u(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},be.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&t++<10;){if(";"===(n=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),ye.test(e)&&(r=de(parseInt(e,16)))):(e=e.substr(1),ge.test(e)&&(r=de(parseInt(e,10)))):r=me[e];break}e+=n}return r||(this.state.pos=i,"&")},be.jsxReadWord=function(){var e=void 0,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(a(e)||45===e);return this.finishToken(j.jsxName,this.input.slice(t,this.state.pos))},be.jsxParseIdentifier=function(){var e=this.startNode();return this.match(j.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},be.jsxParseNamespacedName=function(){var e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(j.colon))return r;var n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")},be.jsxParseElementName=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.jsxParseNamespacedName();this.eat(j.dot);){var n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,"JSXMemberExpression")}return r},be.jsxParseAttributeValue=function(){var e=void 0;switch(this.state.type){case j.braceL:if(e=this.jsxParseExpressionContainer(),"JSXEmptyExpression"!==e.expression.type)return e;this.raise(e.start,"JSX attributes must only be assigned a non-empty expression");case j.jsxTagStart:case j.string:return e=this.parseExprAtom(),e.extra=null,e;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},be.jsxParseEmptyExpression=function(){var e=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.start,this.state.startLoc)},be.jsxParseSpreadChild=function(){var e=this.startNode();return this.expect(j.braceL),this.expect(j.ellipsis),e.expression=this.parseExpression(),this.expect(j.braceR),this.finishNode(e,"JSXSpreadChild")},be.jsxParseExpressionContainer=function(){var e=this.startNode();return this.next(),this.match(j.braceR)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.expect(j.braceR),this.finishNode(e,"JSXExpressionContainer")},be.jsxParseAttribute=function(){var e=this.startNode();return this.eat(j.braceL)?(this.expect(j.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(j.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(j.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},be.jsxParseOpeningElementAt=function(e,t){var r=this.startNodeAt(e,t);for(r.attributes=[],r.name=this.jsxParseElementName();!this.match(j.slash)&&!this.match(j.jsxTagEnd);)r.attributes.push(this.jsxParseAttribute());return r.selfClosing=this.eat(j.slash),this.expect(j.jsxTagEnd),this.finishNode(r,"JSXOpeningElement")},be.jsxParseClosingElementAt=function(e,t){var r=this.startNodeAt(e,t);return r.name=this.jsxParseElementName(),this.expect(j.jsxTagEnd),this.finishNode(r,"JSXClosingElement")},be.jsxParseElementAt=function(e,t){var r=this.startNodeAt(e,t),n=[],i=this.jsxParseOpeningElementAt(e,t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case j.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(j.slash)){s=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case j.jsxText:n.push(this.parseExprAtom());break;case j.braceL:this.lookahead().type===j.ellipsis?n.push(this.jsxParseSpreadChild()):n.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}d(s.name)!==d(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+d(i.name)+">")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(j.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},be.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};var ve=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(j.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(j.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===U.j_expr)return this.jsxReadToken();if(r===U.j_oTag||r===U.j_cTag){if(s(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(j.jsxTagEnd);if((34===t||39===t)&&r===U.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(j.braceL)){var r=this.curContext();r===U.j_oTag?this.state.context.push(U.braceExpression):r===U.j_expr?this.state.context.push(U.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(j.slash)||t!==j.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(U.j_cTag),this.state.exprAllowed=!1}}})};W.estree=oe,W.flow=ce,W.jsx=ve,r.parse=m,r.parseExpression=y,r.tokTypes=j},{}],178:[function(e,t,r){function n(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var n=s(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function i(e,t){var r=t.match(e);return r?r[0]:null}function s(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),
-u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:(i=n.pop(),i<s&&(s=i,a=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],179:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function s(e){var t,r,i,s,a,o,u=e.length;a=n(e),o=new p(3*u/4-a),i=a>0?u-4:u;var l=0;for(t=0,r=0;t<i;t+=4,r+=3)s=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],o[l++]=s>>16&255,o[l++]=s>>8&255,o[l++]=255&s;return 2===a?(s=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&s):1===a&&(s=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=s>>8&255,o[l++]=255&s),o}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function o(e,t,r){for(var n,i=[],s=t;s<r;s+=3)n=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(a(n));return i.join("")}function u(e){for(var t,r=e.length,n=r%3,i="",s=[],a=0,u=r-n;a<u;a+=16383)s.push(o(e,a,a+16383>u?u:a+16383));return 1===n?(t=e[r-1],i+=l[t>>2],i+=l[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=l[t>>10],i+=l[t>>4&63],i+=l[t<<2&63],i+="="),s.push(i),s.join("")}r.byteLength=i,r.toByteArray=s,r.fromByteArray=u;for(var l=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f<d;++f)l[f]=h[f],c[h.charCodeAt(f)]=f;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],180:[function(e,t,r){function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function i(e){return e.split("\\\\").join(m).split("\\{").join(y).split("\\}").join(g).split("\\,").join(b).split("\\.").join(v)}function s(e){return e.split(m).join("\\").split(y).join("{").split(g).join("}").split(b).join(",").split(v).join(".")}function a(e){if(!e)return[""];var t=[],r=d("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,s=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var u=a(s);return s.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),t.push.apply(t,o),t}function o(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),h(i(e),!0).map(s)):[]}function u(e){return"{"+e+"}"}function l(e){return/^-?0\d/.test(e)}function c(e,t){return e<=t}function p(e,t){return e>=t}function h(e,t){var r=[],i=d("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=s||o,y=/^(.*,)+(.+)?$/.test(i.body);if(!m&&!y)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+g+i.post,h(e)):[e];var b;if(m)b=i.body.split(/\.\./);else if(b=a(i.body),1===b.length&&(b=h(b[0],!1).map(u),1===b.length)){var v=i.post.length?h(i.post,!1):[""];return v.map(function(e){return i.pre+b[0]+e})}var x,E=i.pre,v=i.post.length?h(i.post,!1):[""];if(m){var A=n(b[0]),D=n(b[1]),C=Math.max(b[0].length,b[1].length),S=3==b.length?Math.abs(n(b[2])):1,_=c;D<A&&(S*=-1,_=p);var w=b.some(l);x=[];for(var k=A;_(k,D);k+=S){var F;if(o)"\\"===(F=String.fromCharCode(k))&&(F="");else if(F=String(k),w){var T=C-F.length;if(T>0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}x.push(F)}}else x=f(b,function(e){return h(e,!1)});for(var B=0;B<x.length;B++)for(var O=0;O<v.length;O++){var j=E+x[B]+v[O];(!t||m||j)&&r.push(j)}return r}var f=e("concat-map"),d=e("balanced-match");t.exports=o;var m="\0SLASH"+Math.random()+"\0",y="\0OPEN"+Math.random()+"\0",g="\0CLOSE"+Math.random()+"\0",b="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0"},{"balanced-match":178,"concat-map":186}],181:[function(e,t,r){},{}],182:[function(e,t,r){arguments[4][181][0].apply(r,arguments)},{dup:181}],183:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,s=n.SlowBuffer,a=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");var n=r,s=t;void 0===s&&(n=void 0,s=0);var o=new i(e);if("string"==typeof s)for(var u=new i(s,n),l=u.length,c=-1;++c<e;)o[c]=u[c%l];else o.fill(s);return o},r.allocUnsafe=function(e){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var s=r;if(1===arguments.length)return new i(e);void 0===s&&(s=0);var a=n;if(void 0===a&&(a=e.byteLength-s),s>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-s)throw new RangeError("'length' is out of bounds");return new i(e.slice(s,s+a))}if(i.isBuffer(e)){var o=new i(e.length);return e.copy(o,0,0,e.length),o}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new s(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:184}],184:[function(e,t,r){"use strict";function n(e){if(e>Y)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,r):"string"==typeof e?l(e,t):h(e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function o(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function u(e){return a(e),n(e<0?0:0|f(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(e,t),s=n(r),a=s.write(e,t);return a!==r&&(s=s.slice(0,a)),s}function c(e){for(var t=e.length<0?0:0|f(e.length),r=n(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),n.__proto__=i.prototype,n}function h(e){if(i.isBuffer(e)){var t=0|f(e.length),r=n(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||W(e.length)?n(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(e){if(e>=Y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Y.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function m(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return _(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;l<o;l++)if(s(e,l)===s(t,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===u)return c*a}else-1!==c&&(l-=l-c),c=-1}else for(r+u>o&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;h<u;h++)if(s(e,l+h)!==s(t,h)){p=!1;break}if(p)return l}return-1}function x(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(W(o))return a;e[r+a]=o}return a}function E(e,t,r,n){return J(V(t,e.length-r),e,r,n)}function A(e,t,r,n){return J(q(t),e,r,n)}function D(e,t,r,n){return A(e,t,r,n)}function C(e,t,r,n){return J(X(t),e,r,n)}function S(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function _(e,t,r){return 0===t&&r===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,r))}function w(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s=e[i],a=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:u=e[i+1],128==(192&u)&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return k(n)}function k(e){var t=e.length;if(t<=H)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=H));return r}function F(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=U(e[s]);return i}function B(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),z.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),z.write(e,t,r,n,52,8),r+8}function M(e){if(e=R(e).replace($,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function R(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function q(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function G(e,t){for(var r,n,i,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function X(e){return K.toByteArray(M(e))}function J(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return e!==e}var K=e("base64-js"),z=e("ieee754");r.Buffer=i,r.SlowBuffer=d,r.INSPECT_MAX_BYTES=50;var Y=2147483647;r.kMaxLength=Y,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return o(e,t,r)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s<a;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=i.allocUnsafe(t),s=0;for(r=0;r<e.length;++r){var a=e[r];if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,s),s+=a.length}return n},i.byteLength=m,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):y.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p<u;++p)if(l[p]!==c[p]){a=l[p],o=c[p];break}return a<o?-1:o<a?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return D(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=i.prototype,n},i.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},i.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},i.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;i>=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=i.isBuffer(e)?e:new i(e,n),u=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%u]}return this};var $=/[^+\/0-9A-Za-z-_]/g},{"base64-js":179,ieee754:305}],185:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:c}function i(e){var t=function(){return s.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=d,t}function s(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||!r)return r;var i=this._styles,s=i.length,a=o.dim.open;for(!h||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(o.dim.open="");s--;){var u=o[i[s]];r=u.open+r.replace(u.closeRe,u.open)+u.close}return o.dim.open=a,r}var a=e("escape-string-regexp"),o=e("ansi-styles"),u=e("strip-ansi"),l=e("has-ansi"),c=e("supports-color"),p=Object.defineProperties,h="win32"===r.platform&&!/^xterm/i.test(r.env.TERM);h&&(o.blue.open="");var f=function(){var e={};return Object.keys(o).forEach(function(t){o[t].closeRe=new RegExp(a(o[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),d=p(function(){},f);p(n.prototype,function(){var e={};return Object.keys(f).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}()),t.exports=new n,t.exports.styles=o,t.exports.hasColor=l,t.exports.stripColor=u,t.exports.supportsColor=c}).call(this,e("_process"))},{_process:539,"ansi-styles":2,"escape-string-regexp":300,"has-ansi":304,"strip-ansi":592,"supports-color":593}],186:[function(e,t,r){t.exports=function(e,t){for(var r=[],i=0;i<e.length;i++){var s=t(e[i],i);n(s)?r.push.apply(r,s):r.push(s)}return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],187:[function(e,t,r){(function(t){"use strict";function n(e){return new t(e,"base64").toString()}function i(e){return e.split(",").pop()}function s(e,t){var r=p.exec(e);p.lastIndex=0;var n=r[1]||r[2],i=l.join(t,n);try{return u.readFileSync(i,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+i+"\n"+e)}}function a(e,t){t=t||{},t.isFileComment&&(e=s(e,t.commentFileDir)),t.hasComment&&(e=i(e)),t.isEncoded&&(e=n(e)),(t.isJSON||t.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}function o(e){for(var t,n=e.split("\n"),i=n.length-1;i>0;i--)if(t=n[i],~t.indexOf("sourceMappingURL=data:"))return r.fromComment(t)}var u=e("fs"),l=e("path"),c=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,p=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},a.prototype.toComment=function(e){var t=this.toBase64(),r="sourceMappingURL=data:application/json;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new a(e)},r.fromJSON=function(e){return new a(e,{isJSON:!0})},r.fromBase64=function(e){return new a(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e,t){if(t){var n=o(e);return n||null}var i=e.match(c);return c.lastIndex=0,i?r.fromComment(i.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(p);return p.lastIndex=0,n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return c.lastIndex=0,e.replace(c,"")},r.removeMapFileComments=function(e){return p.lastIndex=0,e.replace(p,"")},Object.defineProperty(r,"commentRegex",{get:function(){return c.lastIndex=0,c}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return p.lastIndex=0,p}})}).call(this,e("buffer").Buffer)},{buffer:184,fs:182,path:535}],188:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":277,"../modules/es6.string.iterator":286,"../modules/web.dom.iterable":293}],189:[function(e,t,r){var n=e("../../modules/_core"),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":217}],190:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),t.exports=e("../modules/_core").Map},{"../modules/_core":217,"../modules/es6.map":279,"../modules/es6.object.to-string":285,"../modules/es6.string.iterator":286,"../modules/es7.map.to-json":290,"../modules/web.dom.iterable":293}],191:[function(e,t,r){e("../../modules/es6.number.max-safe-integer"),t.exports=9007199254740991},{"../../modules/es6.number.max-safe-integer":280}],192:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":217,"../../modules/es6.object.assign":281}],193:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":217,"../../modules/es6.object.create":282}],194:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Object.getOwnPropertySymbols},{"../../modules/_core":217,"../../modules/es6.symbol":287}],195:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":217,"../../modules/es6.object.keys":283}],196:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":217,"../../modules/es6.object.set-prototype-of":284}],197:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Symbol.for},{"../../modules/_core":217,"../../modules/es6.symbol":287}],198:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":217,"../../modules/es6.object.to-string":285,"../../modules/es6.symbol":287,"../../modules/es7.symbol.async-iterator":291,"../../modules/es7.symbol.observable":292}],199:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":274,"../../modules/es6.string.iterator":286,"../../modules/web.dom.iterable":293}],200:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":217,"../modules/es6.object.to-string":285,"../modules/es6.weak-map":288,"../modules/web.dom.iterable":293}],201:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-set"),
-t.exports=e("../modules/_core").WeakSet},{"../modules/_core":217,"../modules/es6.object.to-string":285,"../modules/es6.weak-set":289,"../modules/web.dom.iterable":293}],202:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],203:[function(e,t,r){t.exports=function(){}},{}],204:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],205:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":235}],206:[function(e,t,r){var n=e("./_for-of");t.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},{"./_for-of":226}],207:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_to-length"),s=e("./_to-index");t.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-index":266,"./_to-iobject":268,"./_to-length":269}],208:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":210,"./_ctx":218,"./_iobject":232,"./_to-length":269,"./_to-object":270}],209:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":234,"./_is-object":235,"./_wks":275}],210:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":209}],211:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),i))?r:s?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},{"./_cof":212,"./_wks":275}],212:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],213:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_defined"),l=e("./_for-of"),c=e("./_iter-define"),p=e("./_iter-step"),h=e("./_set-species"),f=e("./_descriptors"),d=e("./_meta").fastKey,m=f?"_s":"size",y=function(e,t){var r,n=d(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,c){var p=e(function(e,n){o(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&l(n,r,e[c],e)});return s(p.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,r=y(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[m]--}return!!r},forEach:function(e){o(this,p,"forEach");for(var t,r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),f&&n(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=d(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?p(0,r.k):"values"==t?p(0,r.v):p(0,[r.k,r.v]):(e._t=void 0,p(1))},r?"entries":"values",!r,!0),h(t)}}},{"./_an-instance":204,"./_ctx":218,"./_defined":219,"./_descriptors":220,"./_for-of":226,"./_iter-define":238,"./_iter-step":239,"./_meta":243,"./_object-create":245,"./_object-dp":246,"./_redefine-all":258,"./_set-species":261}],214:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":206,"./_classof":211}],215:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=l(5),h=l(6),f=0,d=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},y=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var r=y(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._i=f++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).delete(e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?d(e).set(t,r):n[e._i]=r,e},ufstore:d}},{"./_an-instance":204,"./_an-object":205,"./_array-methods":208,"./_for-of":226,"./_has":228,"./_is-object":235,"./_meta":243,"./_redefine-all":258}],216:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in A&&f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":204,"./_array-methods":208,"./_descriptors":220,"./_export":224,"./_fails":225,"./_for-of":226,"./_global":227,"./_hide":229,"./_is-object":235,"./_meta":243,"./_object-dp":246,"./_redefine-all":258,"./_set-to-string-tag":262}],217:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],218:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":202}],219:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],220:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":225}],221:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":227,"./_is-object":235}],222:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],223:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":251,"./_object-keys":254,"./_object-pie":255}],224:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o=function(e,t,r){var u,l,c,p=e&o.F,h=e&o.G,f=e&o.S,d=e&o.P,m=e&o.B,y=e&o.W,g=h?i:i[t]||(i[t]={}),b=g.prototype,v=h?n:f?n[t]:(n[t]||{}).prototype;h&&(r=t);for(u in r)(l=!p&&v&&void 0!==v[u])&&u in g||(c=l?v[u]:r[u],g[u]=h&&"function"!=typeof v[u]?r[u]:m&&l?s(c,n):y&&v[u]==c?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):d&&"function"==typeof c?s(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[u]=c,e&o.R&&b&&!b[u]&&a(b,u,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,t.exports=o},{"./_core":217,"./_ctx":218,"./_global":227,"./_hide":229}],225:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],226:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={},r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y};r.BREAK=l,r.RETURN=c},{"./_an-object":205,"./_ctx":218,"./_is-array-iter":233,"./_iter-call":236,"./_to-length":269,"./core.get-iterator-method":276}],227:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],228:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],229:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":220,"./_object-dp":246,"./_property-desc":257}],230:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":227}],231:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":220,"./_dom-create":221,"./_fails":225}],232:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":212}],233:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":240,"./_wks":275}],234:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":212}],235:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],236:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":205}],237:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":229,"./_object-create":245,"./_property-desc":257,"./_set-to-string-tag":262,"./_wks":275}],238:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",C="values"==y,S=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=w||A(y),F=y?C?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),C&&w&&"values"!==w.name&&(S=!0,k=function(){return w.call(this)}),n&&!b||!f&&!S&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:C?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||S),t,v);return v}},{"./_export":224,"./_has":228,"./_hide":229,"./_iter-create":237,"./_iterators":240,"./_library":242,"./_object-gpo":252,"./_redefine":259,"./_set-to-string-tag":262,"./_wks":275}],239:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],240:[function(e,t,r){t.exports={}},{}],241:[function(e,t,r){var n=e("./_object-keys"),i=e("./_to-iobject");t.exports=function(e,t){for(var r,s=i(e),a=n(s),o=a.length,u=0;o>u;)if(s[r=a[u++]]===t)return r}},{"./_object-keys":254,"./_to-iobject":268}],242:[function(e,t,r){t.exports=!0},{}],243:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},h=function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},f=function(e){return l&&d.NEED&&u(e)&&!s(e,n)&&c(e),e},d=t.exports={KEY:n,NEED:!1,fastKey:p,getWeak:h,onFreeze:f}},{"./_fails":225,"./_has":228,"./_is-object":235,"./_object-dp":246,"./_uid":272}],244:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":225,"./_iobject":232,"./_object-gops":251,"./_object-keys":254,"./_object-pie":255,"./_to-object":270}],245:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",t=r.contentWindow.document,t.open(),t.write("<script>document.F=Object</script>"),t.close(),u=t.F;n--;)delete u.prototype[s[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(o.prototype=n(e),r=new o,o.prototype=null,r[a]=e):r=u(),void 0===t?r:i(r,t)}},{"./_an-object":205,"./_dom-create":221,"./_enum-bug-keys":222,"./_html":230,"./_object-dps":247,"./_shared-key":263}],246:[function(e,t,r){var n=e("./_an-object"),i=e("./_ie8-dom-define"),s=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=s(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":205,"./_descriptors":220,"./_ie8-dom-define":231,"./_to-primitive":271}],247:[function(e,t,r){var n=e("./_object-dp"),i=e("./_an-object"),s=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var r,a=s(t),o=a.length,u=0;o>u;)n.f(e,r=a[u++],t[r]);return e}},{"./_an-object":205,"./_descriptors":220,"./_object-dp":246,"./_object-keys":254}],248:[function(e,t,r){var n=e("./_object-pie"),i=e("./_property-desc"),s=e("./_to-iobject"),a=e("./_to-primitive"),o=e("./_has"),u=e("./_ie8-dom-define"),l=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(o(e,t))return i(!n.f.call(e,t),e[t])}},{"./_descriptors":220,"./_has":228,"./_ie8-dom-define":231,"./_object-pie":255,"./_property-desc":257,"./_to-iobject":268,"./_to-primitive":271}],249:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_object-gopn").f,s={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return i(e)}catch(e){return a.slice()}};t.exports.f=function(e){return a&&"[object Window]"==s.call(e)?o(e):i(n(e))}},{"./_object-gopn":250,"./_to-iobject":268}],250:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},{"./_enum-bug-keys":222,"./_object-keys-internal":253}],251:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],252:[function(e,t,r){var n=e("./_has"),i=e("./_to-object"),s=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":228,"./_shared-key":263,"./_to-object":270}],253:[function(e,t,r){var n=e("./_has"),i=e("./_to-iobject"),s=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,o=i(e),u=0,l=[];for(r in o)r!=a&&n(o,r)&&l.push(r);for(;t.length>u;)n(o,r=t[u++])&&(~s(l,r)||l.push(r));return l}},{"./_array-includes":207,"./_has":228,"./_shared-key":263,"./_to-iobject":268}],254:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,i)}},{"./_enum-bug-keys":222,"./_object-keys-internal":253}],255:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],256:[function(e,t,r){var n=e("./_export"),i=e("./_core"),s=e("./_fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*s(function(){r(1)}),"Object",a)}},{"./_core":217,"./_export":224,"./_fails":225}],257:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],258:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},{"./_hide":229}],259:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":229}],260:[function(e,t,r){var n=e("./_is-object"),i=e("./_an-object"),s=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function(e,t){return s(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:s}},{"./_an-object":205,"./_ctx":218,"./_is-object":235,"./_object-gopd":248}],261:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_core"),s=e("./_object-dp"),a=e("./_descriptors"),o=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:n[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},{"./_core":217,"./_descriptors":220,"./_global":227,"./_object-dp":246,"./_wks":275}],262:[function(e,t,r){var n=e("./_object-dp").f,i=e("./_has"),s=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},{"./_has":228,"./_object-dp":246,"./_wks":275}],263:[function(e,t,r){var n=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return n[e]||(n[e]=i(e))}},{"./_shared":264,"./_uid":272}],264:[function(e,t,r){var n=e("./_global"),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":227}],265:[function(e,t,r){var n=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,r){var s,a,o=String(i(t)),u=n(r),l=o.length;return u<0||u>=l?e?"":void 0:(s=o.charCodeAt(u),s<55296||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?e?o.charAt(u):s:e?o.slice(u,u+2):a-56320+(s-55296<<10)+65536)}}},{"./_defined":219,"./_to-integer":267}],266:[function(e,t,r){var n=e("./_to-integer"),i=Math.max,s=Math.min;t.exports=function(e,t){return e=n(e),e<0?i(e+t,0):s(e,t)}},{"./_to-integer":267}],267:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],268:[function(e,t,r){var n=e("./_iobject"),i=e("./_defined");t.exports=function(e){return n(i(e))}},{"./_defined":219,"./_iobject":232}],269:[function(e,t,r){var n=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"./_to-integer":267}],270:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":219}],271:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":235}],272:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],273:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_library"),a=e("./_wks-ext"),o=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},{"./_core":217,"./_global":227,"./_library":242,"./_object-dp":246,"./_wks-ext":274}],274:[function(e,t,r){r.f=e("./_wks")},{"./_wks":275}],275:[function(e,t,r){var n=e("./_shared")("wks"),i=e("./_uid"),s=e("./_global").Symbol,a="function"==typeof s;(t.exports=function(e){return n[e]||(n[e]=a&&s[e]||(a?s:i)("Symbol."+e))}).store=n},{"./_global":227,"./_shared":264,"./_uid":272}],276:[function(e,t,r){var n=e("./_classof"),i=e("./_wks")("iterator"),s=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||s[n(e)]}},{"./_classof":211,"./_core":217,"./_iterators":240,"./_wks":275}],277:[function(e,t,r){var n=e("./_an-object"),i=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":205,"./_core":217,"./core.get-iterator-method":276}],278:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),i=e("./_iter-step"),s=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":203,"./_iter-define":238,"./_iter-step":239,"./_iterators":240,"./_to-iobject":268}],279:[function(e,t,r){"use strict";var n=e("./_collection-strong");t.exports=e("./_collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},{"./_collection":216,"./_collection-strong":213}],280:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":224}],281:[function(e,t,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":224,"./_object-assign":244}],282:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":224,"./_object-create":245}],283:[function(e,t,r){var n=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return i(n(e))}})},{"./_object-keys":254,"./_object-sap":256,"./_to-object":270}],284:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":224,"./_set-proto":260}],285:[function(e,t,r){arguments[4][181][0].apply(r,arguments)},{dup:181}],286:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":238,"./_string-at":265}],287:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_has"),s=e("./_descriptors"),a=e("./_export"),o=e("./_redefine"),u=e("./_meta").KEY,l=e("./_fails"),c=e("./_shared"),p=e("./_set-to-string-tag"),h=e("./_uid"),f=e("./_wks"),d=e("./_wks-ext"),m=e("./_wks-define"),y=e("./_keyof"),g=e("./_enum-keys"),b=e("./_is-array"),v=e("./_an-object"),x=e("./_to-iobject"),E=e("./_to-primitive"),A=e("./_property-desc"),D=e("./_object-create"),C=e("./_object-gopn-ext"),S=e("./_object-gopd"),_=e("./_object-dp"),w=e("./_object-keys"),k=S.f,F=_.f,T=C.f,P=n.Symbol,B=n.JSON,O=B&&B.stringify,j=f("_hidden"),N=f("toPrimitive"),I={}.propertyIsEnumerable,L=c("symbol-registry"),M=c("symbols"),R=c("op-symbols"),U=Object.prototype,V="function"==typeof P,q=n.QObject,G=!q||!q.prototype||!q.prototype.findChild,X=s&&l(function(){return 7!=D(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=k(U,t);n&&delete U[t],F(e,t,r),n&&e!==U&&F(U,t,n)}:F,J=function(e){var t=M[e]=D(P.prototype);return t._k=e,t},W=V&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},K=function(e,t,r){return e===U&&K(R,t,r),v(e),t=E(t,!0),v(r),i(M,t)?(r.enumerable?(i(e,j)&&e[j][t]&&(e[j][t]=!1),r=D(r,{enumerable:A(0,!1)})):(i(e,j)||F(e,j,A(1,{})),e[j][t]=!0),X(e,t,r)):F(e,t,r)},z=function(e,t){v(e);for(var r,n=g(t=x(t)),i=0,s=n.length;s>i;)K(e,r=n[i++],t[r]);return e},Y=function(e,t){return void 0===t?D(e):z(D(e),t)},H=function(e){var t=I.call(this,e=E(e,!0));return!(this===U&&i(M,e)&&!i(R,e))&&(!(t||!i(this,e)||!i(M,e)||i(this,j)&&this[j][e])||t)},$=function(e,t){if(e=x(e),t=E(t,!0),e!==U||!i(M,t)||i(R,t)){var r=k(e,t);return!r||!i(M,t)||i(e,j)&&e[j][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=T(x(e)),n=[],s=0;r.length>s;)i(M,t=r[s++])||t==j||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===U,n=T(r?R:x(e)),s=[],a=0;n.length>a;)!i(M,t=n[a++])||r&&!i(U,t)||s.push(M[t]);return s};V||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(r){this===U&&t.call(R,r),i(this,j)&&i(this[j],e)&&(this[j][e]=!1),X(this,e,A(1,r))};return s&&G&&X(U,e,{configurable:!0,set:t}),J(e)},o(P.prototype,"toString",function(){return this._k}),S.f=$,_.f=K,e("./_object-gopn").f=C.f=Q,e("./_object-pie").f=H,e("./_object-gops").f=Z,s&&!e("./_library")&&o(U,"propertyIsEnumerable",H,!0),d.f=function(e){return J(f(e))}),a(a.G+a.W+a.F*!V,{Symbol:P});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)f(ee[te++]);for(var ee=w(f.store),te=0;ee.length>te;)m(ee[te++]);a(a.S+a.F*!V,"Symbol",{for:function(e){return i(L,e+="")?L[e]:L[e]=P(e)},keyFor:function(e){if(W(e))return y(L,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!V,"Object",{create:Y,defineProperty:K,defineProperties:z,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),B&&a(a.S+a.F*(!V||l(function(){var e=P();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!W(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return t=n[1],"function"==typeof t&&(r=t),!r&&b(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!W(t))return t}),n[1]=t,O.apply(B,n)}}}),P.prototype[N]||e("./_hide")(P.prototype,N,P.prototype.valueOf),p(P,"Symbol"),p(Math,"Math",!0),p(n.JSON,"JSON",!0)},{"./_an-object":205,"./_descriptors":220,"./_enum-keys":223,"./_export":224,"./_fails":225,"./_global":227,"./_has":228,"./_hide":229,"./_is-array":234,"./_keyof":241,"./_library":242,"./_meta":243,"./_object-create":245,"./_object-dp":246,"./_object-gopd":248,"./_object-gopn":250,"./_object-gopn-ext":249,"./_object-gops":251,"./_object-keys":254,"./_object-pie":255,"./_property-desc":257,"./_redefine":259,"./_set-to-string-tag":262,"./_shared":264,"./_to-iobject":268,"./_to-primitive":271,"./_uid":272,"./_wks":275,"./_wks-define":273,"./_wks-ext":274}],288:[function(e,t,r){"use strict";var n,i=e("./_array-methods")(0),s=e("./_redefine"),a=e("./_meta"),o=e("./_object-assign"),u=e("./_collection-weak"),l=e("./_is-object"),c=a.getWeak,p=Object.isExtensible,h=u.ufstore,f={},d=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(l(e)){var t=c(e);return!0===t?h(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},y=t.exports=e("./_collection")("WeakMap",d,m,u,!0,!0);7!=(new y).set((Object.freeze||Object)(f),7).get(f)&&(n=u.getConstructor(d),o(n.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=y.prototype,r=t[e];s(t,e,function(t,i){if(l(t)&&!p(t)){this._f||(this._f=new n);var s=this._f[e](t,i);return"set"==e?this:s}return r.call(this,t,i)})}))},{"./_array-methods":208,"./_collection":216,"./_collection-weak":215,"./_is-object":235,"./_meta":243,"./_object-assign":244,"./_redefine":259}],289:[function(e,t,r){"use strict";var n=e("./_collection-weak");e("./_collection")("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},{"./_collection":216,"./_collection-weak":215}],290:[function(e,t,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":214,"./_export":224}],291:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":273}],292:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":273}],293:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),i=e("./_hide"),s=e("./_iterators"),a=e("./_wks")("toStringTag"),o=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var l=o[u],c=n[l],p=c&&c.prototype;p&&!p[a]&&i(p,a,l),s[l]=s.Array}},{"./_global":227,"./_hide":229,"./_iterators":240,"./_wks":275,"./es6.array.iterator":278}],294:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function n(e){return"boolean"==typeof e}function i(e){return null===e}function s(e){return null==e}function a(e){return"number"==typeof e}function o(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function l(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function p(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===y(e)}function f(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function y(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=s,r.isNumber=a,r.isString=o,r.isSymbol=u,r.isUndefined=l,r.isRegExp=c,r.isObject=p,r.isDate=h,r.isError=f,r.isFunction=d,r.isPrimitive=m,
-r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":308}],295:[function(e,t,r){t.exports=e("./src/node")},{"./src/node":298}],296:[function(e,t,r){(function(n){function i(){return!("undefined"==typeof window||!window||void 0===window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))}),e.splice(s,0,n)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function u(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}r=t.exports=e("./debug"),r.log=a,r.formatArgs=s,r.save=o,r.load=u,r.useColors=i,r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(u())}).call(this,e("_process"))},{"./debug":297,_process:539}],297:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function i(e){function t(){if(t.enabled){var e=t,n=+new Date,i=n-(l||n);e.diff=i,e.prev=l,e.curr=n,l=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var o=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;o++;var i=r.formatters[n];if("function"==typeof i){var a=s[o];t=i.call(e,a),s.splice(o,1),o--}return t}),r.formatArgs.call(e,s);(t.log||r.log||console.log.bind(console)).apply(e,s)}}return t.namespace=e,t.enabled=r.enabled(e),t.useColors=r.useColors(),t.color=n(e),"function"==typeof r.init&&r.init(t),t}function s(e){r.save(e),r.names=[],r.skips=[];for(var t=(e||"").split(/[\s,]+/),n=t.length,i=0;i<n;i++)t[i]&&(e=t[i].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function a(){r.enable("")}function o(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=i.debug=i.default=i,r.coerce=u,r.disable=a,r.enable=s,r.enabled=o,r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={};var l},{ms:532}],298:[function(e,t,r){(function(n){function i(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):c.isatty(h)}function s(e){var t=this.namespace;if(this.useColors){var n=this.color,i=" [3"+n+";1m"+t+" ";e[0]=i+e[0].split("\n").join("\n"+i),e.push("[3"+n+"m+"+r.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+t+" "+e[0]}function a(){return f.write(p.format.apply(p,arguments)+"\n")}function o(e){null==e?delete n.env.DEBUG:n.env.DEBUG=e}function u(){return n.env.DEBUG}function l(e){e.inspectOpts=p._extend({},r.inspectOpts)}var c=e("tty"),p=e("util");r=t.exports=e("./debug"),r.init=l,r.log=a,r.formatArgs=s,r.save=o,r.load=u,r.useColors=i,r.colors=[6,2,3,4,5,1],r.inspectOpts=Object.keys(n.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),i=n.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[r]=i,e},{});var h=parseInt(n.env.DEBUG_FD,10)||2;1!==h&&2!==h&&p.deprecate(function(){},"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var f=1===h?n.stdout:2===h?n.stderr:function(t){var r;switch(n.binding("tty_wrap").guessHandleType(t)){case"TTY":r=new c.WriteStream(t),r._type="tty",r._handle&&r._handle.unref&&r._handle.unref();break;case"FILE":r=new(e("fs").SyncWriteStream)(t,{autoClose:!1}),r._type="fs";break;case"PIPE":case"TCP":r=new(e("net").Socket)({fd:t,readable:!1,writable:!0}),r.readable=!1,r.read=null,r._type="pipe",r._handle&&r._handle.unref&&r._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return r.fd=t,r._isStdio=!0,r}(h);r.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,p.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},r.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,p.inspect(e,this.inspectOpts)},r.enable(u())}).call(this,e("_process"))},{"./debug":297,_process:539,fs:182,net:182,tty:597,util:601}],299:[function(e,t,r){"use strict";function n(e){var t=0,r=0,n=0;for(var i in e){var s=e[i],a=s[0],o=s[1];(a>r||a===r&&o>n)&&(r=a,n=o,t=Number(i))}return t}var i=e("repeating");t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,s=0,a=0,o=0,u={};e.split(/\n/g).forEach(function(e){if(e){var n,i=e.match(/^(?:( )+|\t+)/);i?(n=i[0].length,i[1]?a++:s++):n=0;var l=n-o;o=n,l?(r=l>0,t=u[r?l:-l],t?t[0]++:t=u[l]=[1,0]):t&&(t[1]+=Number(r))}});var l,c,p=n(u);return p?a>=s?(l="space",c=i(" ",p)):(l="tab",c=i("\t",p)):(l=null,c=""),{amount:p,type:l,indent:c}}},{repeating:588}],300:[function(e,t,r){"use strict";t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}},{}],301:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function s(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(a(r))for(s=Array.prototype.slice.call(arguments,1),l=r.slice(),n=l.length,u=0;u<n;u++)l[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(r=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,s,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(r)){for(o=s;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],302:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],303:[function(e,t,r){t.exports=e("./globals.json")},{"./globals.json":302}],304:[function(e,t,r){"use strict";var n=e("ansi-regex"),i=new RegExp(n().source);t.exports=i.test.bind(i)},{"ansi-regex":1}],305:[function(e,t,r){r.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,l=u>>1,c=-7,p=r?i-1:0,h=r?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-c)-1,f>>=-c,c+=o;c>0;s=256*s+e[t+p],p+=h,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+p],p+=h,c-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,c=(1<<l)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?h/u:h*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=c?(o=0,a=c):a+p>=1?(o=(t*u-1)*Math.pow(2,i),a+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=d,o/=256,i-=8);for(a=a<<i|o,l+=i;l>0;e[r+f]=255&a,f+=d,a/=256,l-=8);e[r+f-d]|=128*m}},{}],306:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],307:[function(e,t,r){"use strict";var n=function(e,t,r,n,i,s,a,o){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,s,a,o],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=n},{}],308:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}t.exports=function(e){return null!=e&&(n(e)||i(e)||!!e._isBuffer)}},{}],309:[function(e,t,r){"use strict";var n=e("number-is-nan");t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-1/0)}},{"number-is-nan":533}],310:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],311:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),
-r.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,r.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},{}],312:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,s="object"==typeof t&&t&&t.exports==i&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(n=a);var o={},u=o.hasOwnProperty,l=function(e,t){var r;for(r in e)u.call(e,r)&&t(r,e[r])},c=function(e,t){return t?(l(t,function(t,r){e[t]=r}),e):e},p=function(e,t){for(var r=e.length,n=-1;++n<r;)t(e[n])},h=o.toString,f=function(e){return"[object Array]"==h.call(e)},d=function(e){return"[object Object]"==h.call(e)},m=function(e){return"string"==typeof e||"[object String]"==h.call(e)},y=function(e){return"number"==typeof e||"[object Number]"==h.call(e)},g=function(e){return"function"==typeof e||"[object Function]"==h.call(e)},b=function(e){return"[object Map]"==h.call(e)},v=function(e){return"[object Set]"==h.call(e)},x={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},E=/["'\\\b\f\n\r\t]/,A=/[0-9]/,D=/[ !#-&\(-\[\]-~]/,C=function(e,t){var r={escapeEverything:!1,escapeEtago:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",__indent__:"",__inline1__:!1,__inline2__:!1},n=t&&t.json;n&&(r.quotes="double",r.wrap=!0),t=c(r,t),"single"!=t.quotes&&"double"!=t.quotes&&(t.quotes="single");var i,s="double"==t.quotes?'"':"'",a=t.compact,o=t.indent,u=t.lowercaseHex,h="",S=t.__inline1__,_=t.__inline2__,w=a?"":"\n",k=!0,F="binary"==t.numbers,T="octal"==t.numbers,P="decimal"==t.numbers,B="hexadecimal"==t.numbers;if(n&&e&&g(e.toJSON)&&(e=e.toJSON()),!m(e)){if(b(e))return 0==e.size?"new Map()":(a||(t.__inline1__=!0),"new Map("+C(Array.from(e),t)+")");if(v(e))return 0==e.size?"new Set()":"new Set("+C(Array.from(e),t)+")";if(f(e))return i=[],t.wrap=!0,S?(t.__inline1__=!1,t.__inline2__=!0):(h=t.__indent__,o+=h,t.__indent__=o),p(e,function(e){k=!1,_&&(t.__inline2__=!1),i.push((a||_?"":o)+C(e,t))}),k?"[]":_?"["+i.join(", ")+"]":"["+w+i.join(","+w)+w+(a?"":h)+"]";if(!y(e))return d(e)?(i=[],t.wrap=!0,h=t.__indent__,o+=h,t.__indent__=o,l(e,function(e,r){k=!1,i.push((a?"":o)+C(e,t)+":"+(a?"":" ")+C(r,t))}),k?"{}":"{"+w+i.join(","+w)+w+(a?"":h)+"}"):n?JSON.stringify(e)||"null":String(e);if(n)return JSON.stringify(e);if(P)return String(e);if(B){var O=e.toString(16);return u||(O=O.toUpperCase()),"0x"+O}if(F)return"0b"+e.toString(2);if(T)return"0o"+e.toString(8)}var j,N,I,L=e,M=-1,R=L.length;for(i="";++M<R;){var U=L.charAt(M);if(t.es6&&(j=L.charCodeAt(M))>=55296&&j<=56319&&R>M+1&&(N=L.charCodeAt(M+1))>=56320&&N<=57343){I=1024*(j-55296)+N-56320+65536;var V=I.toString(16);u||(V=V.toUpperCase()),i+="\\u{"+V+"}",M++}else{if(!t.escapeEverything){if(D.test(U)){i+=U;continue}if('"'==U){i+=s==U?'\\"':U;continue}if("'"==U){i+=s==U?"\\'":U;continue}}if("\0"!=U||n||A.test(L.charAt(M+1)))if(E.test(U))i+=x[U];else{var q=U.charCodeAt(0),V=q.toString(16);u||(V=V.toUpperCase());var G=V.length>2||n,X="\\"+(G?"u":"x")+("0000"+V).slice(G?-4:-2);i+=X}else i+="\\0"}}return t.wrap&&(i=s+i+s),t.escapeEtago?i.replace(/<\/(script|style)/gi,"<\\/$1"):i};C.version="1.3.0","function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return C}):i&&!i.nodeType?s?s.exports=C:i.jsesc=C:n.jsesc=C}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],313:[function(e,t,r){var n="object"==typeof r?r:{};n.parse=function(){"use strict";var e,t,r,n,i,s,a={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],u=function(e){return""===e?"EOF":"'"+e+"'"},l=function(n){var s=new SyntaxError;throw s.message=n+" at line "+t+" column "+r+" of the JSON5 data. Still to read: "+JSON.stringify(i.substring(e-1,e+19)),s.at=e,s.lineNumber=t,s.columnNumber=r,s},c=function(s){return s&&s!==n&&l("Expected "+u(s)+" instead of "+u(n)),n=i.charAt(e),e++,r++,("\n"===n||"\r"===n&&"\n"!==p())&&(t++,r=0),n},p=function(){return i.charAt(e)},h=function(){var e=n;for("_"!==n&&"$"!==n&&(n<"a"||n>"z")&&(n<"A"||n>"Z")&&l("Bad identifier as unquoted key");c()&&("_"===n||"$"===n||n>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9");)e+=n;return e},f=function(){var e,t="",r="",i=10;if("-"!==n&&"+"!==n||(t=n,c(n)),"I"===n)return e=v(),("number"!=typeof e||isNaN(e))&&l("Unexpected word for number"),"-"===t?-e:e;if("N"===n)return e=v(),isNaN(e)||l("expected word to be NaN"),e;switch("0"===n&&(r+=n,c(),"x"===n||"X"===n?(r+=n,c(),i=16):n>="0"&&n<="9"&&l("Octal literal")),i){case 10:for(;n>="0"&&n<="9";)r+=n,c();if("."===n)for(r+=".";c()&&n>="0"&&n<="9";)r+=n;if("e"===n||"E"===n)for(r+=n,c(),"-"!==n&&"+"!==n||(r+=n,c());n>="0"&&n<="9";)r+=n,c();break;case 16:for(;n>="0"&&n<="9"||n>="A"&&n<="F"||n>="a"&&n<="f";)r+=n,c()}if(e="-"===t?-r:+r,isFinite(e))return e;l("Bad number")},d=function(){var e,t,r,i,s="";if('"'===n||"'"===n)for(r=n;c();){if(n===r)return c(),s;if("\\"===n)if(c(),"u"===n){for(i=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)i=16*i+e;s+=String.fromCharCode(i)}else if("\r"===n)"\n"===p()&&c();else{if("string"!=typeof a[n])break;s+=a[n]}else{if("\n"===n)break;s+=n}}l("Bad string")},m=function(){"/"!==n&&l("Not an inline comment");do{if(c(),"\n"===n||"\r"===n)return void c()}while(n)},y=function(){"*"!==n&&l("Not a block comment");do{for(c();"*"===n;)if(c("*"),"/"===n)return void c("/")}while(n);l("Unterminated block comment")},g=function(){"/"!==n&&l("Not a comment"),c("/"),"/"===n?m():"*"===n?y():l("Unrecognized comment")},b=function(){for(;n;)if("/"===n)g();else{if(!(o.indexOf(n)>=0))return;c()}},v=function(){switch(n){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null;case"I":return c("I"),c("n"),c("f"),c("i"),c("n"),c("i"),c("t"),c("y"),1/0;case"N":return c("N"),c("a"),c("N"),NaN}l("Unexpected "+u(n))},x=function(){var e=[];if("["===n)for(c("["),b();n;){if("]"===n)return c("]"),e;if(","===n?l("Missing array element"):e.push(s()),b(),","!==n)return c("]"),e;c(","),b()}l("Bad array")},E=function(){var e,t={};if("{"===n)for(c("{"),b();n;){if("}"===n)return c("}"),t;if(e='"'===n||"'"===n?d():h(),b(),c(":"),t[e]=s(),b(),","!==n)return c("}"),t;c(","),b()}l("Bad object")};return s=function(){switch(b(),n){case"{":return E();case"[":return x();case'"':case"'":return d();case"-":case"+":case".":return f();default:return n>="0"&&n<="9"?f():v()}},function(a,o){var u;return i=String(a),e=0,t=1,r=1,n=" ",u=s(),b(),n&&l("Syntax error"),"function"==typeof o?function e(t,r){var n,i,s=t[r];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i=e(s,n),void 0!==i?s[n]=i:delete s[n]);return o.call(t,r,s)}({"":u},""):u}}(),n.stringify=function(e,t,r){function i(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e}function s(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}function a(e){if("string"!=typeof e)return!1;if(!s(e[0]))return!1;for(var t=1,r=e.length;t<r;){if(!i(e[t]))return!1;t++}return!0}function o(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function u(e){return"[object Date]"===Object.prototype.toString.call(e)}function l(e){for(var t=0;t<m.length;t++)if(m[t]===e)throw new TypeError("Converting circular structure to JSON")}function c(e,t,r){if(!e)return"";e.length>10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;i<t;i++)n+=e;return n}function p(e){return y.lastIndex=0,y.test(e)?'"'+e.replace(y,function(e){var t=g[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function h(e,t,r){var n,i,s=f(e,t,r);switch(s&&!u(s)&&(s=s.valueOf()),typeof s){case"boolean":return s.toString();case"number":return isNaN(s)||!isFinite(s)?"null":s.toString();case"string":return p(s.toString());case"object":if(null===s)return"null";if(o(s)){l(s),n="[",m.push(s);for(var y=0;y<s.length;y++)i=h(s,y,!1),n+=c(d,m.length),n+=null===i||void 0===i?"null":i,y<s.length-1?n+=",":d&&(n+="\n");m.pop(),s.length&&(n+=c(d,m.length,!0)),n+="]"}else{l(s),n="{";var g=!1;m.push(s);for(var b in s)if(s.hasOwnProperty(b)){var v=h(s,b,!1);r=!1,void 0!==v&&null!==v&&(n+=c(d,m.length),g=!0,t=a(b)?b:p(b),n+=t+":"+(d?" ":"")+v+",")}m.pop(),n=g?n.substring(0,n.length-1)+c(d,m.length)+"}":"{}"}return n;default:return}}if(t&&"function"!=typeof t&&!o(t))throw new Error("Replacer must be a function or an array");var f=function(e,r,n){var i=e[r];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof t?t.call(e,r,i):t?n||o(e)||t.indexOf(r)>=0?i:void 0:i};n.isWord=a;var d,m=[];r&&("string"==typeof r?d=r:"number"==typeof r&&r>=0&&(d=c(" ",r,!0)));var y=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b={"":e};return void 0===e?f(b,"",!0):h(b,"",!0)}},{}],314:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"DataView");t.exports=s},{"./_getNative":418,"./_root":462}],315:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_hashClear"),s=e("./_hashDelete"),a=e("./_hashGet"),o=e("./_hashHas"),u=e("./_hashSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_hashClear":426,"./_hashDelete":427,"./_hashGet":428,"./_hashHas":429,"./_hashSet":430}],316:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_listCacheClear"),s=e("./_listCacheDelete"),a=e("./_listCacheGet"),o=e("./_listCacheHas"),u=e("./_listCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_listCacheClear":442,"./_listCacheDelete":443,"./_listCacheGet":444,"./_listCacheHas":445,"./_listCacheSet":446}],317:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"Map");t.exports=s},{"./_getNative":418,"./_root":462}],318:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_mapCacheClear"),s=e("./_mapCacheDelete"),a=e("./_mapCacheGet"),o=e("./_mapCacheHas"),u=e("./_mapCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_mapCacheClear":447,"./_mapCacheDelete":448,"./_mapCacheGet":449,"./_mapCacheHas":450,"./_mapCacheSet":451}],319:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"Promise");t.exports=s},{"./_getNative":418,"./_root":462}],320:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"Set");t.exports=s},{"./_getNative":418,"./_root":462}],321:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i;++t<r;)this.add(e[t])}var i=e("./_MapCache"),s=e("./_setCacheAdd"),a=e("./_setCacheHas");n.prototype.add=n.prototype.push=s,n.prototype.has=a,t.exports=n},{"./_MapCache":318,"./_setCacheAdd":463,"./_setCacheHas":464}],322:[function(e,t,r){function n(e){var t=this.__data__=new i(e);this.size=t.size}var i=e("./_ListCache"),s=e("./_stackClear"),a=e("./_stackDelete"),o=e("./_stackGet"),u=e("./_stackHas"),l=e("./_stackSet");n.prototype.clear=s,n.prototype.delete=a,n.prototype.get=o,n.prototype.has=u,n.prototype.set=l,t.exports=n},{"./_ListCache":316,"./_stackClear":468,"./_stackDelete":469,"./_stackGet":470,"./_stackHas":471,"./_stackSet":472}],323:[function(e,t,r){var n=e("./_root"),i=n.Symbol;t.exports=i},{"./_root":462}],324:[function(e,t,r){var n=e("./_root"),i=n.Uint8Array;t.exports=i},{"./_root":462}],325:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"WeakMap");t.exports=s},{"./_getNative":418,"./_root":462}],326:[function(e,t,r){function n(e,t){return e.set(t[0],t[1]),e}t.exports=n},{}],327:[function(e,t,r){function n(e,t){return e.add(t),e}t.exports=n},{}],328:[function(e,t,r){function n(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}t.exports=n},{}],329:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}t.exports=n},{}],330:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}t.exports=n},{}],331:[function(e,t,r){function n(e,t){return!!(null==e?0:e.length)&&i(e,t,0)>-1}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":357}],332:[function(e,t,r){function n(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}t.exports=n},{}],333:[function(e,t,r){function n(e,t){var r=a(e),n=!r&&s(e),c=!r&&!n&&o(e),h=!r&&!n&&!c&&l(e),f=r||n||c||h,d=f?i(e.length,String):[],m=d.length;for(var y in e)!t&&!p.call(e,y)||f&&("length"==y||c&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,m))||d.push(y);return d}var i=e("./_baseTimes"),s=e("./isArguments"),a=e("./isArray"),o=e("./isBuffer"),u=e("./_isIndex"),l=e("./isTypedArray"),c=Object.prototype,p=c.hasOwnProperty;t.exports=n},{"./_baseTimes":381,"./_isIndex":435,"./isArguments":497,"./isArray":498,"./isBuffer":501,"./isTypedArray":511}],334:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}t.exports=n},{}],335:[function(e,t,r){function n(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}t.exports=n},{}],336:[function(e,t,r){function n(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}t.exports=n},{}],337:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}t.exports=n},{}],338:[function(e,t,r){function n(e,t,r){(void 0===r||s(e[t],r))&&(void 0!==r||t in e)||i(e,t,r)}var i=e("./_baseAssignValue"),s=e("./eq");t.exports=n},{"./_baseAssignValue":343,"./eq":485}],339:[function(e,t,r){function n(e,t,r){var n=e[t];o.call(e,t)&&s(n,r)&&(void 0!==r||t in e)||i(e,t,r)}var i=e("./_baseAssignValue"),s=e("./eq"),a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_baseAssignValue":343,"./eq":485}],340:[function(e,t,r){function n(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}var i=e("./eq");t.exports=n},{"./eq":485}],341:[function(e,t,r){function n(e,t){return e&&i(t,s(t),e)}var i=e("./_copyObject"),s=e("./keys");t.exports=n},{"./_copyObject":399,"./keys":512}],342:[function(e,t,r){function n(e,t){return e&&i(t,s(t),e)}var i=e("./_copyObject"),s=e("./keysIn");t.exports=n},{"./_copyObject":399,"./keysIn":513}],343:[function(e,t,r){function n(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var i=e("./_defineProperty");t.exports=n},{"./_defineProperty":409}],344:[function(e,t,r){function n(e,t,r){return e===e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}t.exports=n},{}],345:[function(e,t,r){function n(e,t,r,P,B,O){var j,N=t&D,I=t&C,L=t&S;if(r&&(j=B?r(e,P,B,O):r(e)),void 0!==j)return j;if(!E(e))return e;var M=v(e);if(M){if(j=y(e),!N)return c(e,j)}else{var R=m(e),U=R==w||R==k;if(x(e))return l(e,N);if(R==F||R==_||U&&!B){if(j=I||U?{}:b(e),!N)return I?h(e,u(j,e)):p(e,o(j,e))}else{if(!T[R])return B?e:{};j=g(e,R,n,N)}}O||(O=new i);var V=O.get(e);if(V)return V;O.set(e,j);var q=L?I?d:f:I?keysIn:A,G=M?void 0:q(e);return s(G||e,function(i,s){G&&(s=i,i=e[s]),a(j,s,n(i,t,r,s,e,O))}),j}var i=e("./_Stack"),s=e("./_arrayEach"),a=e("./_assignValue"),o=e("./_baseAssign"),u=e("./_baseAssignIn"),l=e("./_cloneBuffer"),c=e("./_copyArray"),p=e("./_copySymbols"),h=e("./_copySymbolsIn"),f=e("./_getAllKeys"),d=e("./_getAllKeysIn"),m=e("./_getTag"),y=e("./_initCloneArray"),g=e("./_initCloneByTag"),b=e("./_initCloneObject"),v=e("./isArray"),x=e("./isBuffer"),E=e("./isObject"),A=e("./keys"),D=1,C=2,S=4,_="[object Arguments]",w="[object Function]",k="[object GeneratorFunction]",F="[object Object]",T={};T[_]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[F]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[w]=T["[object WeakMap]"]=!1,t.exports=n},{"./_Stack":322,"./_arrayEach":329,"./_assignValue":339,"./_baseAssign":341,"./_baseAssignIn":342,"./_cloneBuffer":389,"./_copyArray":398,"./_copySymbols":400,"./_copySymbolsIn":401,"./_getAllKeys":414,"./_getAllKeysIn":415,"./_getTag":423,"./_initCloneArray":431,"./_initCloneByTag":432,"./_initCloneObject":433,"./isArray":498,"./isBuffer":501,"./isObject":505,"./keys":512}],346:[function(e,t,r){var n=e("./isObject"),i=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=s},{"./isObject":505}],347:[function(e,t,r){var n=e("./_baseForOwn"),i=e("./_createBaseEach"),s=i(n);t.exports=s},{"./_baseForOwn":351,"./_createBaseEach":404}],348:[function(e,t,r){function n(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}t.exports=n},{}],349:[function(e,t,r){function n(e,t,r,a,o){var u=-1,l=e.length;for(r||(r=s),o||(o=[]);++u<l;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,a,o):i(o,c):a||(o[o.length]=c)}return o}var i=e("./_arrayPush"),s=e("./_isFlattenable");t.exports=n},{"./_arrayPush":335,"./_isFlattenable":434}],350:[function(e,t,r){var n=e("./_createBaseFor"),i=n();t.exports=i},{"./_createBaseFor":405}],351:[function(e,t,r){function n(e,t){return e&&i(e,t,s)}var i=e("./_baseFor"),s=e("./keys");t.exports=n},{"./_baseFor":350,"./keys":512}],352:[function(e,t,r){function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[s(t[r++])];return r&&r==n?e:void 0}var i=e("./_castPath"),s=e("./_toKey");t.exports=n},{"./_castPath":387,"./_toKey":475}],353:[function(e,t,r){function n(e,t,r){var n=t(e);return s(e)?n:i(n,r(e))}var i=e("./_arrayPush"),s=e("./isArray");t.exports=n},{"./_arrayPush":335,"./isArray":498}],354:[function(e,t,r){function n(e){return null==e?void 0===e?u:o:l&&l in Object(e)?s(e):a(e)}var i=e("./_Symbol"),s=e("./_getRawTag"),a=e("./_objectToString"),o="[object Null]",u="[object Undefined]",l=i?i.toStringTag:void 0;t.exports=n},{"./_Symbol":323,"./_getRawTag":420,"./_objectToString":459}],355:[function(e,t,r){function n(e,t){return null!=e&&s.call(e,t)}var i=Object.prototype,s=i.hasOwnProperty;t.exports=n},{}],356:[function(e,t,r){function n(e,t){return null!=e&&t in Object(e)}t.exports=n},{}],357:[function(e,t,r){function n(e,t,r){return t===t?a(e,t,r):i(e,s,r)}var i=e("./_baseFindIndex"),s=e("./_baseIsNaN"),a=e("./_strictIndexOf");t.exports=n},{"./_baseFindIndex":348,"./_baseIsNaN":362,"./_strictIndexOf":473}],358:[function(e,t,r){function n(e){return s(e)&&i(e)==a}var i=e("./_baseGetTag"),s=e("./isObjectLike"),a="[object Arguments]";t.exports=n},{"./_baseGetTag":354,"./isObjectLike":506}],359:[function(e,t,r){function n(e,t,r,a,o){return e===t||(null==e||null==t||!s(e)&&!s(t)?e!==e&&t!==t:i(e,t,r,a,n,o))}var i=e("./_baseIsEqualDeep"),s=e("./isObjectLike");t.exports=n},{"./_baseIsEqualDeep":360,"./isObjectLike":506}],360:[function(e,t,r){function n(e,t,r,n,y,b){var v=l(e),x=l(t),E=v?d:u(e),A=x?d:u(t);E=E==f?m:E,A=A==f?m:A;var D=E==m,C=A==m,S=E==A;if(S&&c(e)){if(!c(t))return!1;v=!0,D=!1}if(S&&!D)return b||(b=new i),v||p(e)?s(e,t,r,n,y,b):a(e,t,E,r,n,y,b);if(!(r&h)){var _=D&&g.call(e,"__wrapped__"),w=C&&g.call(t,"__wrapped__");if(_||w){var k=_?e.value():e,F=w?t.value():t;return b||(b=new i),y(k,F,r,n,b)}}return!!S&&(b||(b=new i),o(e,t,r,n,y,b))}var i=e("./_Stack"),s=e("./_equalArrays"),a=e("./_equalByTag"),o=e("./_equalObjects"),u=e("./_getTag"),l=e("./isArray"),c=e("./isBuffer"),p=e("./isTypedArray"),h=1,f="[object Arguments]",d="[object Array]",m="[object Object]",y=Object.prototype,g=y.hasOwnProperty;t.exports=n},{"./_Stack":322,"./_equalArrays":410,"./_equalByTag":411,"./_equalObjects":412,"./_getTag":423,"./isArray":498,"./isBuffer":501,"./isTypedArray":511}],361:[function(e,t,r){function n(e,t,r,n){var u=r.length,l=u,c=!n;if(null==e)return!l;for(e=Object(e);u--;){var p=r[u];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++u<l;){p=r[u];var h=p[0],f=e[h],d=p[1];if(c&&p[2]){if(void 0===f&&!(h in e))return!1}else{var m=new i;if(n)var y=n(f,d,h,e,t,m);if(!(void 0===y?s(d,f,a|o,n,m):y))return!1}}return!0}var i=e("./_Stack"),s=e("./_baseIsEqual"),a=1,o=2;t.exports=n},{"./_Stack":322,"./_baseIsEqual":359}],362:[function(e,t,r){function n(e){return e!==e}t.exports=n},{}],363:[function(e,t,r){function n(e){return!(!a(e)||s(e))&&(i(e)?f:u).test(o(e))}var i=e("./isFunction"),s=e("./_isMasked"),a=e("./isObject"),o=e("./_toSource"),u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,p=l.toString,h=c.hasOwnProperty,f=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{"./_isMasked":439,"./_toSource":476,"./isFunction":502,"./isObject":505}],364:[function(e,t,r){function n(e){return s(e)&&i(e)==a}var i=e("./_baseGetTag"),s=e("./isObjectLike"),a="[object RegExp]";t.exports=n},{"./_baseGetTag":354,"./isObjectLike":506}],365:[function(e,t,r){function n(e){return a(e)&&s(e.length)&&!!o[i(e)]}var i=e("./_baseGetTag"),s=e("./isLength"),a=e("./isObjectLike"),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=n},{"./_baseGetTag":354,"./isLength":504,"./isObjectLike":506}],366:[function(e,t,r){function n(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?s(e[0],e[1]):i(e):u(e)}var i=e("./_baseMatches"),s=e("./_baseMatchesProperty"),a=e("./identity"),o=e("./isArray"),u=e("./property");t.exports=n},{"./_baseMatches":370,"./_baseMatchesProperty":371,"./identity":495,"./isArray":498,"./property":518}],367:[function(e,t,r){function n(e){if(!i(e))return s(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}var i=e("./_isPrototype"),s=e("./_nativeKeys"),a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_isPrototype":440,"./_nativeKeys":456}],368:[function(e,t,r){function n(e){if(!i(e))return a(e);var t=s(e),r=[];for(var n in e)("constructor"!=n||!t&&u.call(e,n))&&r.push(n);return r}var i=e("./isObject"),s=e("./_isPrototype"),a=e("./_nativeKeysIn"),o=Object.prototype,u=o.hasOwnProperty;t.exports=n},{"./_isPrototype":440,"./_nativeKeysIn":457,"./isObject":505}],369:[function(e,t,r){function n(e,t){var r=-1,n=s(e)?Array(e.length):[];return i(e,function(e,i,s){n[++r]=t(e,i,s)}),n}var i=e("./_baseEach"),s=e("./isArrayLike");t.exports=n},{"./_baseEach":347,"./isArrayLike":499}],370:[function(e,t,r){function n(e){var t=s(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(r){return r===e||i(r,e,t)}}var i=e("./_baseIsMatch"),s=e("./_getMatchData"),a=e("./_matchesStrictComparable");t.exports=n},{"./_baseIsMatch":361,"./_getMatchData":417,"./_matchesStrictComparable":453}],371:[function(e,t,r){function n(e,t){return o(e)&&u(t)?l(c(e),t):function(r){var n=s(r,e);return void 0===n&&n===t?a(r,e):i(t,n,p|h)}}var i=e("./_baseIsEqual"),s=e("./get"),a=e("./hasIn"),o=e("./_isKey"),u=e("./_isStrictComparable"),l=e("./_matchesStrictComparable"),c=e("./_toKey"),p=1,h=2;t.exports=n},{"./_baseIsEqual":359,"./_isKey":437,"./_isStrictComparable":441,"./_matchesStrictComparable":453,"./_toKey":475,"./get":492,"./hasIn":494}],372:[function(e,t,r){function n(e,t,r,c,p){e!==t&&a(t,function(a,l){if(u(a))p||(p=new i),o(e,t,l,r,n,c,p);else{var h=c?c(e[l],a,l+"",e,t,p):void 0;void 0===h&&(h=a),s(e,l,h)}},l)}var i=e("./_Stack"),s=e("./_assignMergeValue"),a=e("./_baseFor"),o=e("./_baseMergeDeep"),u=e("./isObject"),l=e("./keysIn");t.exports=n},{"./_Stack":322,"./_assignMergeValue":338,"./_baseFor":350,"./_baseMergeDeep":373,"./isObject":505,"./keysIn":513}],373:[function(e,t,r){function n(e,t,r,n,b,v,x){var E=e[r],A=t[r],D=x.get(A);if(D)return void i(e,r,D);var C=v?v(E,A,r+"",e,t,x):void 0,S=void 0===C;if(S){var _=c(A),w=!_&&h(A),k=!_&&!w&&y(A);C=A,_||w||k?c(E)?C=E:p(E)?C=o(E):w?(S=!1,C=s(A,!0)):k?(S=!1,C=a(A,!0)):C=[]:m(A)||l(A)?(C=E,l(E)?C=g(E):(!d(E)||n&&f(E))&&(C=u(A))):S=!1}S&&(x.set(A,C),b(C,A,n,v,x),x.delete(A)),i(e,r,C)}var i=e("./_assignMergeValue"),s=e("./_cloneBuffer"),a=e("./_cloneTypedArray"),o=e("./_copyArray"),u=e("./_initCloneObject"),l=e("./isArguments"),c=e("./isArray"),p=e("./isArrayLikeObject"),h=e("./isBuffer"),f=e("./isFunction"),d=e("./isObject"),m=e("./isPlainObject"),y=e("./isTypedArray"),g=e("./toPlainObject");t.exports=n},{"./_assignMergeValue":338,"./_cloneBuffer":389,"./_cloneTypedArray":395,"./_copyArray":398,"./_initCloneObject":433,"./isArguments":497,"./isArray":498,"./isArrayLikeObject":500,"./isBuffer":501,"./isFunction":502,"./isObject":505,"./isPlainObject":507,"./isTypedArray":511,"./toPlainObject":527}],374:[function(e,t,r){function n(e,t,r){var n=-1;t=i(t.length?t:[c],u(s));var p=a(e,function(e,r,s){return{criteria:i(t,function(t){return t(e)}),index:++n,value:e}});return o(p,function(e,t){return l(e,t,r)})}var i=e("./_arrayMap"),s=e("./_baseIteratee"),a=e("./_baseMap"),o=e("./_baseSortBy"),u=e("./_baseUnary"),l=e("./_compareMultiple"),c=e("./identity");t.exports=n},{"./_arrayMap":334,"./_baseIteratee":366,"./_baseMap":369,"./_baseSortBy":380,"./_baseUnary":383,"./_compareMultiple":397,"./identity":495}],375:[function(e,t,r){function n(e){return function(t){return null==t?void 0:t[e]}}t.exports=n},{}],376:[function(e,t,r){function n(e){return function(t){return i(t,e)}}var i=e("./_baseGet");t.exports=n},{"./_baseGet":352}],377:[function(e,t,r){function n(e,t){var r="";if(!e||t<1||t>i)return r;do{t%2&&(r+=e),(t=s(t/2))&&(e+=e)}while(t);return r}var i=9007199254740991,s=Math.floor;t.exports=n},{}],378:[function(e,t,r){function n(e,t){return a(s(e,t,i),e+"")}var i=e("./identity"),s=e("./_overRest"),a=e("./_setToString");t.exports=n},{"./_overRest":461,"./_setToString":466,"./identity":495}],379:[function(e,t,r){var n=e("./constant"),i=e("./_defineProperty"),s=e("./identity"),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;t.exports=a},{"./_defineProperty":409,"./constant":483,"./identity":495}],380:[function(e,t,r){function n(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}t.exports=n},{}],381:[function(e,t,r){function n(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}t.exports=n},{}],382:[function(e,t,r){function n(e){if("string"==typeof e)return e;if(a(e))return s(e,n)+"";if(o(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=e("./_Symbol"),s=e("./_arrayMap"),a=e("./isArray"),o=e("./isSymbol"),u=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;t.exports=n},{"./_Symbol":323,"./_arrayMap":334,"./isArray":498,"./isSymbol":510}],383:[function(e,t,r){function n(e){return function(t){return e(t)}}t.exports=n},{}],384:[function(e,t,r){function n(e,t,r){var n=-1,p=s,h=e.length,f=!0,d=[],m=d;if(r)f=!1,p=a;else if(h>=c){var y=t?null:u(e);if(y)return l(y);f=!1,p=o,m=new i}else m=t?[]:d;e:for(;++n<h;){var g=e[n],b=t?t(g):g;if(g=r||0!==g?g:0,f&&b===b){for(var v=m.length;v--;)if(m[v]===b)continue e;t&&m.push(b),d.push(g)}else p(m,b,r)||(m!==d&&m.push(b),d.push(g))}return d}var i=e("./_SetCache"),s=e("./_arrayIncludes"),a=e("./_arrayIncludesWith"),o=e("./_cacheHas"),u=e("./_createSet"),l=e("./_setToArray"),c=200;t.exports=n},{"./_SetCache":321,"./_arrayIncludes":331,"./_arrayIncludesWith":332,"./_cacheHas":386,"./_createSet":407,"./_setToArray":465}],385:[function(e,t,r){function n(e,t){return i(t,function(t){return e[t]})}var i=e("./_arrayMap");t.exports=n},{"./_arrayMap":334}],386:[function(e,t,r){function n(e,t){return e.has(t)}t.exports=n},{}],387:[function(e,t,r){function n(e,t){return i(e)?e:s(e,t)?[e]:a(o(e))}var i=e("./isArray"),s=e("./_isKey"),a=e("./_stringToPath"),o=e("./toString");t.exports=n},{"./_isKey":437,"./_stringToPath":474,"./isArray":498,"./toString":528}],388:[function(e,t,r){function n(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}var i=e("./_Uint8Array");t.exports=n},{"./_Uint8Array":324}],389:[function(e,t,r){function n(e,t){if(t)return e.slice();var r=e.length,n=l?l(r):new e.constructor(r);return e.copy(n),n}var i=e("./_root"),s="object"==typeof r&&r&&!r.nodeType&&r,a=s&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===s,u=o?i.Buffer:void 0,l=u?u.allocUnsafe:void 0;t.exports=n},{"./_root":462}],390:[function(e,t,r){function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var i=e("./_cloneArrayBuffer");t.exports=n},{"./_cloneArrayBuffer":388}],391:[function(e,t,r){function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=e("./_addMapEntry"),s=e("./_arrayReduce"),a=e("./_mapToArray"),o=1;t.exports=n},{"./_addMapEntry":326,"./_arrayReduce":336,"./_mapToArray":452}],392:[function(e,t,r){function n(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}var i=/\w*$/;t.exports=n},{}],393:[function(e,t,r){function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=e("./_addSetEntry"),s=e("./_arrayReduce"),a=e("./_setToArray"),o=1;t.exports=n},{"./_addSetEntry":327,"./_arrayReduce":336,"./_setToArray":465}],394:[function(e,t,r){function n(e){return a?Object(a.call(e)):{}}var i=e("./_Symbol"),s=i?i.prototype:void 0,a=s?s.valueOf:void 0;t.exports=n},{"./_Symbol":323}],395:[function(e,t,r){function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var i=e("./_cloneArrayBuffer");t.exports=n},{"./_cloneArrayBuffer":388}],396:[function(e,t,r){function n(e,t){if(e!==t){var r=void 0!==e,n=null===e,s=e===e,a=i(e),o=void 0!==t,u=null===t,l=t===t,c=i(t);if(!u&&!c&&!a&&e>t||a&&o&&l&&!u&&!c||n&&o&&l||!r&&l||!s)return 1;if(!n&&!a&&!c&&e<t||c&&r&&s&&!n&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var i=e("./isSymbol");t.exports=n},{"./isSymbol":510}],397:[function(e,t,r){function n(e,t,r){for(var n=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++n<o;){var l=i(s[n],a[n]);if(l){if(n>=u)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}var i=e("./_compareAscending");t.exports=n},{"./_compareAscending":396}],398:[function(e,t,r){function n(e,t){var r=-1,n=e.length
-;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}t.exports=n},{}],399:[function(e,t,r){function n(e,t,r,n){var a=!r;r||(r={});for(var o=-1,u=t.length;++o<u;){var l=t[o],c=n?n(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),a?s(r,l,c):i(r,l,c)}return r}var i=e("./_assignValue"),s=e("./_baseAssignValue");t.exports=n},{"./_assignValue":339,"./_baseAssignValue":343}],400:[function(e,t,r){function n(e,t){return i(e,s(e),t)}var i=e("./_copyObject"),s=e("./_getSymbols");t.exports=n},{"./_copyObject":399,"./_getSymbols":421}],401:[function(e,t,r){function n(e,t){return i(e,s(e),t)}var i=e("./_copyObject"),s=e("./_getSymbolsIn");t.exports=n},{"./_copyObject":399,"./_getSymbolsIn":422}],402:[function(e,t,r){var n=e("./_root"),i=n["__core-js_shared__"];t.exports=i},{"./_root":462}],403:[function(e,t,r){function n(e){return i(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&s(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t})}var i=e("./_baseRest"),s=e("./_isIterateeCall");t.exports=n},{"./_baseRest":378,"./_isIterateeCall":436}],404:[function(e,t,r){function n(e,t){return function(r,n){if(null==r)return r;if(!i(r))return e(r,n);for(var s=r.length,a=t?s:-1,o=Object(r);(t?a--:++a<s)&&!1!==n(o[a],a,o););return r}}var i=e("./isArrayLike");t.exports=n},{"./isArrayLike":499}],405:[function(e,t,r){function n(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[e?o:++i];if(!1===r(s[u],u,s))break}return t}}t.exports=n},{}],406:[function(e,t,r){function n(e){return function(t,r,n){var o=Object(t);if(!s(t)){var u=i(r,3);t=a(t),r=function(e){return u(o[e],e,o)}}var l=e(t,r,n);return l>-1?o[u?t[l]:l]:void 0}}var i=e("./_baseIteratee"),s=e("./isArrayLike"),a=e("./keys");t.exports=n},{"./_baseIteratee":366,"./isArrayLike":499,"./keys":512}],407:[function(e,t,r){var n=e("./_Set"),i=e("./noop"),s=e("./_setToArray"),a=n&&1/s(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;t.exports=a},{"./_Set":320,"./_setToArray":465,"./noop":517}],408:[function(e,t,r){function n(e,t,r,n){return void 0===e||i(e,s[r])&&!a.call(n,r)?t:e}var i=e("./eq"),s=Object.prototype,a=s.hasOwnProperty;t.exports=n},{"./eq":485}],409:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":418}],410:[function(e,t,r){function n(e,t,r,n,l,c){var p=r&o,h=e.length,f=t.length;if(h!=f&&!(p&&f>h))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var m=-1,y=!0,g=r&u?new i:void 0;for(c.set(e,t),c.set(t,e);++m<h;){var b=e[m],v=t[m];if(n)var x=p?n(v,b,m,t,e,c):n(b,v,m,e,t,c);if(void 0!==x){if(x)continue;y=!1;break}if(g){if(!s(t,function(e,t){if(!a(g,t)&&(b===e||l(b,e,r,n,c)))return g.push(t)})){y=!1;break}}else if(b!==v&&!l(b,v,r,n,c)){y=!1;break}}return c.delete(e),c.delete(t),y}var i=e("./_SetCache"),s=e("./_arraySome"),a=e("./_cacheHas"),o=1,u=2;t.exports=n},{"./_SetCache":321,"./_arraySome":337,"./_cacheHas":386}],411:[function(e,t,r){function n(e,t,r,n,i,D,S){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!D(new s(e),new s(t)));case h:case f:case y:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+"";case m:var _=u;case b:var w=n&c;if(_||(_=l),e.size!=t.size&&!w)return!1;var k=S.get(e);if(k)return k==t;n|=p,S.set(e,t);var F=o(_(e),_(t),n,i,D,S);return S.delete(e),F;case x:if(C)return C.call(e)==C.call(t)}return!1}var i=e("./_Symbol"),s=e("./_Uint8Array"),a=e("./eq"),o=e("./_equalArrays"),u=e("./_mapToArray"),l=e("./_setToArray"),c=1,p=2,h="[object Boolean]",f="[object Date]",d="[object Error]",m="[object Map]",y="[object Number]",g="[object RegExp]",b="[object Set]",v="[object String]",x="[object Symbol]",E="[object ArrayBuffer]",A="[object DataView]",D=i?i.prototype:void 0,C=D?D.valueOf:void 0;t.exports=n},{"./_Symbol":323,"./_Uint8Array":324,"./_equalArrays":410,"./_mapToArray":452,"./_setToArray":465,"./eq":485}],412:[function(e,t,r){function n(e,t,r,n,a,u){var l=r&s,c=i(e),p=c.length;if(p!=i(t).length&&!l)return!1;for(var h=p;h--;){var f=c[h];if(!(l?f in t:o.call(t,f)))return!1}var d=u.get(e);if(d&&u.get(t))return d==t;var m=!0;u.set(e,t),u.set(t,e);for(var y=l;++h<p;){f=c[h];var g=e[f],b=t[f];if(n)var v=l?n(b,g,f,t,e,u):n(g,b,f,e,t,u);if(!(void 0===v?g===b||a(g,b,r,n,u):v)){m=!1;break}y||(y="constructor"==f)}if(m&&!y){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof E&&E instanceof E)&&(m=!1)}return u.delete(e),u.delete(t),m}var i=e("./_getAllKeys"),s=1,a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_getAllKeys":414}],413:[function(e,t,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],414:[function(e,t,r){function n(e){return i(e,a,s)}var i=e("./_baseGetAllKeys"),s=e("./_getSymbols"),a=e("./keys");t.exports=n},{"./_baseGetAllKeys":353,"./_getSymbols":421,"./keys":512}],415:[function(e,t,r){function n(e){return i(e,a,s)}var i=e("./_baseGetAllKeys"),s=e("./_getSymbolsIn"),a=e("./keysIn");t.exports=n},{"./_baseGetAllKeys":353,"./_getSymbolsIn":422,"./keysIn":513}],416:[function(e,t,r){function n(e,t){var r=e.__data__;return i(t)?r["string"==typeof t?"string":"hash"]:r.map}var i=e("./_isKeyable");t.exports=n},{"./_isKeyable":438}],417:[function(e,t,r){function n(e){for(var t=s(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,i(a)]}return t}var i=e("./_isStrictComparable"),s=e("./keys");t.exports=n},{"./_isStrictComparable":441,"./keys":512}],418:[function(e,t,r){function n(e,t){var r=s(e,t);return i(r)?r:void 0}var i=e("./_baseIsNative"),s=e("./_getValue");t.exports=n},{"./_baseIsNative":363,"./_getValue":424}],419:[function(e,t,r){var n=e("./_overArg"),i=n(Object.getPrototypeOf,Object);t.exports=i},{"./_overArg":460}],420:[function(e,t,r){function n(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0}catch(e){}var n=o.call(e);return t?e[u]=r:delete e[u],n}var i=e("./_Symbol"),s=Object.prototype,a=s.hasOwnProperty,o=s.toString,u=i?i.toStringTag:void 0;t.exports=n},{"./_Symbol":323}],421:[function(e,t,r){var n=e("./_arrayFilter"),i=e("./stubArray"),s=Object.prototype,a=s.propertyIsEnumerable,o=Object.getOwnPropertySymbols,u=o?function(e){return null==e?[]:(e=Object(e),n(o(e),function(t){return a.call(e,t)}))}:i;t.exports=u},{"./_arrayFilter":330,"./stubArray":522}],422:[function(e,t,r){var n=e("./_arrayPush"),i=e("./_getPrototype"),s=e("./_getSymbols"),a=e("./stubArray"),o=Object.getOwnPropertySymbols,u=o?function(e){for(var t=[];e;)n(t,s(e)),e=i(e);return t}:a;t.exports=u},{"./_arrayPush":335,"./_getPrototype":419,"./_getSymbols":421,"./stubArray":522}],423:[function(e,t,r){var n=e("./_DataView"),i=e("./_Map"),s=e("./_Promise"),a=e("./_Set"),o=e("./_WeakMap"),u=e("./_baseGetTag"),l=e("./_toSource"),c=l(n),p=l(i),h=l(s),f=l(a),d=l(o),m=u;(n&&"[object DataView]"!=m(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||s&&"[object Promise]"!=m(s.resolve())||a&&"[object Set]"!=m(new a)||o&&"[object WeakMap]"!=m(new o))&&(m=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case c:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case d:return"[object WeakMap]"}return t}),t.exports=m},{"./_DataView":314,"./_Map":317,"./_Promise":319,"./_Set":320,"./_WeakMap":325,"./_baseGetTag":354,"./_toSource":476}],424:[function(e,t,r){function n(e,t){return null==e?void 0:e[t]}t.exports=n},{}],425:[function(e,t,r){function n(e,t,r){t=i(t,e);for(var n=-1,c=t.length,p=!1;++n<c;){var h=l(t[n]);if(!(p=null!=e&&r(e,h)))break;e=e[h]}return p||++n!=c?p:!!(c=null==e?0:e.length)&&u(c)&&o(h,c)&&(a(e)||s(e))}var i=e("./_castPath"),s=e("./isArguments"),a=e("./isArray"),o=e("./_isIndex"),u=e("./isLength"),l=e("./_toKey");t.exports=n},{"./_castPath":387,"./_isIndex":435,"./_toKey":475,"./isArguments":497,"./isArray":498,"./isLength":504}],426:[function(e,t,r){function n(){this.__data__=i?i(null):{},this.size=0}var i=e("./_nativeCreate");t.exports=n},{"./_nativeCreate":455}],427:[function(e,t,r){function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=n},{}],428:[function(e,t,r){function n(e){var t=this.__data__;if(i){var r=t[e];return r===s?void 0:r}return o.call(t,e)?t[e]:void 0}var i=e("./_nativeCreate"),s="__lodash_hash_undefined__",a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_nativeCreate":455}],429:[function(e,t,r){function n(e){var t=this.__data__;return i?void 0!==t[e]:a.call(t,e)}var i=e("./_nativeCreate"),s=Object.prototype,a=s.hasOwnProperty;t.exports=n},{"./_nativeCreate":455}],430:[function(e,t,r){function n(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?s:t,this}var i=e("./_nativeCreate"),s="__lodash_hash_undefined__";t.exports=n},{"./_nativeCreate":455}],431:[function(e,t,r){function n(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&s.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var i=Object.prototype,s=i.hasOwnProperty;t.exports=n},{}],432:[function(e,t,r){function n(e,t,r,n){var T=e.constructor;switch(t){case v:return i(e);case p:case h:return new T(+e);case x:return s(e,n);case E:case A:case D:case C:case S:case _:case w:case k:case F:return c(e,n);case f:return a(e,n,r);case d:case g:return new T(e);case m:return o(e);case y:return u(e,n,r);case b:return l(e)}}var i=e("./_cloneArrayBuffer"),s=e("./_cloneDataView"),a=e("./_cloneMap"),o=e("./_cloneRegExp"),u=e("./_cloneSet"),l=e("./_cloneSymbol"),c=e("./_cloneTypedArray"),p="[object Boolean]",h="[object Date]",f="[object Map]",d="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",v="[object ArrayBuffer]",x="[object DataView]",E="[object Float32Array]",A="[object Float64Array]",D="[object Int8Array]",C="[object Int16Array]",S="[object Int32Array]",_="[object Uint8Array]",w="[object Uint8ClampedArray]",k="[object Uint16Array]",F="[object Uint32Array]";t.exports=n},{"./_cloneArrayBuffer":388,"./_cloneDataView":390,"./_cloneMap":391,"./_cloneRegExp":392,"./_cloneSet":393,"./_cloneSymbol":394,"./_cloneTypedArray":395}],433:[function(e,t,r){function n(e){return"function"!=typeof e.constructor||a(e)?{}:i(s(e))}var i=e("./_baseCreate"),s=e("./_getPrototype"),a=e("./_isPrototype");t.exports=n},{"./_baseCreate":346,"./_getPrototype":419,"./_isPrototype":440}],434:[function(e,t,r){function n(e){return a(e)||s(e)||!!(o&&e&&e[o])}var i=e("./_Symbol"),s=e("./isArguments"),a=e("./isArray"),o=i?i.isConcatSpreadable:void 0;t.exports=n},{"./_Symbol":323,"./isArguments":497,"./isArray":498}],435:[function(e,t,r){function n(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||s.test(e))&&e>-1&&e%1==0&&e<t}var i=9007199254740991,s=/^(?:0|[1-9]\d*)$/;t.exports=n},{}],436:[function(e,t,r){function n(e,t,r){if(!o(r))return!1;var n=typeof t;return!!("number"==n?s(r)&&a(t,r.length):"string"==n&&t in r)&&i(r[t],e)}var i=e("./eq"),s=e("./isArrayLike"),a=e("./_isIndex"),o=e("./isObject");t.exports=n},{"./_isIndex":435,"./eq":485,"./isArrayLike":499,"./isObject":505}],437:[function(e,t,r){function n(e,t){if(i(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!s(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}var i=e("./isArray"),s=e("./isSymbol"),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=n},{"./isArray":498,"./isSymbol":510}],438:[function(e,t,r){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=n},{}],439:[function(e,t,r){function n(e){return!!s&&s in e}var i=e("./_coreJsData"),s=function(){var e=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();t.exports=n},{"./_coreJsData":402}],440:[function(e,t,r){function n(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}var i=Object.prototype;t.exports=n},{}],441:[function(e,t,r){function n(e){return e===e&&!i(e)}var i=e("./isObject");t.exports=n},{"./isObject":505}],442:[function(e,t,r){function n(){this.__data__=[],this.size=0}t.exports=n},{}],443:[function(e,t,r){function n(e){var t=this.__data__,r=i(t,e);return!(r<0)&&(r==t.length-1?t.pop():a.call(t,r,1),--this.size,!0)}var i=e("./_assocIndexOf"),s=Array.prototype,a=s.splice;t.exports=n},{"./_assocIndexOf":340}],444:[function(e,t,r){function n(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],445:[function(e,t,r){function n(e){return i(this.__data__,e)>-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],446:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],447:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(a||s),string:new i}}var i=e("./_Hash"),s=e("./_ListCache"),a=e("./_Map");t.exports=n},{"./_Hash":315,"./_ListCache":316,"./_Map":317}],448:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],449:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],450:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],451:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],452:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],453:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],454:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===s&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),s=500;t.exports=n},{"./memoize":515}],455:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":418}],456:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":460}],457:[function(e,t,r){function n(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}t.exports=n},{}],458:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i,o=a&&n.process,u=function(){try{return o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=u},{"./_freeGlobal":413}],459:[function(e,t,r){function n(e){return s.call(e)}var i=Object.prototype,s=i.toString;t.exports=n},{}],460:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],461:[function(e,t,r){function n(e,t,r){return t=s(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,o=s(n.length-t,0),u=Array(o);++a<o;)u[a]=n[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=n[a];return l[t]=r(u),i(e,this,l)}}var i=e("./_apply"),s=Math.max;t.exports=n},{"./_apply":328}],462:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();t.exports=s},{"./_freeGlobal":413}],463:[function(e,t,r){function n(e){return this.__data__.set(e,i),this}var i="__lodash_hash_undefined__";t.exports=n},{}],464:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],465:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}t.exports=n},{}],466:[function(e,t,r){var n=e("./_baseSetToString"),i=e("./_shortOut"),s=i(n);t.exports=s},{"./_baseSetToString":379,"./_shortOut":467}],467:[function(e,t,r){function n(e){var t=0,r=0;return function(){var n=a(),o=s-(n-r);if(r=n,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,s=16,a=Date.now;t.exports=n},{}],468:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":316}],469:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],470:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],471:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],472:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!s||n.length<o-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(n)}return r.set(e,t),this.size=r.size,this}var i=e("./_ListCache"),s=e("./_Map"),a=e("./_MapCache"),o=200;t.exports=n},{"./_ListCache":316,"./_Map":317,"./_MapCache":318}],473:[function(e,t,r){function n(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}t.exports=n},{}],474:[function(e,t,r){var n=e("./_memoizeCapped"),i=/^\./,s=n(function(e){var t=[];return i.test(e)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,r,n,i){t.push(n?i.replace(/\\(\\)?/g,"$1"):r||e)}),t});t.exports=s},{"./_memoizeCapped":454}],475:[function(e,t,r){function n(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}var i=e("./isSymbol"),s=1/0;t.exports=n},{"./isSymbol":510}],476:[function(e,t,r){function n(e){if(null!=e){try{return s.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var i=Function.prototype,s=i.toString;t.exports=n},{}],477:[function(e,t,r){var n=e("./_assignValue"),i=e("./_copyObject"),s=e("./_createAssigner"),a=e("./isArrayLike"),o=e("./_isPrototype"),u=e("./keys"),l=Object.prototype,c=l.hasOwnProperty,p=s(function(e,t){if(o(t)||a(t))return void i(t,u(t),e);for(var r in t)c.call(t,r)&&n(e,r,t[r])});t.exports=p},{"./_assignValue":339,"./_copyObject":399,"./_createAssigner":403,"./_isPrototype":440,"./isArrayLike":499,"./keys":512}],478:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t){n(t,s(t),e)});t.exports=a},{"./_copyObject":399,"./_createAssigner":403,"./keysIn":513}],479:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t,r,i){n(t,s(t),e,i)});t.exports=a},{"./_copyObject":399,"./_createAssigner":403,"./keysIn":513}],480:[function(e,t,r){function n(e){return i(e,s)}var i=e("./_baseClone"),s=4;t.exports=n},{"./_baseClone":345}],481:[function(e,t,r){function n(e){return i(e,s|a)}var i=e("./_baseClone"),s=1,a=4;t.exports=n},{"./_baseClone":345}],482:[function(e,t,r){function n(e,t){return t="function"==typeof t?t:void 0,i(e,s|a,t)}var i=e("./_baseClone"),s=1,a=4;t.exports=n},{"./_baseClone":345}],483:[function(e,t,r){function n(e){return function(){return e}}t.exports=n},{}],484:[function(e,t,r){var n=e("./_apply"),i=e("./assignInWith"),s=e("./_baseRest"),a=e("./_customDefaultsAssignIn"),o=s(function(e){return e.push(void 0,a),n(i,void 0,e)});t.exports=o},{"./_apply":328,"./_baseRest":378,"./_customDefaultsAssignIn":408,"./assignInWith":479}],485:[function(e,t,r){function n(e,t){return e===t||e!==e&&t!==t}t.exports=n},{}],486:[function(e,t,r){function n(e){return e=i(e),e&&a.test(e)?e.replace(s,"\\$&"):e}var i=e("./toString"),s=/[\\^$.*+?()[\]{}|]/g,a=RegExp(s.source);t.exports=n},{"./toString":528}],487:[function(e,t,r){t.exports=e("./assignIn")},{"./assignIn":478}],488:[function(e,t,r){var n=e("./_createFind"),i=e("./findIndex"),s=n(i);t.exports=s},{"./_createFind":406,"./findIndex":489}],489:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var u=null==r?0:a(r);return u<0&&(u=o(n+u,0)),i(e,s(t,3),u)}var i=e("./_baseFindIndex"),s=e("./_baseIteratee"),a=e("./toInteger"),o=Math.max;t.exports=n},{"./_baseFindIndex":348,"./_baseIteratee":366,"./toInteger":525}],490:[function(e,t,r){var n=e("./_createFind"),i=e("./findLastIndex"),s=n(i);t.exports=s},{"./_createFind":406,"./findLastIndex":491}],491:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var l=n-1;return void 0!==r&&(l=a(r),l=r<0?o(n+l,0):u(l,n-1)),i(e,s(t,3),l,!0)}var i=e("./_baseFindIndex"),s=e("./_baseIteratee"),a=e("./toInteger"),o=Math.max,u=Math.min;t.exports=n},{"./_baseFindIndex":348,"./_baseIteratee":366,"./toInteger":525}],492:[function(e,t,r){function n(e,t,r){var n=null==e?void 0:i(e,t);return void 0===n?r:n}var i=e("./_baseGet");t.exports=n},{"./_baseGet":352}],493:[function(e,t,r){function n(e,t){return null!=e&&s(e,t,i)}var i=e("./_baseHas"),s=e("./_hasPath");t.exports=n},{"./_baseHas":355,"./_hasPath":425}],494:[function(e,t,r){function n(e,t){return null!=e&&s(e,t,i)}var i=e("./_baseHasIn"),s=e("./_hasPath");t.exports=n},{"./_baseHasIn":356,"./_hasPath":425}],495:[function(e,t,r){function n(e){return e}t.exports=n},{}],496:[function(e,t,r){function n(e,t,r,n){e=s(e)?e:u(e),r=r&&!n?o(r):0;var c=e.length;return r<0&&(r=l(c+r,0)),a(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&i(e,t,r)>-1}var i=e("./_baseIndexOf"),s=e("./isArrayLike"),a=e("./isString"),o=e("./toInteger"),u=e("./values"),l=Math.max;t.exports=n},{"./_baseIndexOf":357,"./isArrayLike":499,"./isString":509,"./toInteger":525,"./values":530}],497:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};t.exports=u},{"./_baseIsArguments":358,"./isObjectLike":506}],498:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],499:[function(e,t,r){function n(e){return null!=e&&s(e.length)&&!i(e)}var i=e("./isFunction"),s=e("./isLength");t.exports=n},{"./isFunction":502,"./isLength":504}],500:[function(e,t,r){function n(e){return s(e)&&i(e)}var i=e("./isArrayLike"),s=e("./isObjectLike");t.exports=n},{"./isArrayLike":499,"./isObjectLike":506}],501:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),s="object"==typeof r&&r&&!r.nodeType&&r,a=s&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===s,u=o?n.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||i;t.exports=c},{"./_root":462,"./stubFalse":523}],502:[function(e,t,r){function n(e){if(!s(e))return!1;var t=i(e);return t==o||t==u||t==a||t==l}var i=e("./_baseGetTag"),s=e("./isObject"),a="[object AsyncFunction]",o="[object Function]",u="[object GeneratorFunction]",l="[object Proxy]";t.exports=n},{"./_baseGetTag":354,"./isObject":505}],503:[function(e,t,r){function n(e){return"number"==typeof e&&e==i(e)}var i=e("./toInteger");t.exports=n},{"./toInteger":525}],504:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],505:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=n},{}],506:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],507:[function(e,t,r){function n(e){if(!a(e)||i(e)!=o)return!1;var t=s(e);if(null===t)return!0;var r=p.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==h}var i=e("./_baseGetTag"),s=e("./_getPrototype"),a=e("./isObjectLike"),o="[object Object]",u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,h=c.call(Object);t.exports=n},{"./_baseGetTag":354,"./_getPrototype":419,"./isObjectLike":506}],508:[function(e,t,r){var n=e("./_baseIsRegExp"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isRegExp,o=a?i(a):n;t.exports=o},{"./_baseIsRegExp":364,"./_baseUnary":383,"./_nodeUtil":458}],509:[function(e,t,r){function n(e){return"string"==typeof e||!s(e)&&a(e)&&i(e)==o}var i=e("./_baseGetTag"),s=e("./isArray"),a=e("./isObjectLike"),o="[object String]";t.exports=n},{"./_baseGetTag":354,"./isArray":498,"./isObjectLike":506}],510:[function(e,t,r){function n(e){return"symbol"==typeof e||s(e)&&i(e)==a}var i=e("./_baseGetTag"),s=e("./isObjectLike"),a="[object Symbol]";t.exports=n},{"./_baseGetTag":354,"./isObjectLike":506}],511:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isTypedArray,o=a?i(a):n;t.exports=o},{"./_baseIsTypedArray":365,"./_baseUnary":383,"./_nodeUtil":458}],512:[function(e,t,r){function n(e){return a(e)?i(e):s(e)}var i=e("./_arrayLikeKeys"),s=e("./_baseKeys"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":333,"./_baseKeys":367,"./isArrayLike":499}],513:[function(e,t,r){function n(e){return a(e)?i(e,!0):s(e)}var i=e("./_arrayLikeKeys"),s=e("./_baseKeysIn"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":333,"./_baseKeysIn":368,"./isArrayLike":499}],514:[function(e,t,r){function n(e,t){return(o(e)?i:a)(e,s(t,3))}var i=e("./_arrayMap"),s=e("./_baseIteratee"),a=e("./_baseMap"),o=e("./isArray");t.exports=n},{"./_arrayMap":334,"./_baseIteratee":366,"./_baseMap":369,"./isArray":498}],515:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),s="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":318}],516:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner"),s=i(function(e,t,r,i){n(e,t,r,i)});t.exports=s},{"./_baseMerge":372,"./_createAssigner":403}],517:[function(e,t,r){function n(){}t.exports=n},{}],518:[function(e,t,r){function n(e){return a(e)?i(o(e)):s(e)}var i=e("./_baseProperty"),s=e("./_basePropertyDeep"),a=e("./_isKey"),o=e("./_toKey");t.exports=n},{"./_baseProperty":375,"./_basePropertyDeep":376,"./_isKey":437,"./_toKey":475}],519:[function(e,t,r){function n(e,t,r){return t=(r?s(e,t,r):void 0===t)?1:a(t),i(o(e),t)}var i=e("./_baseRepeat"),s=e("./_isIterateeCall"),a=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseRepeat":377,"./_isIterateeCall":436,"./toInteger":525,"./toString":528}],520:[function(e,t,r){var n=e("./_baseFlatten"),i=e("./_baseOrderBy"),s=e("./_baseRest"),a=e("./_isIterateeCall"),o=s(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});t.exports=o},{"./_baseFlatten":349,"./_baseOrderBy":374,"./_baseRest":378,"./_isIterateeCall":436}],521:[function(e,t,r){function n(e,t,r){return e=o(e),r=null==r?0:i(a(r),0,e.length),t=s(t),e.slice(r,r+t.length)==t}var i=e("./_baseClamp"),s=e("./_baseToString"),a=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseClamp":344,"./_baseToString":382,"./toInteger":525,"./toString":528}],522:[function(e,t,r){function n(){return[]}t.exports=n},{}],523:[function(e,t,r){function n(){return!1}t.exports=n},{}],524:[function(e,t,r){function n(e){if(!e)return 0===e?e:0;if((e=i(e))===s||e===-s){return(e<0?-1:1)*a}return e===e?e:0}var i=e("./toNumber"),s=1/0,a=1.7976931348623157e308;t.exports=n},{"./toNumber":526}],525:[function(e,t,r){function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=e("./toFinite");t.exports=n},{"./toFinite":524}],526:[function(e,t,r){function n(e){if("number"==typeof e)return e;if(s(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=l.test(e);return r||c.test(e)?p(e.slice(2),r?2:8):u.test(e)?a:+e}var i=e("./isObject"),s=e("./isSymbol"),a=NaN,o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,p=parseInt;t.exports=n},{"./isObject":505,"./isSymbol":510}],527:[function(e,t,r){function n(e){return i(e,s(e))}var i=e("./_copyObject"),s=e("./keysIn");t.exports=n},{"./_copyObject":399,"./keysIn":513}],528:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":382}],529:[function(e,t,r){function n(e){return e&&e.length?i(e):[]}var i=e("./_baseUniq");t.exports=n},{"./_baseUniq":384}],530:[function(e,t,r){function n(e){return null==e?[]:i(e,s(e))}var i=e("./_baseValues"),s=e("./keys");t.exports=n},{"./_baseValues":385,"./keys":512}],531:[function(e,t,r){function n(e,t){return t=t||{},function(r,n,i){return s(r,e,t)}}function i(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function s(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new a(t,r).match(e))}function a(e,t){if(!(this instanceof a))return new a(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==m.sep&&(e=e.split(m.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function o(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(C)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}}function u(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i<s&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}}function l(e,t){if(t||(t=this instanceof a?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:g(e)}function c(e,t){function r(){if(i){switch(i){case"*":a+=x,o=!0;break;case"?":a+=v,o=!0;break;default:a+="\\"+i}g.debug("clearStateChar %j %j",i,a),i=!1}}if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return y;if(""===e)return"";for(var i,s,a="",o=!!n.nocase,u=!1,l=[],c=[],p=!1,h=-1,d=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this,E=0,A=e.length;E<A&&(s=e.charAt(E));E++)if(this.debug("%s\t%s %s %j",e,E,a,s),u&&D[s])a+="\\"+s,u=!1;else switch(s){case"/":return!1;case"\\":r(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,E,a,s),p){this.debug(" in class"),"!"===s&&E===d+1&&(s="^"),a+=s;continue}g.debug("call clearStateChar %j",i),r(),i=s,n.noext&&r();continue;case"(":if(p){a+="(";continue}if(!i){a+="\\(";continue}l.push({type:i,start:E-1,reStart:a.length,open:b[i].open,close:b[i].close}),a+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,a),i=!1;continue;case")":if(p||!l.length){a+="\\)";continue}r(),o=!0;var C=l.pop();a+=C.close,"!"===C.type&&c.push(C),C.reEnd=a.length;continue;case"|":if(p||!l.length||u){a+="\\|",u=!1;continue}r(),a+="|";continue;case"[":if(r(),p){a+="\\"+s;continue}p=!0,d=E,h=a.length,a+=s;continue;case"]":if(E===d+1||!p){a+="\\"+s,u=!1;continue}if(p){var _=e.substring(d+1,E);try{RegExp("["+_+"]")}catch(e){var w=this.parse(_,S);a=a.substr(0,h)+"\\["+w[0]+"\\]",o=o||w[1],p=!1;continue}}o=!0,p=!1,a+=s;continue;default:r(),u?u=!1:!D[s]||"^"===s&&p||(a+="\\"),a+=s}for(p&&(_=e.substr(d+1),w=this.parse(_,S),a=a.substr(0,h)+"\\["+w[0],o=o||w[1]),C=l.pop();C;C=l.pop()){var k=a.slice(C.reStart+C.open.length);this.debug("setting tail",a,C),k=k.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",k,k,C,a);var F="*"===C.type?x:"?"===C.type?v:"\\"+C.type;o=!0,a=a.slice(0,C.reStart)+F+"\\("+k}r(),u&&(a+="\\\\");var T=!1;switch(a.charAt(0)){case".":case"[":case"(":T=!0}for(var P=c.length-1;P>-1;P--){
-var B=c[P],O=a.slice(0,B.reStart),j=a.slice(B.reStart,B.reEnd-8),N=a.slice(B.reEnd-8,B.reEnd),I=a.slice(B.reEnd);N+=I;var L=O.split("(").length-1,M=I;for(E=0;E<L;E++)M=M.replace(/\)[+*?]?/,"");I=M;var R="";""===I&&t!==S&&(R="$");a=O+j+I+R+N}if(""!==a&&o&&(a="(?=.)"+a),T&&(a=m+a),t===S)return[a,o];if(!o)return f(e);var U=n.nocase?"i":"";try{var V=new RegExp("^"+a+"$",U)}catch(e){return new RegExp("$.")}return V._glob=e,V._src=a,V}function p(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?x:t.dot?E:A,n=t.nocase?"i":"",i=e.map(function(e){return e.map(function(e){return e===y?r:"string"==typeof e?d(e):e._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp}function h(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==m.sep&&(e=e.split(m.sep).join("/")),e=e.split(C),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,s;for(s=e.length-1;s>=0&&!(i=e[s]);s--);for(s=0;s<n.length;s++){var a=n[s],o=e;r.matchBase&&1===a.length&&(o=[i]);if(this.matchOne(o,a,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}function f(e){return e.replace(/\\(.)/g,"$1")}function d(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}t.exports=s,s.Minimatch=a;var m={sep:"/"};try{m=e("path")}catch(e){}var y=s.GLOBSTAR=a.GLOBSTAR={},g=e("brace-expansion"),b={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},v="[^/]",x=v+"*?",E="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",A="(?:(?!(?:\\/|^)\\.).)*?",D=function(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}("().*{}+?[]^$\\!"),C=/\/+/;s.filter=n,s.defaults=function(e){if(!e||!Object.keys(e).length)return s;var t=s,r=function(r,n,s){return t.minimatch(r,n,i(e,s))};return r.Minimatch=function(r,n){return new t.Minimatch(r,i(e,n))},r},a.defaults=function(e){return e&&Object.keys(e).length?s.defaults(e).Minimatch:a},a.prototype.debug=function(){},a.prototype.make=o,a.prototype.parseNegate=u,s.braceExpand=function(e,t){return l(e,t)},a.prototype.braceExpand=l,a.prototype.parse=c;var S={};s.makeRe=function(e,t){return new a(e,t||{}).makeRe()},a.prototype.makeRe=p,s.match=function(e,t,r){r=r||{};var n=new a(t,r);return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},a.prototype.match=h,a.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,a=e.length,o=t.length;i<a&&s<o;i++,s++){this.debug("matchOne loop");var u=t[s],l=e[i];if(this.debug(t,u,l),!1===u)return!1;if(u===y){this.debug("GLOBSTAR",[t,u,l]);var c=i,p=s+1;if(p===o){for(this.debug("** at the end");i<a;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;c<a;){var h=e[c];if(this.debug("\nglobstar while",e,c,t,p,h),this.matchOne(e.slice(c),t.slice(p),r))return this.debug("globstar found match!",c,a,h),!0;if("."===h||".."===h||!n.dot&&"."===h.charAt(0)){this.debug("dot detected!",e,c,t,p);break}this.debug("globstar swallow a segment, and continue"),c++}return!(!r||(this.debug("\n>>> no match, partial?",e,c,t,p),c!==a))}var f;if("string"==typeof u?(f=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,f)):(f=l.match(u),this.debug("pattern match",u,l,f)),!f)return!1}if(i===a&&s===o)return!0;if(i===a)return r;if(s===o){return i===a-1&&""===e[i]}throw new Error("wtf?")}},{"brace-expansion":180,path:535}],532:[function(e,t,r){function n(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*p;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*l;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=c?Math.round(e/c)+"d":e>=l?Math.round(e/l)+"h":e>=u?Math.round(e/u)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function s(e){return a(e,c,"day")||a(e,l,"hour")||a(e,u,"minute")||a(e,o,"second")||e+" ms"}function a(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var o=1e3,u=60*o,l=60*u,c=24*l,p=365.25*c;t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?s(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],533:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!==e}},{}],534:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n"},{}],535:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};r.resolve=function(){for(var r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),s="/"===a(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),s=n(t.split("/")),a=Math.min(i.length,s.length),o=a,u=0;u<a;u++)if(i[u]!==s[u]){o=u;break}for(var l=[],u=o;u<i.length;u++)l.push("..");return l=l.concat(s.slice(o)),l.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=s(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=s(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return s(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:539}],536:[function(e,t,r){(function(e){"use strict";function r(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=t.exec(e),n=r[1]||"",i=Boolean(n&&":"!==n.charAt(1));return Boolean(r[2]||i)}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,e("_process"))},{_process:539}],537:[function(e,t,r){"use strict";function n(e,t,r){if(p)try{p.call(c,e,t,{value:r})}catch(n){e[t]=r}else e[t]=r}function i(e){return e&&(n(e,"call",e.call),n(e,"apply",e.apply)),e}function s(e){return h?h.call(c,e):(y.prototype=e||null,new y)}function a(){do{var e=o(m.call(d.call(g(),36),2))}while(f.call(b,e));return b[e]=e}function o(e){var t={};return t[e]=!0,Object.keys(t)[0]}function u(e){return s(null)}function l(e){function t(t){function r(r,n){if(r===o)return n?s=null:s||(s=e(t))}var s;n(t,i,r)}function r(e){return f.call(e,i)||t(e),e[i](o)}var i=a(),o=s(null);return e=e||u,r.forget=function(e){f.call(e,i)&&e[i](o,!0)},r}var c=Object,p=Object.defineProperty,h=Object.create;i(p),i(h);var f=i(Object.prototype.hasOwnProperty),d=i(Number.prototype.toString),m=i(String.prototype.slice),y=function(){},g=Math.random,b=s(null);r.makeUniqueKey=a;var v=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=v(e),r=0,n=0,i=t.length;r<i;++r)f.call(b,t[r])||(r>n&&(t[n]=t[r]),++n);return t.length=n,t},r.makeAccessor=l},{}],538:[function(e,t,r){(function(e){"use strict";function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(s=new Array(o-1),a=0;a<s.length;)s[a++]=arguments[a];return e.nextTick(function(){t.apply(null,s)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(this,e("_process"))},{_process:539}],539:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(p===setTimeout)return setTimeout(e,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function a(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function o(){y&&d&&(y=!1,d.length?m=d.concat(m):g=-1,m.length&&u())}function u(){if(!y){var e=s(o);y=!0;for(var t=m.length;t;){for(d=m,m=[];++g<t;)d&&d[g].run();g=-1,t=m.length}d=null,y=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var p,h,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(e){p=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,m=[],y=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];m.push(new l(e,t)),1!==m.length||y||s(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],540:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":541}],541:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);l.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||o(s,this)}function s(e){e.end()}var a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=n;var o=e("process-nextick-args"),u=e("core-util-is");u.inherits=e("inherits");var l=e("./_stream_readable"),c=e("./_stream_writable");u.inherits(n,l);for(var p=a(c.prototype),h=0;h<p.length;h++){var f=p[h];n.prototype[f]||(n.prototype[f]=c.prototype[f])}},{"./_stream_readable":543,"./_stream_writable":545,"core-util-is":294,inherits:306,"process-nextick-args":538}],542:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}t.exports=n;var i=e("./_stream_transform"),s=e("core-util-is");s.inherits=e("inherits"),s.inherits(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":544,"core-util-is":294,inherits:306}],543:[function(e,t,r){(function(r){"use strict";function n(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?P(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function i(t,r){F=F||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof F&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new U,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(R||(R=e("string_decoder/").StringDecoder),this.decoder=new R(t.encoding),this.encoding=t.encoding)}function s(t){if(F=F||e("./_stream_duplex"),!(this instanceof s))return new s(t);this._readableState=new i(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),B.call(this)}function a(e,t,r,n,i){var s=c(t,r);if(s)e.emit("error",s);else if(null===r)t.reading=!1,p(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var l;!t.decoder||i||n||(r=t.decoder.write(r),l=!t.objectMode&&0===r.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h(e))),d(e,t)}else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function u(e){return e>=V?e=V:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function c(e,t){var r=null;return j.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(M("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?T(f,e):f(e))}function f(e){M("emit readable"),e.emit("readable"),x(e)}function d(e,t){t.readingMore||(t.readingMore=!0,T(m,e,t))}function m(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(M("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function y(e){return function(){var t=e._readableState;M("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&O(e,"data")&&(t.flowing=!0,x(e))}}function g(e){M("readable nexttick read 0"),e.read(0)}function b(e,t){t.resumeScheduled||(t.resumeScheduled=!0,T(v,e,t))}function v(e,t){t.reading||(M("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(M("flow",t.flowing);t.flowing&&null!==e.read(););}function E(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=A(e,t.buffer,t.decoder),r}function A(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?D(e,t):C(e,t),n}function D(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}function C(e,t){var r=N.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}function S(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,T(_,t,e))}function _(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function w(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function k(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}t.exports=s;var F,T=e("process-nextick-args"),P=e("isarray");s.ReadableState=i;var B,O=(e("events").EventEmitter,function(e,t){return e.listeners(t).length});!function(){try{B=e("stream")}catch(e){}finally{B||(B=e("events").EventEmitter)}}();var j=e("buffer").Buffer,N=e("buffer-shims"),I=e("core-util-is");I.inherits=e("inherits");var L=e("util"),M=void 0;M=L&&L.debuglog?L.debuglog("stream"):function(){};var R,U=e("./internal/streams/BufferList");I.inherits(s,B),s.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=N.from(e,t),t=""),a(this,r,e,t,!1)},s.prototype.unshift=function(e){return a(this,this._readableState,e,"",!0)},s.prototype.isPaused=function(){return!1===this._readableState.flowing},s.prototype.setEncoding=function(t){return R||(R=e("string_decoder/").StringDecoder),this._readableState.decoder=new R(t),this._readableState.encoding=t,this};var V=8388608;s.prototype.read=function(e){M("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return M("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?S(this):h(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&S(this),null;var n=t.needReadable;M("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,M("length less than watermark",n)),t.ended||t.reading?(n=!1,M("reading or ended",n)):n&&(M("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=l(r,t)));var i;return i=e>0?E(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&S(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},s.prototype.pipe=function(e,t){function i(e){M("onunpipe"),e===h&&a()}function s(){M("onend"),e.end()}function a(){M("cleanup"),e.removeListener("close",l),e.removeListener("finish",c),e.removeListener("drain",g),e.removeListener("error",u),e.removeListener("unpipe",i),h.removeListener("end",s),h.removeListener("end",a),h.removeListener("data",o),b=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function o(t){M("ondata"),v=!1,!1!==e.write(t)||v||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&-1!==k(f.pipes,e))&&!b&&(M("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,v=!0),h.pause())}function u(t){M("onerror",t),p(),e.removeListener("error",u),0===O(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",c),p()}function c(){M("onfinish"),e.removeListener("close",l),p()}function p(){M("unpipe"),h.unpipe(e)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,M("pipe count=%d opts=%j",f.pipesCount,t);var d=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,m=d?s:a;f.endEmitted?T(m):h.once("end",m),e.on("unpipe",i);var g=y(h);e.on("drain",g);var b=!1,v=!1;return h.on("data",o),n(e,"error",u),e.once("close",l),e.once("finish",c),e.emit("pipe",h),f.flowing||(M("pipe resume"),h.resume()),e},s.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var s=k(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},s.prototype.on=function(e,t){var r=B.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&h(this):T(g,this))}return r},s.prototype.addListener=s.prototype.on,s.prototype.resume=function(){var e=this._readableState;return e.flowing||(M("resume"),e.flowing=!0,b(this,e)),this},s.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this},s.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(M("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(M("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){n.push(i)||(r=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return w(["error","close","destroy","pause","resume"],function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){M("wrapped _read",t),r&&(r=!1,e.resume())},n},s._fromList=E}).call(this,e("_process"))},{"./_stream_duplex":541,"./internal/streams/BufferList":546,_process:539,buffer:184,"buffer-shims":183,"core-util-is":294,events:301,inherits:306,isarray:310,"process-nextick-args":538,"string_decoder/":591,util:181}],544:[function(e,t,r){"use strict";function n(e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);o.call(this,e),this._transformState=new n(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,r){a(t,e,r)}):a(t)})}function a(e,t,r){if(t)return e.emit("error",t);null!==r&&void 0!==r&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=s;var o=e("./_stream_duplex"),u=e("core-util-is");u.inherits=e("inherits"),u.inherits(s,o),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":541,"core-util-is":294,inherits:306}],545:[function(e,t,r){(function(r){"use strict";function n(){}function i(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function s(t,r){D=D||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof D&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){d(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new A(this)}function a(t){if(D=D||e("./_stream_duplex"),!(P.call(a,this)||this instanceof D))return new a(t);this._writableState=new s(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),w.call(this)}function o(e,t){var r=new Error("write after end");e.emit("error",r),C(t,r)}function u(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),C(n,s),i=!1),i}function l(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=T.from(t,r)),t}function c(e,t,r,n,s,a){r||(n=l(t,n,s),F.isBuffer(n)&&(s="buffer"));var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new i(n,s,a),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,o,n,s,a);return u}function p(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function h(e,t,r,n,i){--t.pendingcb,r?C(i,n):i(n),e._writableState.errorEmitted=!0,e.emit("error",n)}function f(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function d(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(f(r),t)h(e,r,n,t,i);else{var s=b(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||g(e,r),n?S(m,e,r,s,i):m(e,r,s,i)}}function m(e,t,r,n){r||y(e,t),t.pendingcb--,n(),x(e,t)}function y(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function g(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0;r;)i[a]=r,r=r.next,a+=1;p(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new A(t)}else{for(;r;){var o=r.chunk,u=r.encoding,l=r.callback;if(p(e,t,!1,t.objectMode?1:o.length,o,u,l),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function x(e,t){var r=b(t);return r&&(0===t.pendingcb?(v(e,t),t.finished=!0,e.emit("finish")):v(e,t)),r}function E(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?C(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function A(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=a;var D,C=e("process-nextick-args"),S=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:C;a.WritableState=s;var _=e("core-util-is");_.inherits=e("inherits");var w,k={deprecate:e("util-deprecate")};!function(){try{w=e("stream")}catch(e){}finally{w||(w=e("events").EventEmitter)}}();var F=e("buffer").Buffer,T=e("buffer-shims");_.inherits(a,w),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:k.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(e){return!!P.call(this,e)||e&&e._writableState instanceof s}})):P=function(e){return e instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(e,t,r){var i=this._writableState,s=!1,a=F.isBuffer(e);return"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?o(this,r):(a||u(this,i,e,r))&&(i.pendingcb++,s=c(this,i,a,e,t,r)),s},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},a.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},a.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||E(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":541,_process:539,buffer:184,"buffer-shims":183,"core-util-is":294,events:301,inherits:306,"process-nextick-args":538,"util-deprecate":598}],546:[function(e,t,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=n,n.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},n.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},n.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.prototype.concat=function(e){if(0===this.length)return i.alloc(0)
-;if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t}},{buffer:184,"buffer-shims":183}],547:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":542}],548:[function(e,t,r){(function(n){var i=function(){try{return e("stream")}catch(e){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=i||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":541,"./lib/_stream_passthrough.js":542,"./lib/_stream_readable.js":543,"./lib/_stream_transform.js":544,"./lib/_stream_writable.js":545,_process:539}],549:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":544}],550:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":545}],551:[function(e,t,r){function n(e,t,r){if(e){if(x.fixFaultyLocations(e,t),r){if(d.Node.check(e)&&d.SourceLocation.check(e.loc)){for(var i=r.length-1;i>=0&&!(E(r[i].loc.end,e.loc.start)<=0);--i);return void r.splice(i+1,0,e)}}else if(e[A])return e[A];var s;if(m.check(e))s=Object.keys(e);else{if(!y.check(e))return;s=f.getFieldNames(e)}r||Object.defineProperty(e,A,{value:r=[],enumerable:!1});for(var i=0,a=s.length;i<a;++i)n(e[s[i]],t,r);return r}}function i(e,t,r){for(var s=n(e,r),a=0,o=s.length;a<o;){var u=a+o>>1,l=s[u];if(E(l.loc.start,t.loc.start)<=0&&E(t.loc.end,l.loc.end)<=0)return void i(t.enclosingNode=l,t,r);if(E(l.loc.end,t.loc.start)<=0){var c=l;a=u+1}else{if(!(E(t.loc.end,l.loc.start)<=0))throw new Error("Comment location overlaps with node location");var p=l;o=u}}c&&(t.precedingNode=c),p&&(t.followingNode=p)}function s(e,t){var r=e.length;if(0!==r){for(var n=e[0].precedingNode,i=e[0].followingNode,s=i.loc.start,a=r;a>0;--a){var u=e[a-1];h.strictEqual(u.precedingNode,n),h.strictEqual(u.followingNode,i);var c=t.sliceString(u.loc.end,s);if(/\S/.test(c))break;s=u.loc.start}for(;a<=r&&(u=e[a])&&("Line"===u.type||"CommentLine"===u.type)&&u.loc.start.column>i.loc.start.column;)++a;e.forEach(function(e,t){t<a?l(n,e):o(i,e)}),e.length=0}}function a(e,t){(e.comments||(e.comments=[])).push(t)}function o(e,t){t.leading=!0,t.trailing=!1,a(e,t)}function u(e,t){t.leading=!1,t.trailing=!1,a(e,t)}function l(e,t){t.leading=!1,t.trailing=!0,a(e,t)}function c(e,t){var r=e.getValue();d.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[t(e)];if(r.trailing)s.push("\n");else if(i instanceof b){var a=i.slice(n.end,i.skipSpaces(n.end));1===a.length?s.push(a):s.push(new Array(a.length).join("\n"))}else s.push("\n");return v(s)}function p(e,t){var r=e.getValue(e);d.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[];if(i instanceof b){var a=i.skipSpaces(n.start,!0)||i.firstPos(),o=i.slice(a,n.start);1===o.length?s.push(o):s.push(new Array(o.length).join("\n"))}return s.push(t(e)),v(s)}var h=e("assert"),f=e("./types"),d=f.namedTypes,m=f.builtInTypes.array,y=f.builtInTypes.object,g=e("./lines"),b=(g.fromString,g.Lines),v=g.concat,x=e("./util"),E=x.comparePos,A=e("private").makeUniqueKey();r.attach=function(e,t,r){if(m.check(e)){var n=[];e.forEach(function(e){e.loc.lines=r,i(t,e,r);var a=e.precedingNode,c=e.enclosingNode,p=e.followingNode;if(a&&p){var f=n.length;if(f>0){var d=n[f-1];h.strictEqual(d.precedingNode===e.precedingNode,d.followingNode===e.followingNode),d.followingNode!==e.followingNode&&s(n,r)}n.push(e)}else if(a)s(n,r),l(a,e);else if(p)s(n,r),o(p,e);else{if(!c)throw new Error("AST contains no nodes at all?");s(n,r),u(c,e)}}),s(n,r),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}},r.printComments=function(e,t){var r=e.getValue(),n=t(e),i=d.Node.check(r)&&f.getFieldValue(r,"comments");if(!i||0===i.length)return n;var s=[],a=[n];return e.each(function(e){var n=e.getValue(),i=f.getFieldValue(n,"leading"),o=f.getFieldValue(n,"trailing");i||o&&!d.Statement.check(r)&&"Block"!==n.type&&"CommentBlock"!==n.type?s.push(c(e,t)):o&&a.push(p(e,t))},"comments"),s.push.apply(s,a),v(s)}},{"./lines":553,"./types":559,"./util":560,assert:3,private:537}],552:[function(e,t,r){function n(e){o.ok(this instanceof n),this.stack=[e]}function i(e,t){for(var r=e.stack,n=r.length-1;n>=0;n-=2){var i=r[n];if(l.Node.check(i)&&--t<0)return i}return null}function s(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function a(e){return!!l.CallExpression.check(e)||(c.check(e)?e.some(a):!!l.Node.check(e)&&u.someField(e,function(e,t){return a(t)}))}var o=e("assert"),u=e("./types"),l=u.namedTypes,c=(l.Node,u.builtInTypes.array),p=u.builtInTypes.number,h=n.prototype;t.exports=n,n.from=function(e){if(e instanceof n)return e.copy();if(e instanceof u.NodePath){for(var t,r=Object.create(n.prototype),i=[e.value];t=e.parentPath;e=t)i.push(e.name,t.value);return r.stack=i.reverse(),r}return new n(e)},h.copy=function(){var e=Object.create(n.prototype);return e.stack=this.stack.slice(0),e},h.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},h.getValue=function(){var e=this.stack;return e[e.length-1]},h.getNode=function(e){return i(this,~~e)},h.getParentNode=function(e){return i(this,1+~~e)},h.getRootValue=function(){var e=this.stack;return e.length%2==0?e[1]:e[0]},h.call=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}var o=e(this);return t.length=r,o},h.each=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}for(var s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),e(this),t.length-=2);t.length=r},h.map=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}for(var o=new Array(n.length),s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),o[s]=e(this,s),t.length-=2);return t.length=r,o},h.needsParens=function(e){var t=this.getParentNode();if(!t)return!1;var r=this.getName(),n=this.getNode();if(this.getValue()!==n)return!1;if(l.Statement.check(n))return!1;if("Identifier"===n.type)return!1;if("ParenthesizedExpression"===t.type)return!1;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===t.type&&"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":switch(t.type){case"CallExpression":return"callee"===r&&t.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":var i=t.operator,u=f[i],c=n.operator,h=f[c];if(u>h)return!0;if(u===h&&"right"===r)return o.strictEqual(t.right,n),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==r;default:return!0}case"YieldExpression":switch(t.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"NullableTypeAnnotation"===t.type;case"Literal":return"MemberExpression"===t.type&&p.check(n.value)&&"object"===r&&t.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===r&&t.callee===n;case"ConditionalExpression":return"test"===r&&t.test===n;case"MemberExpression":return"object"===r&&t.object===n;default:return!1}case"ArrowFunctionExpression":return!(!l.CallExpression.check(t)||"callee"!==r)||(!(!l.MemberExpression.check(t)||"object"!==r)||s(t));case"ObjectExpression":if("ArrowFunctionExpression"===t.type&&"body"===r)return!0;default:if("NewExpression"===t.type&&"callee"===r&&t.callee===n)return a(n)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var f={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%","**"]].forEach(function(e,t){e.forEach(function(e){f[e]=t})}),h.canBeFirstInStatement=function(){var e=this.getNode();return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},h.firstInStatement=function(){for(var e,t,r,n,i=this.stack,a=i.length-1;a>=0;a-=2)if(l.Node.check(i[a])&&(r=e,n=t,e=i[a-1],t=i[a]),t&&n){if(l.BlockStatement.check(t)&&"body"===e&&0===r)return o.strictEqual(t.body[0],n),!0;if(l.ExpressionStatement.check(t)&&"expression"===r)return o.strictEqual(t.expression,n),!0;if(l.SequenceExpression.check(t)&&"expressions"===e&&0===r)o.strictEqual(t.expressions[0],n);else if(l.CallExpression.check(t)&&"callee"===r)o.strictEqual(t.callee,n);else if(l.MemberExpression.check(t)&&"object"===r)o.strictEqual(t.object,n);else if(l.ConditionalExpression.check(t)&&"test"===r)o.strictEqual(t.test,n);else if(s(t)&&"left"===r)o.strictEqual(t.left,n);else{if(!l.UnaryExpression.check(t)||t.prefix||"argument"!==r)return!1;o.strictEqual(t.argument,n)}}return!0}},{"./types":559,assert:3}],553:[function(e,t,r){function n(e){return e[f]}function i(e,t){c.ok(this instanceof i),c.ok(e.length>0),t?m.assert(t):t=null,Object.defineProperty(this,f,{value:{infos:e,mappings:[],name:t,cachedSourceMap:null}}),t&&n(this).mappings.push(new g(this,{start:this.firstPos(),end:this.lastPos()}))}function s(e){return{line:e.line,indent:e.indent,locked:e.locked,sliceStart:e.sliceStart,sliceEnd:e.sliceEnd}}function a(e,t){for(var r=0,n=e.length,i=0;i<n;++i)switch(e.charCodeAt(i)){case 9:c.strictEqual(typeof t,"number"),c.ok(t>0);var s=Math.ceil(r/t)*t;s===r?r+=t:r=s;break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1}return r}function o(e,t){if(e instanceof i)return e;e+="";var r=t&&t.tabWidth,n=e.indexOf("\t")<0,s=!(!t||!t.locked),o=!t&&n&&e.length<=E;if(c.ok(r||n,"No tab width specified but encountered tabs in string\n"+e),o&&x.call(v,e))return v[e];var u=new i(e.split(D).map(function(e){var t=A.exec(e)[0];return{line:e,indent:a(t,r),locked:s,sliceStart:t.length,sliceEnd:e.length}}),h(t).sourceFileName);return o&&(v[e]=u),u}function u(e){return!/\S/.test(e)}function l(e,t,r){var n=e.sliceStart,i=e.sliceEnd,s=Math.max(e.indent,0),a=s+i-n;return void 0===r&&(r=a),t=Math.max(t,0),r=Math.min(r,a),r=Math.max(r,t),r<s?(s=r,i=n):i-=a-r,a=r,a-=t,t<s?s-=t:(t-=s,s=0,n+=t),c.ok(s>=0),c.ok(n<=i),c.strictEqual(a,s+i-n),e.indent===s&&e.sliceStart===n&&e.sliceEnd===i?e:{line:e.line,indent:s,locked:!1,sliceStart:n,sliceEnd:i}}var c=e("assert"),p=e("source-map"),h=e("./options").normalize,f=e("private").makeUniqueKey(),d=e("./types"),m=d.builtInTypes.string,y=e("./util").comparePos,g=e("./mapping");r.Lines=i;var b=i.prototype;Object.defineProperties(b,{length:{get:function(){return n(this).infos.length}},name:{get:function(){return n(this).name}}});var v={},x=v.hasOwnProperty,E=10;r.countSpaces=a;var A=/^\s*/,D=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;r.fromString=o,b.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},b.getSourceMap=function(e,t){function r(r){return r=r||{},m.assert(e),r.file=e,t&&(m.assert(t),r.sourceRoot=t),r}if(!e)return null;var i=this,s=n(i);if(s.cachedSourceMap)return r(s.cachedSourceMap.toJSON());var a=new p.SourceMapGenerator(r()),o={};return s.mappings.forEach(function(e){for(var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=i.skipSpaces(e.targetLoc.start)||i.lastPos();y(t,e.sourceLoc.end)<0&&y(r,e.targetLoc.end)<0;){var n=e.sourceLines.charAt(t),s=i.charAt(r);c.strictEqual(n,s);var u=e.sourceLines.name;if(a.addMapping({source:u,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column}}),!x.call(o,u)){var l=e.sourceLines.toString();a.setSourceContent(u,l),o[u]=l}i.nextPos(r,!0),e.sourceLines.nextPos(t,!0)}}),s.cachedSourceMap=a,a.toJSON()},b.bootstrapCharAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,n=this.toString().split(D),i=n[t-1];return void 0===i?"":r===i.length&&t<n.length?"\n":r>=i.length?"":i.charAt(r)},b.charAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=n(this),s=i.infos,a=s[t-1],o=r;if(void 0===a||o<0)return"";var u=this.getIndentAt(t);return o<u?" ":(o+=a.sliceStart-u,o===a.sliceEnd&&t<this.length?"\n":o>=a.sliceEnd?"":a.line.charAt(o))},b.stripMargin=function(e,t){if(0===e)return this;if(c.ok(e>0,"negative margin: "+e),t&&1===this.length)return this;var r=n(this),a=new i(r.infos.map(function(r,n){return r.line&&(n>0||!t)&&(r=s(r),r.indent=Math.max(0,r.indent-e)),r}));if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){o.push(r.indent(e,t,!0))})}return a},b.indent=function(e){if(0===e)return this;var t=n(this),r=new i(t.infos.map(function(t){return t.line&&!t.locked&&(t=s(t),t.indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e))})}return r},b.indentTail=function(e){if(0===e)return this;if(this.length<2)return this;var t=n(this),r=new i(t.infos.map(function(t,r){return r>0&&t.line&&!t.locked&&(t=s(t),t.indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e,!0))})}return r},b.lockIndentTail=function(){return this.length<2?this:new i(n(this).infos.map(function(e,t){return e=s(e),e.locked=t>0,e}))},b.getIndentAt=function(e){c.ok(e>=1,"no line "+e+" (line numbers start from 1)");var t=n(this),r=t.infos[e-1];return Math.max(r.indent,0)},b.guessTabWidth=function(){var e=n(this);if(x.call(e,"cachedTabWidth"))return e.cachedTabWidth;for(var t=[],r=0,i=1,s=this.length;i<=s;++i){var a=e.infos[i-1];if(!u(a.line.slice(a.sliceStart,a.sliceEnd))){var o=Math.abs(a.indent-r);t[o]=1+~~t[o],r=a.indent}}for(var l=-1,c=2,p=1;p<t.length;p+=1)x.call(t,p)&&t[p]>l&&(l=t[p],c=p);return e.cachedTabWidth=c},b.startsWithComment=function(){var e=n(this);if(0===e.infos.length)return!1;var t=e.infos[0],r=t.sliceStart,i=t.sliceEnd,s=t.line.slice(r,i).trim();return 0===s.length||"//"===s.slice(0,2)||"/*"===s.slice(0,2)},b.isOnlyWhitespace=function(){return u(this.toString())},b.isPrecededOnlyByWhitespace=function(e){var t=n(this),r=t.infos[e.line-1],i=Math.max(r.indent,0),s=e.column-i;if(s<=0)return!0;var a=r.sliceStart,o=Math.min(a+s,r.sliceEnd);return u(r.line.slice(a,o))},b.getLineLength=function(e){var t=n(this),r=t.infos[e-1];return this.getIndentAt(e)+r.sliceEnd-r.sliceStart},b.nextPos=function(e,t){var r=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(r)?(e.column+=1,!t||!!this.skipSpaces(e,!1,!0)):r<this.length&&(e.line+=1,e.column=0,!t||!!this.skipSpaces(e,!1,!0))},b.prevPos=function(e,t){var r=e.line,n=e.column;if(n<1){if((r-=1)<1)return!1;n=this.getLineLength(r)}else n=Math.min(n-1,this.getLineLength(r));return e.line=r,e.column=n,!t||!!this.skipSpaces(e,!0,!0)},b.firstPos=function(){return{line:1,column:0}},b.lastPos=function(){return{line:this.length,column:this.getLineLength(this.length)}},b.skipSpaces=function(e,t,r){if(e=e?r?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!u(this.charAt(e))&&this.nextPos(e))return e;return null}for(;u(this.charAt(e));)if(!this.nextPos(e))return null;return e},b.trimLeft=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):C},b.trimRight=function(){var e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):C},b.trim=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);if(null===e)return C;var t=this.skipSpaces(this.lastPos(),!0,!0);return c.notStrictEqual(t,null),this.slice(e,t)},b.eachPos=function(e,t,r){var n=this.firstPos();if(t&&(n.line=t.line,n.column=t.column),!r||this.skipSpaces(n,!1,!0))do{e.call(this,n)}while(this.nextPos(n,r))},b.bootstrapSlice=function(e,t){var r=this.toString().split(D).slice(e.line-1,t.line);return r.push(r.pop().slice(0,t.column)),r[0]=r[0].slice(e.column),o(r.join("\n"))},b.slice=function(e,t){if(!t){if(!e)return this;t=this.lastPos()}var r=n(this),s=r.infos.slice(e.line-1,t.line);e.line===t.line?s[0]=l(s[0],e.column,t.column):(c.ok(e.line<t.line),s[0]=l(s[0],e.column),s.push(l(s.pop(),0,t.column)));var a=new i(s);if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){var n=r.slice(this,e,t);n&&o.push(n)},this)}return a},b.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)},b.sliceString=function(e,t,r){if(!t){if(!e)return this;t=this.lastPos()}r=h(r);for(var i=n(this).infos,s=[],o=r.tabWidth,c=e.line;c<=t.line;++c){var p=i[c-1];c===e.line?p=c===t.line?l(p,e.column,t.column):l(p,e.column):c===t.line&&(p=l(p,0,t.column));var f=Math.max(p.indent,0),d=p.line.slice(0,p.sliceStart);if(r.reuseWhitespace&&u(d)&&a(d,r.tabWidth)===f)s.push(p.line.slice(0,p.sliceEnd));else{var m=0,y=f;r.useTabs&&(m=Math.floor(f/o),y-=m*o);var g="";m>0&&(g+=new Array(m+1).join("\t")),y>0&&(g+=new Array(y+1).join(" ")),g+=p.line.slice(p.sliceStart,p.sliceEnd),s.push(g)}}return s.join(r.lineTerminator)},b.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},b.join=function(e){function t(e){if(null!==e){if(a){var t=e.infos[0],r=new Array(t.indent+1).join(" "),n=c.length,i=Math.max(a.indent,0)+a.sliceEnd-a.sliceStart;a.line=a.line.slice(0,a.sliceEnd)+r+t.line.slice(t.sliceStart,t.sliceEnd),a.locked=a.locked||t.locked,a.sliceEnd=a.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){p.push(e.add(n,i))})}else e.mappings.length>0&&p.push.apply(p,e.mappings);e.infos.forEach(function(e,t){(!a||t>0)&&(a=s(e),c.push(a))})}}function r(e,r){r>0&&t(l),t(e)}var a,u=this,l=n(u),c=[],p=[];if(e.map(function(e){var t=o(e);return t.isEmpty()?null:n(t)}).forEach(u.isEmpty()?t:r),c.length<1)return C;var h=new i(c);return n(h).mappings=p,h},r.concat=function(e){return C.join(e)},b.concat=function(e){var t=arguments,r=[this];return r.push.apply(r,t),c.strictEqual(r.length,t.length+1),C.join(r)};var C=o("")},{"./mapping":554,"./options":555,"./types":559,"./util":560,assert:3,private:537,"source-map":573}],554:[function(e,t,r){function n(e,t,r){o.ok(this instanceof n),o.ok(e instanceof h.Lines),c.assert(t),r?o.ok(l.check(r.start.line)&&l.check(r.start.column)&&l.check(r.end.line)&&l.check(r.end.column)):r=t,Object.defineProperties(this,{sourceLines:{value:e},sourceLoc:{value:t},targetLoc:{value:r}})}function i(e,t,r){return{line:e.line+t-1,column:1===e.line?e.column+r:e.column}}function s(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function a(e,t,r,n,i){o.ok(e instanceof h.Lines),o.ok(r instanceof h.Lines),p.assert(t),p.assert(n),p.assert(i);var s=f(n,i);if(0===s)return t;if(s<0){var a=e.skipSpaces(t),u=r.skipSpaces(n),l=i.line-u.line;for(a.line+=l,u.line+=l,l>0?(a.column=0,u.column=0):o.strictEqual(l,0);f(u,i)<0&&r.nextPos(u,!0);)o.ok(e.nextPos(a,!0)),o.strictEqual(e.charAt(a),r.charAt(u))}else{var a=e.skipSpaces(t,!0),u=r.skipSpaces(n,!0),l=i.line-u.line;for(a.line+=l,u.line+=l,l<0?(a.column=e.getLineLength(a.line),u.column=r.getLineLength(u.line)):o.strictEqual(l,0);f(i,u)<0&&r.prevPos(u,!0);)o.ok(e.prevPos(a,!0)),o.strictEqual(e.charAt(a),r.charAt(u))}return a}var o=e("assert"),u=e("./types"),l=(u.builtInTypes.string,u.builtInTypes.number),c=u.namedTypes.SourceLocation,p=u.namedTypes.Position,h=e("./lines"),f=e("./util").comparePos,d=n.prototype;t.exports=n,d.slice=function(e,t,r){function i(n){var i=l[n],s=c[n],p=t;return"end"===n?p=r:o.strictEqual(n,"start"),a(u,i,e,s,p)}o.ok(e instanceof h.Lines),p.assert(t),r?p.assert(r):r=e.lastPos();var u=this.sourceLines,l=this.sourceLoc,c=this.targetLoc;if(f(t,c.start)<=0)if(f(c.end,r)<=0)c={start:s(c.start,t.line,t.column),end:s(c.end,t.line,t.column)};else{if(f(r,c.start)<=0)return null;l={start:l.start,end:i("end")},c={start:s(c.start,t.line,t.column),end:s(r,t.line,t.column)}}else{if(f(c.end,t)<=0)return null;f(c.end,r)<=0?(l={start:i("start"),end:l.end},c={start:{line:1,column:0},end:s(c.end,t.line,t.column)}):(l={start:i("start"),end:i("end")},c={start:{line:1,column:0},end:s(r,t.line,t.column)})}return new n(this.sourceLines,l,c)},d.add=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},d.subtract=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:s(this.targetLoc.start,e,t),end:s(this.targetLoc.end,e,t)})},d.indent=function(e,t,r){if(0===e)return this;var i=this.targetLoc,s=i.start.line,a=i.end.line;if(t&&1===s&&1===a)return this;if(i={start:i.start,end:i.end},!t||s>1){var o=i.start.column+e;i.start={line:s,column:r?Math.max(0,o):o}}if(!t||a>1){var u=i.end.column+e;i.end={line:a,column:r?Math.max(0,u):u}}return new n(this.sourceLines,this.sourceLoc,i)}},{"./lines":553,"./types":559,"./util":560,assert:3}],555:[function(e,t,r){var n={parser:e("esprima"),tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:e("os").EOL,wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0},i=n.hasOwnProperty;r.normalize=function(e){function t(t){return i.call(e,t)?e[t]:n[t]}return e=e||n,{tabWidth:+t("tabWidth"),useTabs:!!t("useTabs"),reuseWhitespace:!!t("reuseWhitespace"),lineTerminator:t("lineTerminator"),wrapColumn:Math.max(t("wrapColumn"),0),sourceFileName:t("sourceFileName"),sourceMapName:t("sourceMapName"),sourceRoot:t("sourceRoot"),inputSourceMap:t("inputSourceMap"),parser:t("esprima")||t("parser"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma"),arrayBracketSpacing:t("arrayBracketSpacing"),objectCurlySpacing:t("objectCurlySpacing"),arrowParensAlways:t("arrowParensAlways"),flowObjectCommas:t("flowObjectCommas")}}},{esprima:562,os:534}],556:[function(e,t,r){function n(e){i.ok(this instanceof n),this.lines=e,this.indent=0}var i=e("assert"),s=e("./types"),a=(s.namedTypes,s.builders),o=s.builtInTypes.object,u=s.builtInTypes.array,l=(s.builtInTypes.function,e("./patcher").Patcher,e("./options").normalize),c=e("./lines").fromString,p=e("./comments").attach,h=e("./util");r.parse=function(e,t){t=l(t);var r=c(e,t),i=r.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),s=[],o=t.parser.parse(i,{jsx:!0,loc:!0,locations:!0,range:t.range,comment:!0,onComment:s,tolerant:t.tolerant,ecmaVersion:6,sourceType:"module"});h.fixFaultyLocations(o,r),o.loc=o.loc||{start:r.firstPos(),end:r.lastPos()},o.loc.lines=r,o.loc.indent=0;var u=h.getTrueLoc(o,r);o.loc.start=u.start,o.loc.end=u.end,o.comments&&(s=o.comments,delete o.comments);var f=o;if("Program"===f.type){var f=a.file(o,t.sourceFileName||null);f.loc={lines:r,indent:0,start:r.firstPos(),end:r.lastPos()}}else"File"===f.type&&(o=f.program);return p(s,o.body.length?f.program:f,r),new n(r).copy(f)},n.prototype.copy=function(e){if(u.check(e))return e.map(this.copy,this);if(!o.check(e))return e;h.fixFaultyLocations(e,this.lines);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}}),r=e.loc,n=this.indent,i=n;r&&(("Block"===e.type||"Line"===e.type||"CommentBlock"===e.type||"CommentLine"===e.type||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.indent=i);for(var s=Object.keys(e),a=s.length,l=0;l<a;++l){var c=s[l];"loc"===c?t[c]=e[c]:"tokens"===c&&"File"===e.type?t[c]=e[c]:t[c]=this.copy(e[c])}return this.indent=n,t}},{"./comments":551,"./lines":553,"./options":555,"./patcher":557,"./types":559,"./util":560,assert:3}],557:[function(e,t,r){function n(e){m.ok(this instanceof n),m.ok(e instanceof y.Lines);var t=this,r=[];t.replace=function(e,t){w.check(t)&&(t=y.fromString(t)),r.push({lines:t,start:e.start,end:e.end})},t.get=function(t){function n(t,r){m.ok(D(t,r)<=0),s.push(e.slice(t,r))}t=t||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};var i=t.start,s=[];return r.sort(function(e,t){return D(e.start,t.start)}).forEach(function(e){D(i,e.start)>0||(n(i,e.start),s.push(e.lines),i=e.end)}),n(i,t.end),y.concat(s)}}function i(e){var t=[];return e.comments&&e.comments.length>0&&e.comments.forEach(function(e){(e.leading||e.trailing)&&t.push(e)}),t}function s(e,t,r){var n=A.copyPos(t.start),i=e.prevPos(n)&&e.charAt(n),s=r.charAt(r.firstPos());return i&&k.test(i)&&s&&k.test(s)}function a(e,t,r){var n=e.charAt(t.end),i=r.lastPos(),s=r.prevPos(i)&&r.charAt(i);return s&&k.test(s)&&n&&k.test(n)}function o(e,t){var r=e.getValue();b.assert(r);var n=r.original;if(b.assert(n),m.deepEqual(t,[]),r.type!==n.type)return!1;var i=new C(n),s=d(e,i,t);return s||(t.length=0),s}function u(e,t,r){var n=e.getValue();return n===t.getValue()||(_.check(n)?l(e,t,r):!!S.check(n)&&c(e,t,r))}function l(e,t,r){var n=e.getValue(),i=t.getValue();_.assert(n);var s=n.length;if(!_.check(i)||i.length!==s)return!1;for(var a=0;a<s;++a){e.stack.push(a,n[a]),t.stack.push(a,i[a]);var o=u(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!o)return!1}return!0}function c(e,t,r){var n=e.getValue();if(S.assert(n),null===n.original)return!1;var i=t.getValue();if(!S.check(i))return!1;if(b.check(n)){if(!b.check(i))return!1;if(n.type===i.type){var s=[];if(d(e,t,s))r.push.apply(r,s);else{if(!i.loc)return!1;r.push({oldPath:t.copy(),newPath:e.copy()})}return!0}return!!(v.check(n)&&v.check(i)&&i.loc)&&(r.push({oldPath:t.copy(),newPath:e.copy()}),!0)}return d(e,t,r)}function p(e){var t=e.getValue(),r=t.loc,n=r&&r.lines;if(n){var i=T;for(i.line=r.start.line,i.column=r.start.column;n.prevPos(i);){var s=n.charAt(i);if("("===s)return D(e.getRootValue().loc.start,i)<=0;if(P.test(s))return!1}}return!1}function h(e){var t=e.getValue(),r=t.loc,n=r&&r.lines;if(n){var i=T;i.line=r.end.line,i.column=r.end.column;do{var s=n.charAt(i);if(")"===s)return D(i,e.getRootValue().loc.end)<=0;if(P.test(s))return!1}while(n.nextPos(i))}return!1}function f(e){return p(e)&&h(e)}function d(e,t,r){var n=e.getValue(),i=t.getValue();if(S.assert(n),S.assert(i),null===n.original)return!1;if(!e.canBeFirstInStatement()&&e.firstInStatement()&&!p(t))return!1;if(e.needsParens(!0)&&!f(t))return!1;var s=A.getUnionOfKeys(i,n);"File"!==i.type&&"File"!==n.type||delete s.tokens,delete s.loc;var a=r.length;for(var o in s){e.stack.push(o,g.getFieldValue(n,o)),t.stack.push(o,g.getFieldValue(i,o));var l=u(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!l)return!1}return!(x.check(e.getNode())&&r.length>a)}var m=e("assert"),y=e("./lines"),g=e("./types"),b=(g.getFieldValue,g.namedTypes.Printable),v=g.namedTypes.Expression,x=g.namedTypes.ReturnStatement,E=g.namedTypes.SourceLocation,A=e("./util"),D=A.comparePos,C=e("./fast-path"),S=g.builtInTypes.object,_=g.builtInTypes.array,w=g.builtInTypes.string,k=/[0-9a-z_$]/i;r.Patcher=n;var F=n.prototype;F.tryToReprintComments=function(e,t,r){var n=this;if(!e.comments&&!t.comments)return!0;var s=C.from(e),a=C.from(t);s.stack.push("comments",i(e)),a.stack.push("comments",i(t));var o=[],u=l(s,a,o);return u&&o.length>0&&o.forEach(function(e){var t=e.oldPath.getValue();m.ok(t.leading||t.trailing),n.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))}),u},F.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach(function(r){r.leading?t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&t.replace({start:e.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})}},r.getReprinter=function(e){m.ok(e instanceof C);var t=e.getValue();if(b.check(t)){var r=t.original,i=r&&r.loc,u=i&&i.lines,l=[];if(u&&o(e,l))return function(e){var t=new n(u);return l.forEach(function(r){var n=r.newPath.getValue(),i=r.oldPath.getValue();E.assert(i.loc,!0);var o=!t.tryToReprintComments(n,i,e);o&&t.deleteComments(i);var l=e(r.newPath,o).indentTail(i.loc.indent),c=s(u,i.loc,l),p=a(u,i.loc,l);if(c||p){var h=[];c&&h.push(" "),h.push(l),p&&h.push(" "),l=y.concat(h)}t.replace(i.loc,l)}),t.get(i).indentTail(-r.loc.indent)}}};var T={line:1,column:0},P=/\S/},{"./fast-path":552,"./lines":553,"./types":559,"./util":560,assert:3}],558:[function(e,t,r){function n(e,t){D.ok(this instanceof n),B.assert(e),this.code=e,t&&(O.assert(t),this.map=t)}function i(e){function t(e){return D.ok(e instanceof j),C(e,r)}function r(e,r){if(r)return t(e);if(D.ok(e instanceof j),!c){var n=p.tabWidth,i=e.getNode().loc;if(i&&i.lines&&i.lines.guessTabWidth){p.tabWidth=i.lines.guessTabWidth();var s=o(e);return p.tabWidth=n,s}}return o(e)}function o(e){var t=F(e);return t?s(e,t(r)):u(e)}function u(e,r){return r?C(e,u):a(e,p,t)}function l(e){return a(e,p,l)}D.ok(this instanceof i);var c=e&&e.tabWidth,p=k(e);D.notStrictEqual(p,e),p.sourceFileName=null,this.print=function(e){if(!e)return M;var t=r(j.from(e),!0);return new n(t.toString(p),N.composeSourceMaps(p.inputSourceMap,t.getSourceMap(p.sourceMapName,p.sourceRoot)))},this.printGenerically=function(e){if(!e)return M;var t=j.from(e),r=p.reuseWhitespace;p.reuseWhitespace=!1;var i=new n(l(t).toString(p));return p.reuseWhitespace=r,i}}function s(e,t){return e.needsParens()?w(["(",t,")"]):t}function a(e,t,r){D.ok(e instanceof j);var n=e.getValue(),i=[],s=!1,a=o(e,t,r);return!n||a.isEmpty()?a:(n.decorators&&n.decorators.length>0&&!N.getParentExportDeclaration(e)?e.each(function(e){i.push(r(e),"\n")},"decorators"):N.isExportDeclaration(n)&&n.declaration&&n.declaration.decorators?e.each(function(e){i.push(r(e),"\n")},"declaration","decorators"):s=e.needsParens(),s&&i.unshift("("),i.push(a),s&&i.push(")"),w(i))}function o(e,t,r){var n=e.getValue();if(!n)return _("");if("string"==typeof n)return _(n,t);P.Printable.assert(n);var i=[];switch(n.type){case"File":return e.call(r,"program");case"Program":return n.directives&&e.each(function(e){i.push(r(e),";\n")},"directives"),i.push(e.call(function(e){return u(e,t,r)},"body")),w(i);case"Noop":case"EmptyStatement":return _("");case"ExpressionStatement":return w([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return w(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return _(" ").join([e.call(r,"left"),n.operator,e.call(r,"right")]);case"AssignmentPattern":return w([e.call(r,"left")," = ",e.call(r,"right")]);case"MemberExpression":i.push(e.call(r,"object"));var s=e.call(r,"property");return n.computed?i.push("[",s,"]"):i.push(".",s),w(i);case"MetaProperty":return w([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":return n.object&&i.push(e.call(r,"object")),i.push("::",e.call(r,"callee")),w(i);case"Path":return _(".").join(n.body);case"Identifier":return w([_(n.name,t),e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":return w(["...",e.call(r,"argument")]);case"FunctionDeclaration":case"FunctionExpression":return n.async&&i.push("async "),i.push("function"),n.generator&&i.push("*"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),i.push("(",f(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),w(i);case"ArrowFunctionExpression":return n.async&&i.push("async "),n.typeParameters&&i.push(e.call(r,"typeParameters")),t.arrowParensAlways||1!==n.params.length||n.rest||"Identifier"!==n.params[0].type||n.params[0].typeAnnotation||n.returnType?i.push("(",f(e,t,r),")",e.call(r,"returnType")):i.push(e.call(r,"params",0)),i.push(" => ",e.call(r,"body")),w(i);case"MethodDefinition":
-return n.static&&i.push("static "),i.push(c(e,t,r)),w(i);case"YieldExpression":return i.push("yield"),n.delegate&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),w(i);case"AwaitExpression":return i.push("await"),n.all&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),w(i);case"ModuleDeclaration":return i.push("module",e.call(r,"id")),n.source?(D.ok(!n.body),i.push("from",e.call(r,"source"))):i.push(e.call(r,"body")),_(" ").join(i);case"ImportSpecifier":return n.imported?(i.push(e.call(r,"imported")),n.local&&n.local.name!==n.imported.name&&i.push(" as ",e.call(r,"local"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),w(i);case"ExportSpecifier":return n.local?(i.push(e.call(r,"local")),n.exported&&n.exported.name!==n.local.name&&i.push(" as ",e.call(r,"exported"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),w(i);case"ExportBatchSpecifier":return _("*");case"ImportNamespaceSpecifier":return i.push("* as "),n.local?i.push(e.call(r,"local")):n.id&&i.push(e.call(r,"id")),w(i);case"ImportDefaultSpecifier":return n.local?e.call(r,"local"):e.call(r,"id");case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return m(e,t,r);case"ExportAllDeclaration":return i.push("export *"),n.exported&&i.push(" as ",e.call(r,"exported")),i.push(" from ",e.call(r,"source")),w(i);case"ExportNamespaceSpecifier":return w(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"Import":return _("import",t);case"ImportDeclaration":if(i.push("import "),n.importKind&&"value"!==n.importKind&&i.push(n.importKind+" "),n.specifiers&&n.specifiers.length>0){var a=!1;e.each(function(e){e.getName()>0&&i.push(", ");var n=e.getValue();P.ImportDefaultSpecifier.check(n)||P.ImportNamespaceSpecifier.check(n)?D.strictEqual(a,!1):(P.ImportSpecifier.assert(n),a||(a=!0,i.push(t.objectCurlySpacing?"{ ":"{"))),i.push(r(e))},"specifiers"),a&&i.push(t.objectCurlySpacing?" }":"}"),i.push(" from ")}return i.push(e.call(r,"source"),";"),w(i);case"BlockStatement":var o=e.call(function(e){return u(e,t,r)},"body");return!o.isEmpty()||n.directives&&0!==n.directives.length?(i.push("{\n"),n.directives&&e.each(function(e){i.push(r(e).indent(t.tabWidth),";",n.directives.length>1||!o.isEmpty()?"\n":"")},"directives"),i.push(o.indent(t.tabWidth)),i.push("\n}"),w(i)):_("{}");case"ReturnStatement":if(i.push("return"),n.argument){var l=e.call(r,"argument");l.startsWithComment()||l.length>1&&P.JSXElement&&P.JSXElement.check(n.argument)?i.push(" (\n",l.indent(t.tabWidth),"\n)"):i.push(" ",l)}return i.push(";"),w(i);case"CallExpression":return w([e.call(r,"callee"),h(e,t,r)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var b=!1,x="ObjectTypeAnnotation"===n.type,A=t.flowObjectCommas?",":x?";":",",C=[];x&&C.push("indexers","callProperties"),C.push("properties");var S=0;C.forEach(function(e){S+=n[e].length});var k=x&&1===S||0===S,F=n.exact?"{|":"{",T=n.exact?"|}":"}";i.push(k?F:F+"\n");var B=i.length-1,O=0;return C.forEach(function(n){e.each(function(e){var n=r(e);k||(n=n.indent(t.tabWidth));var s=!x&&n.length>1;s&&b&&i.push("\n"),i.push(n),O<S-1?(i.push(A+(s?"\n\n":"\n")),b=!s):1!==S&&x?i.push(A):!k&&N.isTrailingCommaEnabled(t,"objects")&&i.push(A),O++},n)}),i.push(k?T:"\n"+T),0!==O&&k&&t.objectCurlySpacing&&(i[B]=F+" ",i[i.length-1]=" "+T),w(i);case"PropertyPattern":return w([e.call(r,"key"),": ",e.call(r,"pattern")]);case"ObjectProperty":case"Property":if(n.method||"get"===n.kind||"set"===n.kind)return c(e,t,r);var j=e.call(r,"key");return n.computed?i.push("[",j,"]"):i.push(j),n.shorthand||i.push(": ",e.call(r,"value")),w(i);case"ClassMethod":return n.static&&i.push("static "),w([i,d(e,t,r)]);case"ObjectMethod":return d(e,t,r);case"Decorator":return w(["@",e.call(r,"expression")]);case"ArrayExpression":case"ArrayPattern":var I=n.elements,S=I.length,L=e.map(r,"elements"),M=_(", ").join(L),k=M.getLineLength(1)<=t.wrapColumn;return k?t.arrayBracketSpacing?i.push("[ "):i.push("["):i.push("[\n"),e.each(function(e){var r=e.getName();if(e.getValue()){var n=L[r];k?r>0&&i.push(" "):n=n.indent(t.tabWidth),i.push(n),(r<S-1||!k&&N.isTrailingCommaEnabled(t,"arrays"))&&i.push(","),k||i.push("\n")}else i.push(",")},"elements"),k&&t.arrayBracketSpacing?i.push(" ]"):i.push("]"),w(i);case"SequenceExpression":return _(", ").join(e.map(r,"expressions"));case"ThisExpression":return _("this");case"Super":return _("super");case"NullLiteral":return _("null");case"RegExpLiteral":return _(n.extra.raw);case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"Literal":return"string"!=typeof n.value?_(n.value,t):_(E(n.value,t),t);case"Directive":return e.call(r,"value");case"DirectiveLiteral":return _(E(n.value,t));case"ModuleSpecifier":if(n.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return _(E(n.value,t),t);case"UnaryExpression":return i.push(n.operator),/[a-z]$/.test(n.operator)&&i.push(" "),i.push(e.call(r,"argument")),w(i);case"UpdateExpression":return i.push(e.call(r,"argument"),n.operator),n.prefix&&i.reverse(),w(i);case"ConditionalExpression":return w(["(",e.call(r,"test")," ? ",e.call(r,"consequent")," : ",e.call(r,"alternate"),")"]);case"NewExpression":i.push("new ",e.call(r,"callee"));return n.arguments&&i.push(h(e,t,r)),w(i);case"VariableDeclaration":i.push(n.kind," ");var R=0,L=e.map(function(e){var t=r(e);return R=Math.max(t.length,R),t},"declarations");1===R?i.push(_(", ").join(L)):L.length>1?i.push(_(",\n").join(L).indentTail(n.kind.length+1)):i.push(L[0]);var U=e.getParentNode();return P.ForStatement.check(U)||P.ForInStatement.check(U)||P.ForOfStatement&&P.ForOfStatement.check(U)||P.ForAwaitStatement&&P.ForAwaitStatement.check(U)||i.push(";"),w(i);case"VariableDeclarator":return n.init?_(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return w(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var V=g(e.call(r,"consequent"),t),i=["if (",e.call(r,"test"),")",V];return n.alternate&&i.push(v(V)?" else":"\nelse",g(e.call(r,"alternate"),t)),w(i);case"ForStatement":var q=e.call(r,"init"),G=q.length>1?";\n":"; ",X=_(G).join([q,e.call(r,"test"),e.call(r,"update")]).indentTail("for (".length),J=w(["for (",X,")"]),W=g(e.call(r,"body"),t),i=[J];return J.length>1&&(i.push("\n"),W=W.trimLeft()),i.push(W),w(i);case"WhileStatement":return w(["while (",e.call(r,"test"),")",g(e.call(r,"body"),t)]);case"ForInStatement":return w([n.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"ForOfStatement":return w(["for (",e.call(r,"left")," of ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"ForAwaitStatement":return w(["for await (",e.call(r,"left")," of ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"DoWhileStatement":var K=w(["do",g(e.call(r,"body"),t)]),i=[K];return v(K)?i.push(" while"):i.push("\nwhile"),i.push(" (",e.call(r,"test"),");"),w(i);case"DoExpression":var z=e.call(function(e){return u(e,t,r)},"body");return w(["do {\n",z.indent(t.tabWidth),"\n}"]);case"BreakStatement":return i.push("break"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),w(i);case"ContinueStatement":return i.push("continue"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),w(i);case"LabeledStatement":return w([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":return i.push("try ",e.call(r,"block")),n.handler?i.push(" ",e.call(r,"handler")):n.handlers&&e.each(function(e){i.push(" ",r(e))},"handlers"),n.finalizer&&i.push(" finally ",e.call(r,"finalizer")),w(i);case"CatchClause":return i.push("catch (",e.call(r,"param")),n.guard&&i.push(" if ",e.call(r,"guard")),i.push(") ",e.call(r,"body")),w(i);case"ThrowStatement":return w(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return w(["switch (",e.call(r,"discriminant"),") {\n",_("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":return n.test?i.push("case ",e.call(r,"test"),":"):i.push("default:"),n.consequent.length>0&&i.push("\n",e.call(function(e){return u(e,t,r)},"consequent").indent(t.tabWidth)),w(i);case"DebuggerStatement":return _("debugger;");case"JSXAttribute":return i.push(e.call(r,"name")),n.value&&i.push("=",e.call(r,"value")),w(i);case"JSXIdentifier":return _(n.name,t);case"JSXNamespacedName":return _(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"JSXMemberExpression":return _(".").join([e.call(r,"object"),e.call(r,"property")]);case"JSXSpreadAttribute":return w(["{...",e.call(r,"argument"),"}"]);case"JSXExpressionContainer":return w(["{",e.call(r,"expression"),"}"]);case"JSXElement":var Y=e.call(r,"openingElement");if(n.openingElement.selfClosing)return D.ok(!n.closingElement),Y;var H=w(e.map(function(e){var t=e.getValue();if(P.Literal.check(t)&&"string"==typeof t.value){if(/\S/.test(t.value))return t.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(t.value))return"\n"}return r(e)},"children")).indentTail(t.tabWidth),$=e.call(r,"closingElement");return w([Y,H,$]);case"JSXOpeningElement":i.push("<",e.call(r,"name"));var Q=[];e.each(function(e){Q.push(" ",r(e))},"attributes");var Z=w(Q);return(Z.length>1||Z.getLineLength(1)>t.wrapColumn)&&(Q.forEach(function(e,t){" "===e&&(D.strictEqual(t%2,0),Q[t]="\n")}),Z=w(Q).indentTail(t.tabWidth)),i.push(Z,n.selfClosing?" />":">"),w(i);case"JSXClosingElement":return w(["</",e.call(r,"name"),">"]);case"JSXText":return _(n.value,t);case"JSXEmptyExpression":return _("");case"TypeAnnotatedIdentifier":return w([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":return 0===n.body.length?_("{}"):w(["{\n",e.call(function(e){return u(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":return i.push("static ",e.call(r,"definition")),P.MethodDefinition.check(n.definition)||i.push(";"),w(i);case"ClassProperty":n.static&&i.push("static ");var j=e.call(r,"key");return n.computed?j=w(["[",j,"]"]):"plus"===n.variance?j=w(["+",j]):"minus"===n.variance&&(j=w(["-",j])),i.push(j),n.typeAnnotation&&i.push(e.call(r,"typeAnnotation")),n.value&&i.push(" = ",e.call(r,"value")),i.push(";"),w(i);case"ClassDeclaration":case"ClassExpression":return i.push("class"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),n.superClass&&i.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters")),n.implements&&n.implements.length>0&&i.push(" implements ",_(", ").join(e.map(r,"implements"))),i.push(" ",e.call(r,"body")),w(i);case"TemplateElement":return _(n.value.raw,t).lockIndentTail();case"TemplateLiteral":var ee=e.map(r,"expressions");return i.push("`"),e.each(function(e){var t=e.getName();i.push(r(e)),t<ee.length&&i.push("${",ee[t],"}")},"quasis"),i.push("`"),w(i).lockIndentTail();case"TaggedTemplateExpression":return w([e.call(r,"tag"),e.call(r,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"TupleTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(n.type));case"CommentBlock":case"Block":return w(["/*",_(n.value,t),"*/"]);case"CommentLine":case"Line":return w(["//",_(n.value,t)]);case"TypeAnnotation":return n.typeAnnotation?("FunctionTypeAnnotation"!==n.typeAnnotation.type&&i.push(": "),i.push(e.call(r,"typeAnnotation")),w(i)):_("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return _("*",t);case"EmptyTypeAnnotation":return _("empty",t);case"AnyTypeAnnotation":return _("any",t);case"MixedTypeAnnotation":return _("mixed",t);case"ArrayTypeAnnotation":return w([e.call(r,"elementType"),"[]"]);case"BooleanTypeAnnotation":return _("boolean",t);case"BooleanLiteralTypeAnnotation":return D.strictEqual(typeof n.value,"boolean"),_(""+n.value,t);case"DeclareClass":return y(e,["class ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareFunction":return y(e,["function ",e.call(r,"id"),";"]);case"DeclareModule":return y(e,["module ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareModuleExports":return y(e,["module.exports",e.call(r,"typeAnnotation")]);case"DeclareVariable":return y(e,["var ",e.call(r,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return w(["declare ",m(e,t,r)]);case"FunctionTypeAnnotation":var te=e.getParentNode(0),re=!(P.ObjectTypeCallProperty.check(te)||P.DeclareFunction.check(e.getParentNode(2)));return re&&!P.FunctionTypeParam.check(te)&&i.push(": "),i.push("(",_(", ").join(e.map(r,"params")),")"),n.returnType&&i.push(re?" => ":": ",e.call(r,"returnType")),w(i);case"FunctionTypeParam":return w([e.call(r,"name"),n.optional?"?":"",": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return w([e.call(r,"id"),e.call(r,"typeParameters")]);case"DeclareInterface":i.push("declare ");case"InterfaceDeclaration":return i.push(_("interface ",t),e.call(r,"id"),e.call(r,"typeParameters")," "),n.extends&&i.push("extends ",_(", ").join(e.map(r,"extends"))),i.push(" ",e.call(r,"body")),w(i);case"ClassImplements":case"InterfaceExtends":return w([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return _(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return w(["?",e.call(r,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return _("null",t);case"ThisTypeAnnotation":return _("this",t);case"NumberTypeAnnotation":return _("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":var ne="plus"===n.variance?"+":"minus"===n.variance?"-":"";return w([ne,"[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":var ne="plus"===n.variance?"+":"minus"===n.variance?"-":"";return w([ne,e.call(r,"key"),n.optional?"?":"",": ",e.call(r,"value")]);case"QualifiedTypeIdentifier":return w([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return _(E(n.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return D.strictEqual(typeof n.value,"number"),_(JSON.stringify(n.value),t);case"StringTypeAnnotation":return _("string",t);case"DeclareTypeAlias":i.push("declare ");case"TypeAlias":return w(["type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"right"),";"]);case"TypeCastExpression":return w(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return w(["<",_(", ").join(e.map(r,"params")),">"]);case"TypeParameter":switch(n.variance){case"plus":i.push("+");break;case"minus":i.push("-")}return i.push(e.call(r,"name")),n.bound&&i.push(e.call(r,"bound")),n.default&&i.push("=",e.call(r,"default")),w(i);case"TypeofTypeAnnotation":return w([_("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return _(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return _("void",t);case"NullTypeAnnotation":return _("null",t);case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:throw new Error("unknown type: "+JSON.stringify(n.type))}return p}function u(e,t,r){var n=(P.ClassBody&&P.ClassBody.check(e.getParentNode()),[]),i=!1,s=!1;e.each(function(e){var t=(e.getName(),e.getValue());t&&"EmptyStatement"!==t.type&&(P.Comment.check(t)?i=!0:P.Statement.check(t)?s=!0:B.assert(t),n.push({node:t,printed:r(e)}))}),i&&D.strictEqual(s,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var a=null,o=n.length,u=[];return n.forEach(function(e,r){var n,i,s=e.printed,c=e.node,p=s.length>1,h=r>0,f=r<o-1,d=c&&c.loc&&c.loc.lines,m=d&&t.reuseWhitespace&&N.getTrueLoc(c,d);if(h)if(m){var y=d.skipSpaces(m.start,!0),g=y?y.line:1,b=m.start.line-g;n=Array(b+1).join("\n")}else n=p?"\n\n":"\n";else n="";if(f)if(m){var v=d.skipSpaces(m.end),x=v?v.line:d.length,E=x-m.end.line;i=Array(E+1).join("\n")}else i=p?"\n\n":"\n";else i="";u.push(l(a,n),s),f?a=i:i&&u.push(i)}),w(u)}function l(e,t){if(!e&&!t)return _("");if(!e)return _(t);if(!t)return _(e);var r=_(e),n=_(t);return n.length>r.length?n:r}function c(e,t,r){var n=e.getNode(),i=n.kind,s=[];"ObjectMethod"===n.type||"ClassMethod"===n.type?n.value=n:P.FunctionExpression.assert(n.value),n.value.async&&s.push("async "),i&&"init"!==i&&"method"!==i&&"constructor"!==i?(D.ok("get"===i||"set"===i),s.push(i," ")):n.value.generator&&s.push("*");var a=e.call(r,"key");return n.computed&&(a=w(["[",a,"]"])),s.push(a,e.call(r,"value","typeParameters"),"(",e.call(function(e){return f(e,t,r)},"value"),")",e.call(r,"value","returnType")," ",e.call(r,"value","body")),w(s)}function h(e,t,r){var n=e.map(r,"arguments"),i=N.isTrailingCommaEnabled(t,"parameters"),s=_(", ").join(n);return s.getLineLength(1)>t.wrapColumn?(s=_(",\n").join(n),w(["(\n",s.indent(t.tabWidth),i?",\n)":"\n)"])):w(["(",s,")"])}function f(e,t,r){var n=e.getValue();P.Function.assert(n);var i=e.map(r,"params");n.defaults&&e.each(function(e){var t=e.getName(),n=i[t];n&&e.getValue()&&(i[t]=w([n," = ",r(e)]))},"defaults"),n.rest&&i.push(w(["...",e.call(r,"rest")]));var s=_(", ").join(i);return s.length>1||s.getLineLength(1)>t.wrapColumn?(s=_(",\n").join(i),s=w(N.isTrailingCommaEnabled(t,"parameters")&&!n.rest&&"RestElement"!==n.params[n.params.length-1].type?[s,",\n"]:[s,"\n"]),w(["\n",s.indent(t.tabWidth)])):s}function d(e,t,r){var n=e.getValue(),i=[];if(n.async&&i.push("async "),n.generator&&i.push("*"),n.method||"get"===n.kind||"set"===n.kind)return c(e,t,r);var s=e.call(r,"key");return n.computed?i.push("[",s,"]"):i.push(s),i.push("(",f(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),w(i)}function m(e,t,r){var n=e.getValue(),i=["export "],s=t.objectCurlySpacing;P.Declaration.assert(n),(n.default||"ExportDefaultDeclaration"===n.type)&&i.push("default "),n.declaration?i.push(e.call(r,"declaration")):n.specifiers&&n.specifiers.length>0&&(1===n.specifiers.length&&"ExportBatchSpecifier"===n.specifiers[0].type?i.push("*"):i.push(s?"{ ":"{",_(", ").join(e.map(r,"specifiers")),s?" }":"}"),n.source&&i.push(" from ",e.call(r,"source")));var a=w(i);return";"===b(a)||n.declaration&&("FunctionDeclaration"===n.declaration.type||"ClassDeclaration"===n.declaration.type)||(a=w([a,";"])),a}function y(e,t){var r=N.getParentExportDeclaration(e);return r?D.strictEqual(r.type,"DeclareExportDeclaration"):t.unshift("declare "),w(t)}function g(e,t){return w(e.length>1?[" ",e]:["\n",A(e).indent(t.tabWidth)])}function b(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function v(e){return"}"===b(e)}function x(e){return e.replace(/['"]/g,function(e){return'"'===e?"'":'"'})}function E(e,t){switch(B.assert(e),t.quote){case"auto":var r=JSON.stringify(e),n=x(JSON.stringify(x(e)));return r.length>n.length?n:r;case"single":return x(JSON.stringify(x(e)));case"double":default:return JSON.stringify(e)}}function A(e){var t=b(e);return!t||"\n};".indexOf(t)<0?w([e,";"]):e}var D=e("assert"),C=(e("source-map"),e("./comments").printComments),S=e("./lines"),_=S.fromString,w=S.concat,k=e("./options").normalize,F=e("./patcher").getReprinter,T=e("./types"),P=T.namedTypes,B=T.builtInTypes.string,O=T.builtInTypes.object,j=e("./fast-path"),N=e("./util"),I=n.prototype,L=!1;I.toString=function(){return L||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),L=!0),this.code};var M=new n("");r.Printer=i},{"./comments":551,"./fast-path":552,"./lines":553,"./options":555,"./patcher":557,"./types":559,"./util":560,assert:3,"source-map":573}],559:[function(e,t,r){t.exports=e("ast-types")},{"ast-types":22}],560:[function(e,t,r){function n(){for(var e={},t=arguments.length,r=0;r<t;++r)for(var n=Object.keys(arguments[r]),i=n.length,s=0;s<i;++s)e[n[s]]=!0;return e}function i(e,t){return e.line-t.line||e.column-t.column}function s(e){return{line:e.line,column:e.column}}function a(e,t){e&&t&&(i(t.start,e.start)<0&&(e.start=t.start),i(e.end,t.end)<0&&(e.end=t.end))}function o(e,t){if(u.strictEqual(e.type,"TemplateLiteral"),0!==e.quasis.length){var r=s(e.loc.start);u.strictEqual(t.charAt(r),"`"),u.ok(t.nextPos(r));var n=e.quasis[0];i(n.loc.start,r)<0&&(n.loc.start=r);var a=s(e.loc.end);u.ok(t.prevPos(a)),u.strictEqual(t.charAt(a),"`");var o=e.quasis[e.quasis.length-1];i(a,o.loc.end)<0&&(o.loc.end=a),e.expressions.forEach(function(r,n){var s=t.skipSpaces(r.loc.start,!0,!1);if(t.prevPos(s)&&"{"===t.charAt(s)&&t.prevPos(s)&&"$"===t.charAt(s)){var a=e.quasis[n];i(s,a.loc.end)<0&&(a.loc.end=s)}var o=t.skipSpaces(r.loc.end,!1,!1);if("}"===t.charAt(o)){u.ok(t.nextPos(o));var l=e.quasis[n+1];i(l.loc.start,o)<0&&(l.loc.start=o)}})}}var u=e("assert"),l=e("./types"),c=(l.getFieldValue,l.namedTypes),p=e("source-map"),h=p.SourceMapConsumer,f=p.SourceMapGenerator,d=Object.prototype.hasOwnProperty,m=r;m.getUnionOfKeys=n,m.comparePos=i,m.copyPos=s,m.composeSourceMaps=function(e,t){if(!e)return t||null;if(!t)return e;var r=new h(e),n=new h(t),i=new f({file:t.file,sourceRoot:t.sourceRoot}),a={};return n.eachMapping(function(e){var t=r.originalPositionFor({line:e.originalLine,column:e.originalColumn}),n=t.source;if(null!==n){i.addMapping({source:n,original:s(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});var o=r.sourceContentFor(n);o&&!d.call(a,n)&&(a[n]=o,i.setSourceContent(n,o))}}),i.toJSON()},m.getTrueLoc=function(e,t){function r(e){a(n,e.loc)}if(!e.loc)return null;var n={start:e.loc.start,end:e.loc.end};return e.comments&&e.comments.forEach(r),e.declaration&&m.isExportDeclaration(e)&&e.declaration.decorators&&e.declaration.decorators.forEach(r),i(n.start,n.end)<0&&(n.start=s(n.start),t.skipSpaces(n.start,!1,!0),i(n.start,n.end)<0&&(n.end=s(n.end),t.skipSpaces(n.end,!0,!0))),n},m.fixFaultyLocations=function(e,t){var r=e.loc;if(r&&(r.start.line<1&&(r.start.line=1),r.end.line<1&&(r.end.line=1)),"File"===e.type&&(r.start=t.firstPos(),r.end=t.lastPos()),"TemplateLiteral"===e.type)o(e,t);else if(r&&e.decorators)e.decorators.forEach(function(e){a(r,e.loc)});else if(e.declaration&&m.isExportDeclaration(e)){e.declaration.loc=null;var n=e.declaration.decorators;n&&n.forEach(function(e){a(r,e.loc)})}else if(c.MethodDefinition&&c.MethodDefinition.check(e)||c.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,c.FunctionExpression.check(e.value)&&(e.value.id=null);else if("ObjectTypeProperty"===e.type){var r=e.loc,i=r&&r.end;i&&(i=s(i),t.prevPos(i)&&","===t.charAt(i)&&(i=t.skipSpaces(i,!0,!0))&&(r.end=i))}},m.isExportDeclaration=function(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1},m.getParentExportDeclaration=function(e){var t=e.getParentNode();return"declaration"===e.getName()&&m.isExportDeclaration(t)?t:null},m.isTrailingCommaEnabled=function(e,t){var r=e.trailingComma;return"object"==typeof r?!!r[t]:!!r}},{"./types":559,assert:3,"source-map":573}],561:[function(e,t,r){(function(t){function n(e,t){return new p(t).print(e)}function i(e,t){return new p(t).printGenerically(e)}function s(e,r){return a(t.argv[2],e,r)}function a(t,r,n){e("fs").readFile(t,"utf-8",function(e,t){if(e)return void console.error(e);u(t,r,n)})}function o(e){t.stdout.write(e)}function u(e,t,r){var i=r&&r.writeback||o;t(c(e,r),function(e){i(n(e,r).code)})}var l=e("./lib/types"),c=e("./lib/parser").parse,p=e("./lib/printer").Printer;Object.defineProperties(r,{parse:{enumerable:!0,value:c},visit:{enumerable:!0,value:l.visit},print:{enumerable:!0,value:n},prettyPrint:{enumerable:!1,value:i},types:{enumerable:!1,value:l},run:{enumerable:!1,value:s}})}).call(this,e("_process"))},{"./lib/parser":556,"./lib/printer":558,"./lib/types":559,_process:539,fs:181}],562:[function(e,t,r){!function(e,n){"object"==typeof r&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof r?r.esprima=n():e.esprima=n()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e,t,r){var n=null,i=function(e,t){r&&r(e,t),n&&n.visit(e,t)},u="function"==typeof r?i:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&(n=new s.CommentHandler,n.attach=c,t.comment=!0,u=i)}var p;p=t&&"boolean"==typeof t.jsx&&t.jsx?new o.JSXParser(e,t,u):new a.Parser(e,t,u);var h=p.parseProgram();return l&&(h.comments=n.comments),p.config.tokens&&(h.tokens=p.tokens),p.config.tolerant&&(h.errors=p.errorHandler.errors),h}function i(e,t,r){var n,i=new u.Tokenizer(e,t);n=[];try{for(;;){var s=i.getNextToken();if(!s)break;r&&(s=r(s)),n.push(s)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(n.errors=i.errors()),n}var s=r(1),a=r(3),o=r(11),u=r(15);t.parse=n,t.tokenize=i;var l=r(2);t.Syntax=l.Syntax,t.version="3.1.3"},function(e,t,r){"use strict";var n=r(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===n.Syntax.BlockStatement&&0===e.body.length){for(var r=[],i=this.leading.length-1;i>=0;--i){var s=this.leading[i];t.end.offset>=s.start&&(r.unshift(s.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}r.length&&(e.innerComments=r)}},e.prototype.findTrailingComments=function(e,t){var r=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=t.end.offset&&r.unshift(i.comment)}return this.trailing.length=0,r}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var a=s.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(r=s.node.trailingComments,delete s.node.trailingComments)}return r},e.prototype.findLeadingComments=function(e,t){for(var r,n=[];this.stack.length>0;){var i=this.stack[this.stack.length-1];if(!(i&&i.start>=t.start.offset))break;r=this.stack.pop().node}if(r){for(var s=r.leadingComments?r.leadingComments.length:0,a=s-1;a>=0;--a){var o=r.leadingComments[a];o.range[1]<=t.start.offset&&(n.unshift(o),r.leadingComments.splice(a,1))}return r.leadingComments&&0===r.leadingComments.length&&delete r.leadingComments,n}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];i.start<=t.start.offset&&(n.unshift(i.comment),this.leading.splice(a,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===n.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var r=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),r.length>0&&(e.trailingComments=r),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var r="L"===e.type[0]?"Line":"Block",n={type:r,value:e.value};if(e.range&&(n.range=e.range),e.loc&&(n.loc=e.loc),this.comments.push(n),this.attach){var i={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=r,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var n=r(4),i=r(5),s=r(6),a=r(7),o=r(8),u=r(2),l=r(10),c=function(){function e(e,t,r){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=r,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]
-}),a=this.lastMarker.index,o=this.lastMarker.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;throw this.errorHandler.createError(a,o,u,s)},e.prototype.tolerateError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]}),a=this.lastMarker.index,o=this.scanner.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;this.errorHandler.tolerateError(a,o,u,s)},e.prototype.unexpectedTokenError=function(e,t){var r,n=t||i.Messages.UnexpectedToken;if(e?(t||(n=e.type===a.Token.EOF?i.Messages.UnexpectedEOS:e.type===a.Token.Identifier?i.Messages.UnexpectedIdentifier:e.type===a.Token.NumericLiteral?i.Messages.UnexpectedNumber:e.type===a.Token.StringLiteral?i.Messages.UnexpectedString:e.type===a.Token.Template?i.Messages.UnexpectedTemplate:i.Messages.UnexpectedToken,e.type===a.Token.Keyword&&(this.scanner.isFutureReservedWord(e.value)?n=i.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(n=i.Messages.StrictReservedWord))),r=e.type===a.Token.Template?e.value.raw:e.value):r="ILLEGAL",n=n.replace("%0",r),e&&"number"==typeof e.lineNumber){var s=e.start,o=e.lineNumber,u=e.start-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)}var s=this.lastMarker.index,o=this.lastMarker.lineNumber,u=s-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var r=e[t],n=void 0;n={type:r.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(r.slice[0],r.slice[1])},this.config.range&&(n.range=r.range),this.config.loc&&(n.loc=r.loc);var i={start:{line:r.loc.start.line,column:r.loc.start.column,offset:r.range[0]},end:{line:r.loc.end.line,column:r.loc.end.column,offset:r.range[1]}};this.delegate(n,i)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t;return t={type:a.TokenName[e.type],value:this.getTokenRaw(e)},this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),e.regex&&(t.regex=e.regex),t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var t;return t=this.scanner.lex(),this.hasLineTerminator=!(!e||!t)&&e.lineNumber!==t.lineNumber,t&&this.context.strict&&t.type===a.Token.Identifier&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=a.Token.Keyword),this.lookahead=t,this.config.tokens&&t.type!==a.Token.EOF&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart}},e.prototype.startNode=function(e){return{index:e.start,line:e.lineNumber,column:e.start-e.lineStart}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var r={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart,offset:this.lastMarker.index}};this.delegate(t,r)}return t},e.prototype.expect=function(e){var t=this.nextToken();t.type===a.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;e.type===a.Token.Punctuator&&","===e.value?this.nextToken():e.type===a.Token.Punctuator&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,i.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();t.type===a.Token.Keyword&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return this.lookahead.type===a.Token.Punctuator&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return this.lookahead.type===a.Token.Keyword&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return this.lookahead.type===a.Token.Identifier&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(this.lookahead.type!==a.Token.Punctuator)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=n,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,r,n=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(n,new l.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value="true"===t.value,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value=null,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.RegexLiteral(t.value,r,t.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(n,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(n,new l.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(r)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!1))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),r=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var n=this.getTokenRaw(t);r=this.finalize(e,new l.Literal(t.value,n));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:r=this.finalize(e,new l.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(r=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return r},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,r,n,s=this.createNode(),o=this.lookahead,u=!1,c=!1,p=!1;o.type===a.Token.Identifier?(this.nextToken(),r=this.finalize(s,new l.Identifier(o.value))):this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(o.type===a.Token.Identifier&&"get"===o.value&&h)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod();else if(o.type===a.Token.Identifier&&"set"===o.value&&h)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod();else if(o.type===a.Token.Punctuator&&"*"===o.value&&h)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),n=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))n=this.parsePropertyMethodFunction(),c=!0;else if(o.type===a.Token.Identifier){var f=this.finalize(s,new l.Identifier(o.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);n=this.finalize(s,new l.AssignmentPattern(f,d))}else p=!0,n=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new l.Property(t,r,u,n,c,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],r={value:!1};!this.match("}");)t.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],r=[],n=this.parseTemplateHead();for(r.push(n);!n.tail;)t.push(this.parseExpression()),n=this.parseTemplateElement(),r.push(n);return this.finalize(e,new l.TemplateLiteral(r,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:e.type=u.Syntax.ObjectPattern;for(var t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[]};else{var t=this.lookahead,r=[];if(this.match("..."))e=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e]};else{var n=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index<this.scanner.length&&this.match(",");){if(this.nextToken(),this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(r)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s<i.length;s++)this.reinterpretExpressionAsPattern(i[s]);n=!0,e={type:"ArrowParameterPlaceHolder",params:i}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(e=this.finalize(this.startNode(t),new l.SequenceExpression(i)))}if(!n){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(n=!0,e={type:"ArrowParameterPlaceHolder",params:[e]}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);e={type:"ArrowParameterPlaceHolder",params:e.type===u.Syntax.SequenceExpression?e.expressions:[e]}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;this.expectCommaSeparator()}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return e.type===a.Token.Identifier||e.type===a.Token.Keyword||e.type===a.Token.BooleanLiteral||e.type===a.Token.NullLiteral},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new l.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e=this.createNode(),t=this.parseIdentifierName();n.assert("new"===t.name,"New expression must start with `new`");var r;if(this.match("."))if(this.nextToken(),this.lookahead.type===a.Token.Identifier&&this.context.inFunctionBody&&"target"===this.lookahead.value){var i=this.parseIdentifierName();r=new l.MetaProperty(t,i)}else this.throwUnexpectedToken(this.lookahead);else{var s=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];r=new l.NewExpression(s,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,r)},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e=this.lookahead,t=this.context.allowIn;this.context.allowIn=!0;var r;for(this.matchKeyword("super")&&this.context.inFunctionBody?(r=this.createNode(),this.nextToken(),r=this.finalize(r,new l.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):r=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var n=this.parseIdentifierName();r=this.finalize(this.startNode(e),new l.StaticMemberExpression(r,n))}else if(this.match("(")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var i=this.parseArguments();r=this.finalize(this.startNode(e),new l.CallExpression(r,i))}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),r=this.finalize(this.startNode(e),new l.ComputedMemberExpression(r,n))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var s=this.parseTemplateLiteral();r=this.finalize(this.startNode(e),new l.TaggedTemplateExpression(r,s))}return this.context.allowIn=t,r},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new l.Super)},e.prototype.parseLeftHandSideExpression=function(){n.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new l.ComputedMemberExpression(t,r))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();t=this.finalize(e,new l.StaticMemberExpression(t,r))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var i=this.parseTemplateLiteral();t=this.finalize(e,new l.TaggedTemplateExpression(t,i))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var r=this.startNode(t),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment);var s=!0;e=this.finalize(r,new l.UpdateExpression(n.value,e,s)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===a.Token.Punctuator&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.nextToken().value,s=!1;e=this.finalize(this.startNode(t),new l.UpdateExpression(o,e,s))}return e},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),r=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new l.UnaryExpression(r.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(i.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t,n=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new l.BinaryExpression("**",r,n))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return e.type===a.Token.Punctuator?this.operatorPrecedence[t]||0:e.type===a.Token.Keyword&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),r=this.lookahead,n=this.binaryPrecedence(r);if(n>0){this.nextToken(),r.prec=n,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),o=[s,r,a];;){if((n=this.binaryPrecedence(this.lookahead))<=0)break;for(;o.length>2&&n<=o[o.length-2].prec;){a=o.pop();var u=o.pop().value;s=o.pop(),i.pop();var c=this.startNode(i[i.length-1]);o.push(this.finalize(c,new l.BinaryExpression(u,s,a)))}r=this.nextToken(),r.prec=n,o.push(r),i.push(this.lookahead),o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=o.length-1;for(t=o[p],i.pop();p>1;){var c=this.startNode(i.pop());t=this.finalize(c,new l.BinaryExpression(o[p-1].value,o[p-2],t)),p-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new l.ConditionalExpression(t,n,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var r=0;r<t.elements.length;r++)null!==t.elements[r]&&this.checkPatternParam(e,t.elements[r]);break;case u.Syntax.YieldExpression:break;default:n.assert(t.type===u.Syntax.ObjectPattern,"Invalid type");for(var r=0;r<t.properties.length;r++)this.checkPatternParam(e,t.properties[r].value)}},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,r=[e];switch(e.type){case u.Syntax.Identifier:break;case"ArrowParameterPlaceHolder":r=e.params;break;default:return null}t={paramSet:{}};for(var n=0;n<r.length;++n){var s=r[n];s.type===u.Syntax.AssignmentPattern&&s.right.type===u.Syntax.YieldExpression&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=u.Syntax.Identifier,s.right.name="yield",delete s.right.argument,delete s.right.delegate),this.checkPatternParam(t,s),r[n]=s}if(this.context.strict||!this.context.allowYield)for(var n=0;n<r.length;++n){var s=r[n];s.type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===i.Messages.StrictParamDupe){var a=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(a,t.message)}return{params:r,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,r=t;if(e=this.parseConditionalExpression(),"ArrowParameterPlaceHolder"===e.type||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=this.reinterpretAsCoverFormalsList(e);if(n){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var o=this.startNode(t);this.expect("=>");var c=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),p=c.type!==u.Syntax.BlockStatement;this.context.strict&&n.firstRestricted&&this.throwUnexpectedToken(n.firstRestricted,n.message),this.context.strict&&n.stricted&&this.tolerateUnexpectedToken(n.stricted,n.message),e=this.finalize(o,new l.ArrowFunctionExpression(n.params,c,p)),this.context.strict=s,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var h=e;this.scanner.isRestrictedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),r=this.nextToken();var f=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(r.value,e,f)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(t);this.startMarker.index<this.scanner.length&&this.match(",");)this.nextToken(),r.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(r))}return t},e.prototype.parseStatementListItem=function(){var e=null;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===a.Token.Keyword)switch(this.lookahead.value){case"export":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];;){if(this.match("}"))break;t.push(this.parseStatementListItem())}return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var r=this.createNode(),n=[],s=this.parsePattern(n,e);this.context.strict&&s.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(s.name)&&this.tolerateError(i.Messages.StrictVarName);var a=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.expect("="),a=this.isolateCoverGrammar(this.parseAssignmentExpression)):(!t.inFor&&s.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),a=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(r,new l.VariableDeclarator(s,a))},e.prototype.parseBindingList=function(e,t){for(var r=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),r.push(this.parseLexicalBinding(e,t));return r},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.collectComments();var n=this.scanner.lex();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n.type===a.Token.Identifier||n.type===a.Token.Punctuator&&"["===n.value||n.type===a.Token.Punctuator&&"{"===n.value||n.type===a.Token.Keyword&&"let"===n.value||n.type===a.Token.Keyword&&"yield"===n.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),r=this.nextToken().value;n.assert("let"===r||"const"===r,"Lexical declaration must be either let or const");var i=this.parseBindingList(r,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(i,r))},e.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var n=this.parsePattern(e,t);return this.finalize(r,new l.RestElement(n))},e.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");for(var n=[];!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(e,t));break}n.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(r,new l.ArrayPattern(n))},e.prototype.parsePropertyPattern=function(e,t){var r,n,i=this.createNode(),s=!1,o=!1;if(this.lookahead.type===a.Token.Identifier){var u=this.lookahead;r=this.parseVariableIdentifier();var c=this.finalize(i,new l.Identifier(u.value));if(this.match("=")){e.push(u),o=!0,this.nextToken();var p=this.parseAssignmentExpression();n=this.finalize(this.startNode(u),new l.AssignmentPattern(c,p))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(e,t)):(e.push(u),o=!0,n=c)}else s=this.match("["),r=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(e,t);return this.finalize(i,new l.Property("init",r,s,n,!1,o))},e.prototype.parseObjectPattern=function(e,t){var r=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(r,new l.ObjectPattern(n))},e.prototype.parsePattern=function(e,t){var r
-;return this.match("[")?r=this.parseArrayPattern(e,t):this.match("{")?r=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,i.Messages.UnexpectedToken),e.push(this.lookahead),r=this.parseVariableIdentifier(t)),r},e.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead,n=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,n=this.finalize(this.startNode(r),new l.AssignmentPattern(n,s))}return n},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),r=this.nextToken();return r.type===a.Token.Keyword&&"yield"===r.value?(this.context.strict&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord),this.context.allowYield||this.throwUnexpectedToken(r)):r.type!==a.Token.Identifier?this.context.strict&&r.type===a.Token.Keyword&&this.scanner.isStrictModeReservedWord(r.value)?this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord):(this.context.strict||"let"!==r.value||"var"!==e)&&this.throwUnexpectedToken(r):"module"===this.sourceType&&r.type===a.Token.Identifier&&"await"===r.value&&this.tolerateUnexpectedToken(r),this.finalize(t,new l.Identifier(r.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),r=[],n=this.parsePattern(r,"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(i.Messages.StrictVarName);var s=null;return this.match("=")?(this.nextToken(),s=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new l.VariableDeclarator(n,s))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},r=[];for(r.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),r.push(this.parseVariableDeclaration(t));return r},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),r=null;this.expectKeyword("if"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),e=this.parseStatement(),this.matchKeyword("else")&&(this.nextToken(),r=this.parseStatement())),this.finalize(t,new l.IfStatement(n,e,r))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var r=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();return this.expect(")"),this.match(";")&&this.nextToken(),this.finalize(e,new l.DoWhileStatement(r,n))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var n=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=n}return this.finalize(t,new l.WhileStatement(r,e))},e.prototype.parseForStatement=function(){var e,t,r=null,n=null,s=null,a=!0,o=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,1===p.length&&this.matchKeyword("in")){var h=p[0];h.init&&(h.id.type===u.Syntax.ArrayPattern||h.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(i.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var f=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){var c=this.context.allowIn;this.context.allowIn=!1;var p=this.parseBindingList(f,{inFor:!0});this.context.allowIn=c,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new l.VariableDeclaration(p,f)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(p,f)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(this.consumeSemicolon(),r=this.finalize(r,new l.VariableDeclaration(p,f)))}else r=this.finalize(r,new l.Identifier(f)),this.nextToken(),e=r,t=this.parseExpression(),r=null}else{var d=this.lookahead,c=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,a=!1;else{if(this.match(",")){for(var m=[r];this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(d),new l.SequenceExpression(m))}this.expect(";")}}void 0===e&&(this.match(";")||(n=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=g}return void 0===e?this.finalize(o,new l.ForStatement(r,n,s,y)):a?this.finalize(o,new l.ForInStatement(e,t,y)):this.finalize(o,new l.ForOfStatement(e,t,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){t=this.parseVariableIdentifier();var r="$"+t.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(i.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){t=this.parseVariableIdentifier();var r="$"+t.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(i.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(i.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==a.Token.EOF,r=t?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(r))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(i.Messages.StrictModeWith);var e=this.createNode();this.expectKeyword("with"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.parseStatement();return this.finalize(e,new l.WithStatement(t,r))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var r=[];;){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"))break;r.push(this.parseStatementListItem())}return this.finalize(t,new l.SwitchCase(e,r))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=!0;var n=[],s=!1;for(this.expect("{");;){if(this.match("}"))break;var a=this.parseSwitchCase();null===a.test&&(s&&this.throwError(i.Messages.MultipleDefaultsInSwitch),s=!0),n.push(a)}return this.expect("}"),this.context.inSwitch=r,this.finalize(e,new l.SwitchStatement(t,n))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),r=this.parseExpression();if(r.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var n=r,s="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)&&this.throwError(i.Messages.Redeclaration,"Label",n.name),this.context.labelSet[s]=!0;var a=this.parseStatement();delete this.context.labelSet[s],e=new l.LabeledStatement(n,a)}else this.consumeSemicolon(),e=new l.ExpressionStatement(r);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(i.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],r=this.parsePattern(t),n={},s=0;s<t.length;s++){var a="$"+t[s].value;Object.prototype.hasOwnProperty.call(n,a)&&this.tolerateError(i.Messages.DuplicateBinding,t[s].value),n[a]=!0}this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(i.Messages.StrictCatchVariable),this.expect(")");var o=this.parseBlock();return this.finalize(e,new l.CatchClause(r,o))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),r=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return r||n||this.throwError(i.Messages.NoCatchOrFinally),this.finalize(e,new l.TryStatement(t,r,n))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new l.DebuggerStatement)},e.prototype.parseStatement=function(){var e=null;switch(this.lookahead.type){case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.StringLiteral:case a.Token.Template:case a.Token.RegularExpression:e=this.parseExpressionStatement();break;case a.Token.Punctuator:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case a.Token.Identifier:e=this.parseLabelledStatement();break;case a.Token.Keyword:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),r=this.context.labelSet,n=this.context.inIteration,i=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.startMarker.index<this.scanner.length&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=r,this.context.inIteration=n,this.context.inSwitch=i,this.context.inFunctionBody=s,this.finalize(e,new l.BlockStatement(t))},e.prototype.validateParam=function(e,t,r){var n="$"+r;this.context.strict?(this.scanner.isRestrictedWord(r)&&(e.stricted=t,e.message=i.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[n]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var r=this.parsePattern(e);return this.match("=")&&this.throwError(i.Messages.DefaultRestParameter),this.match(")")||this.throwError(i.Messages.ParameterAfterRestParameter),this.finalize(t,new l.RestElement(r))},e.prototype.parseFormalParameter=function(e){for(var t=[],r=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),n=0;n<t.length;n++)this.validateParam(e,t[n],t[n].value);return e.params.push(r),!this.match(")")},e.prototype.parseFormalParameters=function(e){var t;if(t={params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};this.startMarker.index<this.scanner.length&&this.parseFormalParameter(t);)this.expect(",");return this.expect(")"),{params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode();this.expectKeyword("function");var r=this.match("*");r&&this.nextToken();var n,s=null,a=null;if(!e||!this.match("(")){var o=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(a=o,n=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(a=o,n=i.Messages.StrictReservedWord)}var u=this.context.allowYield;this.context.allowYield=!r;var c=this.parseFormalParameters(a),p=c.params,h=c.stricted;a=c.firstRestricted,c.message&&(n=c.message);var f=this.context.strict,d=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&h&&this.tolerateUnexpectedToken(h,n),this.context.strict=f,this.context.allowYield=u,this.finalize(t,new l.FunctionDeclaration(s,p,d,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode();this.expectKeyword("function");var t=this.match("*");t&&this.nextToken();var r,n,s=null,a=this.context.allowYield;if(this.context.allowYield=!t,!this.match("(")){var o=this.lookahead;s=this.context.strict||t||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(n=o,r=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(n=o,r=i.Messages.StrictReservedWord)}var u=this.parseFormalParameters(n),c=u.params,p=u.stricted;n=u.firstRestricted,u.message&&(r=u.message);var h=this.context.strict,f=this.parseFunctionSourceElements();return this.context.strict&&n&&this.throwUnexpectedToken(n,r),this.context.strict&&p&&this.tolerateUnexpectedToken(p,r),this.context.strict=h,this.context.allowYield=a,this.finalize(e,new l.FunctionExpression(s,c,f,t))},e.prototype.parseDirective=function(){var e=this.lookahead,t=null,r=this.createNode(),n=this.parseExpression();return n.type===u.Syntax.Literal&&(t=this.getTokenRaw(e).slice(1,-1)),this.consumeSemicolon(),this.finalize(r,t?new l.Directive(n,t):new l.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var r=this.lookahead;if(r.type!==a.Token.StringLiteral)break;var n=this.parseDirective();t.push(n);var s=n.directive;if("string"!=typeof s)break;"use strict"===s?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,i.Messages.StrictOctalLiteral)):!e&&r.octal&&(e=r)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case a.Token.Identifier:case a.Token.StringLiteral:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.Keyword:return!0;case a.Token.Punctuator:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode();this.expect("("),this.expect(")");var t={params:[],stricted:null,firstRestricted:null,message:null},r=this.context.allowYield;this.context.allowYield=!1;var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t={params:[],firstRestricted:null,paramSet:{}},r=this.context.allowYield;this.context.allowYield=!1,this.expect("("),this.match(")")?this.tolerateUnexpectedToken(this.lookahead):this.parseFormalParameter(t),this.expect(")");var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters();this.context.allowYield=!1;var n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case a.Token.Punctuator:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case a.Token.Keyword:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,r=!1;if(!this.hasLineTerminator){var n=this.context.allowYield;this.context.allowYield=!1,r=this.match("*"),r?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(e,new l.YieldExpression(t,r))},e.prototype.parseClassElement=function(e){var t,r,n,s=this.lookahead,o=this.createNode(),u=!1,c=!1,p=!1;if(this.match("*"))this.nextToken();else{u=this.match("["),r=this.parseObjectPropertyKey();"static"===r.name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(s=this.lookahead,p=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey())}var h=this.qualifiedPropertyName(this.lookahead);return s.type===a.Token.Identifier?"get"===s.value&&h?(t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod()):"set"===s.value&&h&&(t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod()):s.type===a.Token.Punctuator&&"*"===s.value&&h&&(t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0),!t&&r&&this.match("(")&&(t="init",n=this.parsePropertyMethodFunction(),c=!0),t||this.throwUnexpectedToken(this.lookahead),"init"===t&&(t="method"),u||(p&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(s,i.Messages.StaticPrototype),!p&&this.isPropertyKey(r,"constructor")&&("method"===t&&c&&!n.generator||this.throwUnexpectedToken(s,i.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(s,i.Messages.DuplicateConstructor):e.value=!0,t="constructor")),this.finalize(o,new l.MethodDefinition(r,u,n,t,p))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new l.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),r=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=e&&this.lookahead.type!==a.Token.Identifier?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=r,this.finalize(t,new l.ClassDeclaration(n,i,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=this.lookahead.type===a.Token.Identifier?this.parseVariableIdentifier():null,n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new l.ClassExpression(r,n,i))},e.prototype.parseProgram=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();this.startMarker.index<this.scanner.length;)t.push(this.parseStatementListItem());return this.finalize(e,new l.Program(t,this.sourceType))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();this.lookahead.type!==a.Token.StringLiteral&&this.throwError(i.Messages.InvalidModuleSpecifier);var t=this.nextToken(),r=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,r))},e.prototype.parseImportSpecifier=function(){var e,t,r=this.createNode();return this.lookahead.type===a.Token.Identifier?(e=this.parseVariableIdentifier(),t=e,this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(e=this.parseIdentifierName(),t=e,this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(r,new l.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new l.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(i.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new l.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalImportDeclaration);var e=this.createNode();this.expectKeyword("import");var t,r=[];if(this.lookahead.type===a.Token.StringLiteral)t=this.parseModuleSpecifier();else{if(this.match("{")?r=r.concat(this.parseNamedImports()):this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(r.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.match("{")?r=r.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new l.ImportDeclaration(r,t))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),r=t;return this.matchContextualKeyword("as")&&(this.nextToken(),r=this.parseIdentifierName()),this.finalize(e,new l.ExportSpecifier(t,r))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalExportDeclaration);var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var r=this.parseFunctionDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else{this.matchContextualKeyword("from")&&this.throwError(i.Messages.UnexpectedToken,this.lookahead.value);var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken();var s=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new l.ExportAllDeclaration(s))}else if(this.lookahead.type===a.Token.Keyword){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new l.ExportNamedDeclaration(r,[],null))}else{var o=[],u=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),o.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon();else if(c){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new l.ExportNamedDeclaration(null,o,u))}return t},e}();t.Parser=c},function(e,t){"use strict";function r(e,t){if(!e)throw new Error("ASSERT: "+t)}t.assert=r},function(e,t){"use strict";t.Messages={UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer"}},function(e,t){"use strict";var r=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){Object.create&&Object.defineProperty&&(r=Object.create(e),Object.defineProperty(r,"column",{value:t}))}finally{return r}},e.prototype.createError=function(e,t,r,n){var i="Line "+t+": "+n,s=this.constructError(i,r);return s.index=e,s.lineNumber=t,s.description=n,s},e.prototype.throwError=function(e,t,r,n){throw this.createError(e,t,r,n)},e.prototype.tolerateError=function(e,t,r,n){var i=this.createError(e,t,r,n);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=r},function(e,t){"use strict";!function(e){e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.RegularExpression=9]="RegularExpression",e[e.Template=10]="Template"}(t.Token||(t.Token={}));var r=t.Token;t.TokenName={},t.TokenName[r.BooleanLiteral]="Boolean",t.TokenName[r.EOF]="<end>",t.TokenName[r.Identifier]="Identifier",t.TokenName[r.Keyword]="Keyword",t.TokenName[r.NullLiteral]="Null",t.TokenName[r.NumericLiteral]="Numeric",t.TokenName[r.Punctuator]="Punctuator",t.TokenName[r.StringLiteral]="String",t.TokenName[r.RegularExpression]="RegularExpression",t.TokenName[r.Template]="Template"
-},function(e,t,r){"use strict";function n(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var s=r(4),a=r(5),o=r(9),u=r(7),l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,r,n;for(this.trackComment&&(t=[],r=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,o.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[r+e,this.index-1],range:[r,this.index-1],loc:n};t.push(s)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!1,slice:[r+e,this.index],range:[r,this.index],loc:n};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,r;for(this.trackComment&&(e=[],t=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(o.Character.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(o.Character.isWhiteSpace(r))++this.index;else if(o.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===r)if(47===(r=this.source.charCodeAt(this.index+1))){this.index+=2;var n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else{if(42!==r)break;this.index+=2;var n=this.skipMultiLineComment();this.trackComment&&(e=e.concat(n))}else if(t&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var n=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(n))}else{if(60!==r)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var n=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(n))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){t=1024*(t-55296)+r-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,i=0;i<t;++i){if(this.eof()||!o.Character.isHexDigit(this.source.charCodeAt(this.index)))return"";r=16*r+n(this.source[this.index++])}return String.fromCharCode(r)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],o.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+n(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),o.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!o.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=o.Character.fromCodePoint(e);this.index+=t.length;var r;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=r);!this.eof()&&(e=this.codePointAt(this.index),o.Character.isIdentifierPart(e));)r=o.Character.fromCodePoint(e),t+=r,this.index+=r.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=r);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,r=i(e);return!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,r=8*r+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+i(this.source[this.index++]))),{code:r,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,r=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===r.length?u.Token.Identifier:this.isKeyword(r)?u.Token.Keyword:"null"===r?u.Token.NullLiteral:"true"===r||"false"===r?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,r="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(o.Character.isIdentifierStart(t)||o.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var r="",n=!1;for(o.Character.isOctalDigit(e.charCodeAt(0))?(n=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return n||0!==r.length||this.throwUnexpectedToken(),(o.Character.isIdentifierStart(this.source.charCodeAt(this.index))||o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(r,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!o.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];s.assert(o.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var r="";if("."!==t){if(r=this.source[this.index++],t=this.source[this.index],"0"===r){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&o.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(r+=this.source[this.index++];o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(r+=this.source[this.index++],t=this.source[this.index],"+"!==t&&"-"!==t||(r+=this.source[this.index++]),o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];else this.throwUnexpectedToken();return o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseFloat(r),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];s.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var r=!1,n="";!this.eof();){var i=this.source[this.index++];if(i===t){t="";break}if("\\"===i)if((i=this.source[this.index++])&&o.Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":case"x":if("{"===this.source[this.index])++this.index,n+=this.scanUnicodeCodePointEscape();else{var a=this.scanHexEscape(i);a||this.throwUnexpectedToken(),n+=a}break;case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+="\t";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;case"8":case"9":n+=i,this.tolerateUnexpectedToken();break;default:if(i&&o.Character.isOctalDigit(i.charCodeAt(0))){var l=this.octalToDecimal(i);r=l.octal||r,n+=String.fromCharCode(l.code)}else n+=i}else{if(o.Character.isLineTerminator(i.charCodeAt(0)))break;n+=i}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:u.Token.StringLiteral,value:n,octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,r=this.index,n="`"===this.source[r],i=!1,s=2;for(++this.index;!this.eof();){var l=this.source[this.index++];if("`"===l){s=1,i=!0,t=!0;break}if("$"===l){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=l}else if("\\"===l)if(l=this.source[this.index++],o.Character.isLineTerminator(l.charCodeAt(0)))++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(l){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":case"x":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var c=this.index,p=this.scanHexEscape(l);p?e+=p:(this.index=c,e+=l)}break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===l?(o.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),e+="\0"):o.Character.isOctalDigit(l.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):e+=l}else o.Character.isLineTerminator(l.charCodeAt(0))?(++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=l}return t||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:u.Token.Template,value:{cooked:e,raw:this.source.slice(r+1,this.index-s)},head:n,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:r,end:this.index}},e.prototype.testRegExp=function(e,t){var r=e,n=this;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(a.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],r=!1,n=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],o.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(o.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){n=!0;break}"["===e&&(r=!0)}return n||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),{value:t.substr(1,t.length-2),literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var r=this.source[this.index];if(!o.Character.isIdentifierPart(r.charCodeAt(0)))break;if(++this.index,"\\"!==r||this.eof())t+=r,e+=r;else if("u"===(r=this.source[this.index])){++this.index;var n=this.index;if(r=this.scanHexEscape("u"))for(t+=r,e+="\\u";n<this.index;++n)e+=this.source[n];else this.index=n,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken()}return{value:t,literal:e}},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),r=this.scanRegExpFlags(),n=this.testRegExp(t.value,r.value);return{type:u.Token.RegularExpression,value:n,literal:t.literal+r.literal,regex:{pattern:t.value,flags:r.value},lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:u.Token.EOF,lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return o.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?o.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():o.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&o.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){
-return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";var n=r(2),i=function(){function e(e){this.type=n.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=i;var s=function(){function e(e){this.type=n.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=s;var a=function(){function e(e,t,r){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=r}return e}();t.ArrowFunctionExpression=a;var o=function(){function e(e,t,r){this.type=n.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=r}return e}();t.AssignmentExpression=o;var u=function(){function e(e,t){this.type=n.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var l=function(){function e(e,t,r){var i="||"===e||"&&"===e;this.type=i?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=r}return e}();t.BinaryExpression=l;var c=function(){function e(e){this.type=n.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=c;var p=function(){function e(e){this.type=n.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=p;var h=function(){function e(e,t){this.type=n.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=h;var f=function(){function e(e,t){this.type=n.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=f;var d=function(){function e(e){this.type=n.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,r){this.type=n.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassDeclaration=m;var y=function(){function e(e,t,r){this.type=n.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassExpression=y;var g=function(){function e(e,t){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=g;var b=function(){function e(e,t,r){this.type=n.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r}return e}();t.ConditionalExpression=b;var v=function(){function e(e){this.type=n.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=v;var x=function(){function e(){this.type=n.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=x;var E=function(){function e(e,t){this.type=n.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=E;var A=function(){function e(e,t){this.type=n.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=A;var D=function(){function e(){this.type=n.Syntax.EmptyStatement}return e}();t.EmptyStatement=D;var C=function(){function e(e){this.type=n.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=C;var S=function(){function e(e){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=S;var _=function(){function e(e,t,r){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r}return e}();t.ExportNamedDeclaration=_;var w=function(){function e(e,t){this.type=n.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=w;var k=function(){function e(e){this.type=n.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=k;var F=function(){function e(e,t,r){this.type=n.Syntax.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1}return e}();t.ForInStatement=F;var T=function(){function e(e,t,r){this.type=n.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=r}return e}();t.ForOfStatement=T;var P=function(){function e(e,t,r,i){this.type=n.Syntax.ForStatement,this.init=e,this.test=t,this.update=r,this.body=i}return e}();t.ForStatement=P;var B=function(){function e(e,t,r,i){this.type=n.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}return e}();t.FunctionDeclaration=B;var O=function(){function e(e,t,r,i){this.type=n.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}return e}();t.FunctionExpression=O;var j=function(){function e(e){this.type=n.Syntax.Identifier,this.name=e}return e}();t.Identifier=j;var N=function(){function e(e,t,r){this.type=n.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=r}return e}();t.IfStatement=N;var I=function(){function e(e,t){this.type=n.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=I;var L=function(){function e(e){this.type=n.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=L;var M=function(){function e(e){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=M;var R=function(){function e(e,t){this.type=n.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=R;var U=function(){function e(e,t){this.type=n.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=U;var V=function(){function e(e,t){this.type=n.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=V;var q=function(){function e(e,t){this.type=n.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=q;var G=function(){function e(e,t,r,i,s){this.type=n.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=r,this.kind=i,this.static=s}return e}();t.MethodDefinition=G;var X=function(){function e(e,t){this.type=n.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=X;var J=function(){function e(e){this.type=n.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=J;var W=function(){function e(e){this.type=n.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=W;var K=function(){function e(e,t){this.type=n.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=K;var z=function(){function e(e,t,r,i,s,a){this.type=n.Syntax.Property,this.key=t,this.computed=r,this.value=i,this.kind=e,this.method=s,this.shorthand=a}return e}();t.Property=z;var Y=function(){function e(e,t,r){this.type=n.Syntax.Literal,this.value=e,this.raw=t,this.regex=r}return e}();t.RegexLiteral=Y;var H=function(){function e(e){this.type=n.Syntax.RestElement,this.argument=e}return e}();t.RestElement=H;var $=function(){function e(e){this.type=n.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Q=function(){function e(e){this.type=n.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Q;var Z=function(){function e(e){this.type=n.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Z;var ee=function(){function e(e,t){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=n.Syntax.Super}return e}();t.Super=te;var re=function(){function e(e,t){this.type=n.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=re;var ne=function(){function e(e,t){this.type=n.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=ne;var ie=function(){function e(e,t){this.type=n.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ie;var se=function(){function e(e,t){this.type=n.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=se;var ae=function(){function e(e,t){this.type=n.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=ae;var oe=function(){function e(){this.type=n.Syntax.ThisExpression}return e}();t.ThisExpression=oe;var ue=function(){function e(e){this.type=n.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var le=function(){function e(e,t,r){this.type=n.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=r}return e}();t.TryStatement=le;var ce=function(){function e(e,t){this.type=n.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=ce;var pe=function(){function e(e,t,r){this.type=n.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=r}return e}();t.UpdateExpression=pe;var he=function(){function e(e,t){this.type=n.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=he;var fe=function(){function e(e,t){this.type=n.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=fe;var de=function(){function e(e,t){this.type=n.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=n.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ye=function(){function e(e,t){this.type=n.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ye},function(e,t,r){"use strict";function n(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var r=e;t=n(r.namespace)+":"+n(r.name);break;case c.JSXSyntax.JSXMemberExpression:var i=e;t=n(i.object)+"."+n(i.property)}return t}var i,s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=r(9),o=r(7),u=r(3),l=r(12),c=r(13),p=r(10),h=r(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),o.TokenName[i.Identifier]="JSXIdentifier",o.TokenName[i.Text]="JSXText";var f=function(e){function t(t,r,n){e.call(this,t,r,n)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,n=!1,i=!1,s=!1;!this.scanner.eof()&&r&&!n;){var o=this.scanner.source[this.scanner.index];if(o===e)break;if(n=";"===o,t+=o,++this.scanner.index,!n)switch(t.length){case 2:i="#"===o;break;case 3:i&&(s="x"===o,r=s||a.Character.isDecimalDigit(o.charCodeAt(0)),i=i&&!s);break;default:r=r&&!(i&&!a.Character.isDecimalDigit(o.charCodeAt(0))),r=r&&!(s&&!a.Character.isHexDigit(o.charCodeAt(0)))}}if(r&&n&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||s||!l.XHTMLEntities[u]||(t=l.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var r=this.scanner.index,n=this.scanner.source[this.scanner.index++],s="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===n)break;s+="&"===u?this.scanXHTMLEntity(n):u}return{type:o.Token.StringLiteral,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(46===e){var l=this.scanner.source.charCodeAt(this.scanner.index+1),c=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===l&&46===c?"...":".",r=this.scanner.index;return this.scanner.index+=t.length,{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(96===e)return{type:o.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){var r=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var p=this.scanner.source.slice(r,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,t+=r,a.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var n={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(n)),n},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.scanner.scanComments();var n=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===o.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===o.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new h.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXNamespacedName(r,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXMemberExpression(i,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=r;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new h.JSXNamespacedName(n,i))}else e=r;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==o.Token.StringLiteral&&this.throwUnexpectedToken(t);var r=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,r))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(e,new h.JSXAttribute(t,r))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),r=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(t,n,r))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new h.JSXClosingElement(t))}var r=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(r,i,n))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new h.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),r=this.nextJSXText();if(r.start<r.end){var n=this.getTokenRaw(r),i=this.finalize(t,new h.JSXText(r.value,n));e.push(i)}if("{"!==this.scanner.source[this.scanner.index])break;var s=this.parseJSXExpressionContainer();e.push(s)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var r=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===c.JSXSyntax.JSXOpeningElement){var s=i;if(s.selfClosing){var a=this.finalize(r,new h.JSXElement(s,[],null));e.children.push(a)}else t.push(e),e={node:r,opening:s,closing:null,children:[]}}if(i.type===c.JSXSyntax.JSXClosingElement){e.closing=i;var o=n(e.opening.name);if(o!==n(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",o),!(t.length>0))break;var a=this.finalize(e.node,new h.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),r=[],n=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:r});r=i.children,n=i.closing}return this.finalize(e,new h.JSXElement(t,r,n))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";var n=r(13),i=function(){function e(e){this.type=n.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=i;var s=function(){function e(e,t,r){this.type=n.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=r}return e}();t.JSXElement=s;var a=function(){function e(){this.type=n.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=a;var o=function(){function e(e){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=o;var u=function(){function e(e){this.type=n.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var l=function(){function e(e,t){this.type=n.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=l;var c=function(){function e(e,t){this.type=n.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=c;var p=function(){function e(e,t){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=p;var h=function(){function e(e,t,r){this.type=n.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=r}return e}();t.JSXOpeningElement=h;var f=function(){function e(e){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=f;var d=function(){function e(e,t){this.type=n.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,r){"use strict";var n=r(8),i=r(6),s=r(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var r=this.values[this.paren-1];t="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var n=this.values[this.curly-4];t=!!n&&!this.beforeFunctionExpression(n)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),o=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new n.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var r=e[t],n=void 0,i=this.scanner.source.slice(r.slice[0],r.slice[1]);n={type:r.multiLine?"BlockComment":"LineComment",value:i},this.trackRange&&(n.range=r.range),this.trackLoc&&(n.loc=r.loc),this.buffer.push(n)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var o=void 0;o="/"===this.scanner.source[this.scanner.index]?this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.scanPunctuator():this.scanner.lex(),this.reader.push(o);var u=void 0;u={type:s.TokenName[o.type],value:this.scanner.source.slice(o.start,o.end)},this.trackRange&&(u.range=[o.start,o.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=a),o.regex&&(u.regex=o.regex),this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=o}])})},{}],563:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"./util":572,dup:55}],564:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{"./base64":565,dup:56}],565:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{dup:57}],566:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],567:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{"./util":572,dup:59}],568:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60}],569:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"./array-set":563,"./base64-vlq":564,"./binary-search":566,"./quick-sort":568,"./util":572,dup:61}],570:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./array-set":563,"./base64-vlq":564,"./mapping-list":567,"./util":572,dup:62}],571:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./source-map-generator":570,"./util":572,dup:63}],572:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],573:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./lib/source-map-consumer":569,"./lib/source-map-generator":570,"./lib/source-node":571,dup:65}],574:[function(e,t,r){t.exports={plugins:[e("babel-plugin-syntax-async-functions"),e("babel-plugin-syntax-async-generators"),e("babel-plugin-transform-es2015-classes"),e("babel-plugin-transform-es2015-arrow-functions"),e("babel-plugin-transform-es2015-block-scoping"),e("babel-plugin-transform-es2015-for-of"),e("regenerator-transform").default]}},{"babel-plugin-syntax-async-functions":104,"babel-plugin-syntax-async-generators":105,"babel-plugin-transform-es2015-arrow-functions":106,"babel-plugin-transform-es2015-block-scoping":107,"babel-plugin-transform-es2015-classes":109,"babel-plugin-transform-es2015-for-of":112,"regenerator-transform":580}],575:[function(e,t,r){(function(t){r.path=e("path").join(t,"runtime.js")}).call(this,"/node_modules/regenerator-runtime")},{path:535}],576:[function(e,t,r){(function(r){var n="object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this,i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,s=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=s;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./runtime":577}],577:[function(e,t,r){(function(e,r){!function(r){"use strict";function n(e,t,r,n){var i=t&&t.prototype instanceof s?t:s,a=Object.create(i.prototype),o=new d(n||[]);return a._invoke=c(e,r,o),a}function i(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function s(){}function a(){}function o(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(t){function r(e,n,s,a){var o=i(t[e],t,n);if("throw"!==o.type){var u=o.arg,l=u.value;return l&&"object"==typeof l&&v.call(l,"__await")?Promise.resolve(l.__await).then(function(e){r("next",e,s,a)},function(e){r("throw",e,s,a)}):Promise.resolve(l).then(function(e){u.value=e,s(u)},a)}a(o.arg)}function n(e,t){function n(){return new Promise(function(n,i){r(e,t,n,i)})}return s=s?s.then(n,n):n()}"object"==typeof e&&e.domain&&(r=e.domain.bind(r));var s;this._invoke=n}function c(e,t,r){var n=S;return function(s,a){if(n===w)throw new Error("Generator is already running");if(n===k){if("throw"===s)throw a;return y()}for(r.method=s,r.arg=a;;){var o=r.delegate;if(o){var u=p(o,r);if(u){if(u===F)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===S)throw n=k,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=w;var l=i(e,t,r);if("normal"===l.type){if(n=r.done?k:_,l.arg===F)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=k,r.method="throw",r.arg=l.arg)}}}function p(e,t){var r=e.iterator[t.method];if(r===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,p(e,t),"throw"===t.method))return F;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return F}var n=i(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,F;var s=n.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,F):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,F)}function h(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,this),this.reset(!0)}function m(e){if(e){var t=e[E];if(t)return t.call(e);if("function"==typeof e.next)return e
-;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(v.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=g,t.done=!0,t};return n.next=n}}return{next:y}}function y(){return{value:g,done:!0}}var g,b=Object.prototype,v=b.hasOwnProperty,x="function"==typeof Symbol?Symbol:{},E=x.iterator||"@@iterator",A=x.toStringTag||"@@toStringTag",D="object"==typeof t,C=r.regeneratorRuntime;if(C)return void(D&&(t.exports=C));C=r.regeneratorRuntime=D?t.exports:{},C.wrap=n;var S="suspendedStart",_="suspendedYield",w="executing",k="completed",F={},T={};T[E]=function(){return this};var P=Object.getPrototypeOf,B=P&&P(P(m([])));B&&B!==b&&v.call(B,E)&&(T=B);var O=o.prototype=s.prototype=Object.create(T);a.prototype=O.constructor=o,o.constructor=a,o[A]=a.displayName="GeneratorFunction",C.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},C.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,A in e||(e[A]="GeneratorFunction")),e.prototype=Object.create(O),e},C.awrap=function(e){return{__await:e}},u(l.prototype),C.AsyncIterator=l,C.async=function(e,t,r,i){var s=new l(n(e,t,r,i));return C.isGeneratorFunction(t)?s:s.next().then(function(e){return e.done?e.value:s.next()})},u(O),O[A]="Generator",O.toString=function(){return"[object Generator]"},C.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},C.values=m,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,n){return s.type="throw",s.arg=e,r.next=t,n&&(r.method="next",r.arg=g),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=v.call(i,"catchLoc"),o=v.call(i,"finallyLoc");if(a&&o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&v.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,F):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),F},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),f(r),F}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;f(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:m(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=g),F}}}("object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:539}],578:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){h.default.ok(this instanceof s),d.assertIdentifier(e),this.nextTempId=0,this.contextId=e,this.listing=[],this.marked=[!0],this.finalLoc=a(),this.tryEntries=[],this.leapManager=new y.LeapManager(this)}function a(){return d.numericLiteral(-1)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+(0,c.default)(e))}function u(e){var t=e.type;return"normal"===t?!E.call(e,"target"):"break"===t||"continue"===t?!E.call(e,"value")&&d.isLiteral(e.target):("return"===t||"throw"===t)&&(E.call(e,"value")&&!E.call(e,"target"))}var l=e("babel-runtime/core-js/json/stringify"),c=i(l),p=e("assert"),h=i(p),f=e("babel-types"),d=n(f),m=e("./leap"),y=n(m),g=e("./meta"),b=n(g),v=e("./util"),x=n(v),E=Object.prototype.hasOwnProperty,A=s.prototype;r.Emitter=s,A.mark=function(e){d.assertLiteral(e);var t=this.listing.length;return-1===e.value?e.value=t:h.default.strictEqual(e.value,t),this.marked[t]=!0,e},A.emit=function(e){d.isExpression(e)&&(e=d.expressionStatement(e)),d.assertStatement(e),this.listing.push(e)},A.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},A.assign=function(e,t){return d.expressionStatement(d.assignmentExpression("=",e,t))},A.contextProperty=function(e,t){return d.memberExpression(this.contextId,t?d.stringLiteral(e):d.identifier(e),!!t)},A.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},A.setReturnValue=function(e){d.assertExpression(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},A.clearPendingException=function(e,t){d.assertLiteral(e);var r=d.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,r):this.emit(r)},A.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(d.breakStatement())},A.jumpIf=function(e,t){d.assertExpression(e),d.assertLiteral(t),this.emit(d.ifStatement(e,d.blockStatement([this.assign(this.contextProperty("next"),t),d.breakStatement()])))},A.jumpIfNot=function(e,t){d.assertExpression(e),d.assertLiteral(t);var r=void 0;r=d.isUnaryExpression(e)&&"!"===e.operator?e.argument:d.unaryExpression("!",e),this.emit(d.ifStatement(r,d.blockStatement([this.assign(this.contextProperty("next"),t),d.breakStatement()])))},A.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},A.getContextFunction=function(e){return d.functionExpression(e||null,[this.contextId],d.blockStatement([this.getDispatchLoop()]),!1,!1)},A.getDispatchLoop=function(){var e=this,t=[],r=void 0,n=!1;return e.listing.forEach(function(i,s){e.marked.hasOwnProperty(s)&&(t.push(d.switchCase(d.numericLiteral(s),r=[])),n=!1),n||(r.push(i),d.isCompletionStatement(i)&&(n=!0))}),this.finalLoc.value=this.listing.length,t.push(d.switchCase(this.finalLoc,[]),d.switchCase(d.stringLiteral("end"),[d.returnStatement(d.callExpression(this.contextProperty("stop"),[]))])),d.whileStatement(d.numericLiteral(1),d.switchStatement(d.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),t))},A.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return d.arrayExpression(this.tryEntries.map(function(t){var r=t.firstLoc.value;h.default.ok(r>=e,"try entries out of order"),e=r;var n=t.catchEntry,i=t.finallyEntry,s=[t.firstLoc,n?n.firstLoc:null];return i&&(s[2]=i.firstLoc,s[3]=i.afterLoc),d.arrayExpression(s)}))},A.explode=function(e,t){var r=e.node,n=this;if(d.assertNode(r),d.isDeclaration(r))throw o(r);if(d.isStatement(r))return n.explodeStatement(e);if(d.isExpression(r))return n.explodeExpression(e,t);switch(r.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw o(r);case"Property":case"SwitchCase":case"CatchClause":throw new Error(r.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+(0,c.default)(r.type))}},A.explodeStatement=function(e,t){var r=e.node,n=this,i=void 0,s=void 0,o=void 0;if(d.assertStatement(r),t?d.assertIdentifier(t):t=null,d.isBlockStatement(r))return void e.get("body").forEach(function(e){n.explodeStatement(e)});if(!b.containsLeap(r))return void n.emit(r);switch(r.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":s=a(),n.leapManager.withEntry(new y.LabeledEntry(s,r.label),function(){n.explodeStatement(e.get("body"),r.label)}),n.mark(s);break;case"WhileStatement":i=a(),s=a(),n.mark(i),n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,i,t),function(){n.explodeStatement(e.get("body"))}),n.jump(i),n.mark(s);break;case"DoWhileStatement":var u=a(),l=a();s=a(),n.mark(u),n.leapManager.withEntry(new y.LoopEntry(s,l,t),function(){n.explode(e.get("body"))}),n.mark(l),n.jumpIf(n.explodeExpression(e.get("test")),u),n.mark(s);break;case"ForStatement":o=a();var p=a();s=a(),r.init&&n.explode(e.get("init"),!0),n.mark(o),r.test&&n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,p,t),function(){n.explodeStatement(e.get("body"))}),n.mark(p),r.update&&n.explode(e.get("update"),!0),n.jump(o),n.mark(s);break;case"TypeCastExpression":return n.explodeExpression(e.get("expression"));case"ForInStatement":o=a(),s=a();var f=n.makeTempVar();n.emitAssign(f,d.callExpression(x.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))])),n.mark(o);var m=n.makeTempVar();n.jumpIf(d.memberExpression(d.assignmentExpression("=",m,d.callExpression(f,[])),d.identifier("done"),!1),s),n.emitAssign(r.left,d.memberExpression(m,d.identifier("value"),!1)),n.leapManager.withEntry(new y.LoopEntry(s,o,t),function(){n.explodeStatement(e.get("body"))}),n.jump(o),n.mark(s);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(r.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(r.label)});break;case"SwitchStatement":var g=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));s=a();for(var v=a(),E=v,A=[],C=r.cases||[],S=C.length-1;S>=0;--S){var _=C[S];d.assertSwitchCase(_),_.test?E=d.conditionalExpression(d.binaryExpression("===",g,_.test),A[S]=a(),E):A[S]=v}var w=e.get("discriminant");w.replaceWith(E),n.jump(n.explodeExpression(w)),n.leapManager.withEntry(new y.SwitchEntry(s),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(A[t]),e.get("consequent").forEach(function(e){n.explodeStatement(e)})})}),n.mark(s),-1===v.value&&(n.mark(v),h.default.strictEqual(s.value,v.value));break;case"IfStatement":var k=r.alternate&&a();s=a(),n.jumpIfNot(n.explodeExpression(e.get("test")),k||s),n.explodeStatement(e.get("consequent")),k&&(n.jump(s),n.mark(k),n.explodeStatement(e.get("alternate"))),n.mark(s);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":s=a();var F=r.handler,T=F&&a(),P=T&&new y.CatchEntry(T,F.param),B=r.finalizer&&a(),O=B&&new y.FinallyEntry(B,s),j=new y.TryEntry(n.getUnmarkedCurrentLoc(),P,O);n.tryEntries.push(j),n.updateContextPrevLoc(j.firstLoc),n.leapManager.withEntry(j,function(){if(n.explodeStatement(e.get("block")),T){B?n.jump(B):n.jump(s),n.updateContextPrevLoc(n.mark(T));var t=e.get("handler.body"),r=n.makeTempVar();n.clearPendingException(j.firstLoc,r),t.traverse(D,{safeParam:r,catchParamName:F.param.name}),n.leapManager.withEntry(P,function(){n.explodeStatement(t)})}B&&(n.updateContextPrevLoc(n.mark(B)),n.leapManager.withEntry(O,function(){n.explodeStatement(e.get("finalizer"))}),n.emit(d.returnStatement(d.callExpression(n.contextProperty("finish"),[O.firstLoc]))))}),n.mark(s);break;case"ThrowStatement":n.emit(d.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+(0,c.default)(r.type))}};var D={Identifier:function(e,t){e.node.name===t.catchParamName&&x.isReference(e)&&e.replaceWith(t.safeParam)},Scope:function(e,t){e.scope.hasOwnBinding(t.catchParamName)&&e.skip()}};A.emitAbruptCompletion=function(e){u(e)||h.default.ok(!1,"invalid completion record: "+(0,c.default)(e)),h.default.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[d.stringLiteral(e.type)];"break"===e.type||"continue"===e.type?(d.assertLiteral(e.target),t[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(d.assertExpression(e.value),t[1]=e.value),this.emit(d.returnStatement(d.callExpression(this.contextProperty("abrupt"),t)))},A.getUnmarkedCurrentLoc=function(){return d.numericLiteral(this.listing.length)},A.updateContextPrevLoc=function(e){e?(d.assertLiteral(e),-1===e.value?e.value=this.listing.length:h.default.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},A.explodeExpression=function(e,t){function r(e){if(d.assertExpression(e),!t)return e;s.emit(e)}function n(e,t,r){h.default.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=s.explodeExpression(t,r);return r||(e||l&&!d.isLiteral(n))&&(n=s.emitAssign(e||s.makeTempVar(),n)),n}var i=e.node;if(!i)return i;d.assertExpression(i);var s=this,o=void 0,u=void 0;if(!b.containsLeap(i))return r(i);var l=b.containsLeap.onlyChildren(i);switch(i.type){case"MemberExpression":return r(d.memberExpression(s.explodeExpression(e.get("object")),i.computed?n(null,e.get("property")):i.property,i.computed));case"CallExpression":var p=e.get("callee"),f=e.get("arguments"),m=void 0,y=[],g=!1;if(f.forEach(function(e){g=g||b.containsLeap(e.node)}),d.isMemberExpression(p.node))if(g){var v=n(s.makeTempVar(),p.get("object")),x=p.node.computed?n(null,p.get("property")):p.node.property;y.unshift(v),m=d.memberExpression(d.memberExpression(v,x,p.node.computed),d.identifier("call"),!1)}else m=s.explodeExpression(p);else m=n(null,p),d.isMemberExpression(m)&&(m=d.sequenceExpression([d.numericLiteral(0),m]));return f.forEach(function(e){y.push(n(null,e))}),r(d.callExpression(m,y));case"NewExpression":return r(d.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})));case"ObjectExpression":return r(d.objectExpression(e.get("properties").map(function(e){return e.isObjectProperty()?d.objectProperty(e.node.key,n(null,e.get("value")),e.node.computed):e.node})));case"ArrayExpression":return r(d.arrayExpression(e.get("elements").map(function(e){return n(null,e)})));case"SequenceExpression":var E=i.expressions.length-1;return e.get("expressions").forEach(function(e){e.key===E?o=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),o;case"LogicalExpression":u=a(),t||(o=s.makeTempVar());var A=n(o,e.get("left"));return"&&"===i.operator?s.jumpIfNot(A,u):(h.default.strictEqual(i.operator,"||"),s.jumpIf(A,u)),n(o,e.get("right"),t),s.mark(u),o;case"ConditionalExpression":var D=a();u=a();var C=s.explodeExpression(e.get("test"));return s.jumpIfNot(C,D),t||(o=s.makeTempVar()),n(o,e.get("consequent"),t),s.jump(u),s.mark(D),n(o,e.get("alternate"),t),s.mark(u),o;case"UnaryExpression":return r(d.unaryExpression(i.operator,s.explodeExpression(e.get("argument")),!!i.prefix));case"BinaryExpression":return r(d.binaryExpression(i.operator,n(null,e.get("left")),n(null,e.get("right"))));case"AssignmentExpression":return r(d.assignmentExpression(i.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))));case"UpdateExpression":return r(d.updateExpression(i.operator,s.explodeExpression(e.get("argument")),i.prefix));case"YieldExpression":u=a();var S=i.argument&&s.explodeExpression(e.get("argument"));if(S&&i.delegate){var _=s.makeTempVar();return s.emit(d.returnStatement(d.callExpression(s.contextProperty("delegateYield"),[S,d.stringLiteral(_.property.name),u]))),s.mark(u),_}return s.emitAssign(s.contextProperty("next"),u),s.emit(d.returnStatement(S||null)),s.mark(u),s.contextProperty("sent");default:throw new Error("unknown Expression of type "+(0,c.default)(i.type))}}},{"./leap":581,"./meta":582,"./util":584,assert:3,"babel-runtime/core-js/json/stringify":114,"babel-types":169}],579:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/keys"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=e("babel-types"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s),o=Object.prototype.hasOwnProperty;r.hoist=function(e){function t(e,t){a.assertVariableDeclaration(e);var n=[];return e.declarations.forEach(function(e){r[e.id.name]=a.identifier(e.id.name),e.init?n.push(a.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:a.sequenceExpression(n)}a.assertFunction(e.node);var r={};e.get("body").traverse({VariableDeclaration:{exit:function(e){var r=t(e.node,!1);null===r?e.remove():e.replaceWith(a.expressionStatement(r)),e.skip()}},ForStatement:function(e){var r=e.node.init;a.isVariableDeclaration(r)&&e.get("init").replaceWith(t(r,!1))},ForXStatement:function(e){var r=e.get("left");r.isVariableDeclaration()&&r.replaceWith(t(r.node,!0))},FunctionDeclaration:function(e){var t=e.node;r[t.id.name]=t.id;var n=a.expressionStatement(a.assignmentExpression("=",t.id,a.functionExpression(t.id,t.params,t.body,t.generator,t.expression)));e.parentPath.isBlockStatement()?(e.parentPath.unshiftContainer("body",n),e.remove()):e.replaceWith(n),e.skip()},FunctionExpression:function(e){e.skip()}});var n={};e.get("params").forEach(function(e){var t=e.node;a.isIdentifier(t)&&(n[t.name]=t)});var s=[];return(0,i.default)(r).forEach(function(e){o.call(n,e)||s.push(a.variableDeclarator(r[e],null))}),0===s.length?null:a.variableDeclaration("var",s)}},{"babel-runtime/core-js/object/keys":120,"babel-types":169}],580:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return e("./visit")}},{"./visit":585}],581:[function(e,t,r){"use strict";function n(){f.default.ok(this instanceof n)}function i(e){n.call(this),m.assertLiteral(e),this.returnLoc=e}function s(e,t,r){n.call(this),m.assertLiteral(e),m.assertLiteral(t),r?m.assertIdentifier(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function a(e){n.call(this),m.assertLiteral(e),this.breakLoc=e}function o(e,t,r){n.call(this),m.assertLiteral(e),t?f.default.ok(t instanceof u):t=null,r?f.default.ok(r instanceof l):r=null,f.default.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function u(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.firstLoc=e,this.paramId=t}function l(e,t){n.call(this),m.assertLiteral(e),m.assertLiteral(t),this.firstLoc=e,this.afterLoc=t}function c(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.breakLoc=e,this.label=t}function p(t){f.default.ok(this instanceof p);var r=e("./emit").Emitter;f.default.ok(t instanceof r),this.emitter=t,this.entryStack=[new i(t.finalLoc)]}var h=e("assert"),f=function(e){return e&&e.__esModule?e:{default:e}}(h),d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("util");(0,y.inherits)(i,n),r.FunctionEntry=i,(0,y.inherits)(s,n),r.LoopEntry=s,(0,y.inherits)(a,n),r.SwitchEntry=a,(0,y.inherits)(o,n),r.TryEntry=o,(0,y.inherits)(u,n),r.CatchEntry=u,(0,y.inherits)(l,n),r.FinallyEntry=l,(0,y.inherits)(c,n),r.LabeledEntry=c;var g=p.prototype;r.LeapManager=p,g.withEntry=function(e,t){f.default.ok(e instanceof n),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();f.default.strictEqual(r,e)}},g._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof c))return i}return null},g.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},g.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":578,assert:3,"babel-types":169,util:601}],582:[function(e,t,r){"use strict";function n(e,t){function r(e){function t(e){return r||(Array.isArray(e)?e.some(t):o.isNode(e)&&(s.default.strictEqual(r,!1),r=n(e))),r}o.assertNode(e);var r=!1,i=o.VISITOR_KEYS[e.type];if(i)for(var a=0;a<i.length;a++){var u=i[a],l=e[u];t(l)}return r}function n(n){o.assertNode(n);var i=u(n);return l.call(i,e)?i[e]:l.call(c,n.type)?i[e]=!1:l.call(t,n.type)?i[e]=!0:i[e]=r(n)}return n.onlyChildren=r,n}var i=e("assert"),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u=e("private").makeAccessor(),l=Object.prototype.hasOwnProperty,c={FunctionExpression:!0,ArrowFunctionExpression:!0},p={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},h={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var f in h)l.call(h,f)&&(p[f]=h[f]);r.hasSideEffects=n("hasSideEffects",p),r.containsLeap=n("containsLeap",h)},{assert:3,"babel-types":169,private:537}],583:[function(e,t,r){"use strict";function n(e){if(!e.node||!s.isFunction(e.node))throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");if(!s.isObjectMethod(e.node))return e;if(!e.node.generator)return e;var t=e.node.params.map(function(e){return s.cloneDeep(e)}),r=s.functionExpression(null,t,s.cloneDeep(e.node.body),e.node.generator,e.node.async);return e.replaceWith(s.objectProperty(s.cloneDeep(e.node.key),r,e.node.computed,!1)),e.get("value")}r.__esModule=!0,r.default=n;var i=e("babel-types"),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i)},{"babel-types":169}],584:[function(e,t,r){"use strict";function n(e){return a.memberExpression(a.identifier("regeneratorRuntime"),a.identifier(e),!1)}function i(e){return e.isReferenced()||e.parentPath.isAssignmentExpression({left:e.node})}r.__esModule=!0,r.runtimeProperty=n,r.isReference=i;var s=e("babel-types"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s)},{"babel-types":169}],585:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=e.node;if(p.assertFunction(t),t.id||(t.id=e.scope.parent.generateUidIdentifier("callee")),t.generator&&p.isFunctionDeclaration(t)){var r=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!r)return t.id;var n=a(r),i=n.declarations[0].id,s=n.declarations[0].init.callee.object;p.assertArrayExpression(s);var o=s.elements.length;return s.elements.push(t.id),p.memberExpression(i,p.numericLiteral(o),!0)}return t.id}function a(e){var t=e.node;l.default.ok(Array.isArray(t.body));var r=b(t);return r.decl?r.decl:(r.decl=p.variableDeclaration("var",[p.variableDeclarator(e.scope.generateUidIdentifier("marked"),p.callExpression(p.memberExpression(p.arrayExpression([]),p.identifier("map"),!1),[g.runtimeProperty("mark")]))]),e.unshiftContainer("body",r.decl),r.decl)}function o(e,t){var r={didRenameArguments:!1,argsId:t};return e.traverse(v,r),r.didRenameArguments}var u=e("assert"),l=i(u),c=e("babel-types"),p=n(c),h=e("./hoist"),f=e("./emit"),d=e("./replaceShorthandObjectMethod"),m=i(d),y=e("./util"),g=n(y),b=e("private").makeAccessor();r.visitor={Function:{exit:function(e,t){var r=e.node;if(r.generator){if(r.async){if(!1===t.opts.asyncGenerators)return}else if(!1===t.opts.generators)return}else{if(!r.async)return;if(!1===t.opts.async)return}e=(0,m.default)(e),r=e.node;var n=e.scope.generateUidIdentifier("context"),i=e.scope.generateUidIdentifier("args");e.ensureBlock();var a=e.get("body");r.async&&a.traverse(E),a.traverse(x,{context:n});var u=[],l=[];a.get("body").forEach(function(e){var t=e.node;p.isExpressionStatement(t)&&p.isStringLiteral(t.expression)?u.push(t):t&&null!=t._blockHoist?u.push(t):l.push(t)}),u.length>0&&(a.node.body=l);var c=s(e);p.assertIdentifier(r.id);var d=p.identifier(r.id.name+"$"),y=(0,h.hoist)(e);if(o(e,i)){y=y||p.variableDeclaration("var",[]);var b=p.identifier("arguments");b._shadowedFunctionLiteral=e,y.declarations.push(p.variableDeclarator(i,b))}var v=new f.Emitter(n);v.explode(e.get("body")),y&&y.declarations.length>0&&u.push(y);var A=[v.getContextFunction(d),r.generator?c:p.nullLiteral(),p.thisExpression()],D=v.getTryLocsList();D&&A.push(D);var C=p.callExpression(g.runtimeProperty(r.async?"async":"wrap"),A);u.push(p.returnStatement(C)),r.body=p.blockStatement(u);var S=a.node.directives;S&&(r.body.directives=S);var _=r.generator;_&&(r.generator=!1),r.async&&(r.async=!1),_&&p.isExpression(r)&&e.replaceWith(p.callExpression(g.runtimeProperty("mark"),[r])),e.requeue()}}};var v={"FunctionExpression|FunctionDeclaration":function(e){e.skip()},Identifier:function(e,t){"arguments"===e.node.name&&g.isReference(e)&&(e.replaceWith(t.argsId),t.didRenameArguments=!0)}},x={MetaProperty:function(e){var t=e.node;"function"===t.meta.name&&"sent"===t.property.name&&e.replaceWith(p.memberExpression(this.context,p.identifier("_sent")))}},E={Function:function(e){e.skip()},AwaitExpression:function(e){var t=e.node.argument;e.replaceWith(p.yieldExpression(p.callExpression(g.runtimeProperty("awrap"),[t]),!1))}}},{"./emit":578,"./hoist":579,"./replaceShorthandObjectMethod":583,"./util":584,assert:3,"babel-types":169,private:537}],586:[function(e,t,r){var n=(e("assert"),e("recast").types),i=n.namedTypes,s=n.builders,a=Object.prototype.hasOwnProperty;r.defaults=function(e){for(var t,r=arguments.length,n=1;n<r;++n)if(t=arguments[n])for(var i in t)a.call(t,i)&&!a.call(e,i)&&(e[i]=t[i]);return e},r.runtimeProperty=function(e){return s.memberExpression(s.identifier("regeneratorRuntime"),s.identifier(e),!1)},r.isReference=function(e,t){var r=e.value;if(!i.Identifier.check(r))return!1;if(t&&r.name!==t)return!1;var n=e.parent.value;switch(n.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||n.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"!==e.name&&("params"!==e.parentPath.name||n.params!==e.parentPath.value||n.params[e.name]!==r);case"ClassDeclaration":case"ClassExpression":return"id"!==e.name;case"CatchClause":return"param"!==e.name;case"Property":case"MethodDefinition":return"key"!==e.name;case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"LabeledStatement":return!1;default:return!0}}},{assert:3,recast:561}],587:[function(e,t,r){function n(t){a.Program.assert(t);var r=e("..").runtime.path,n=fs.readFileSync(r,"utf8"),s=i.parse(n,{sourceFileName:r}).program.body,o=t.body;o.unshift.apply(o,s)}var i=e("recast"),s=i.types,a=s.namedTypes,o=e("./util.js");r.transform=function(t,r){return r=o.defaults(r||{},{includeRuntime:!1}),t=e("babel-core").transformFromAst(t,null,{presets:[e("regenerator-preset")],code:!1,ast:!0}).ast,!0===r.includeRuntime&&n(a.File.check(t)?t.program:t),t}},{"..":"regenerator","./util.js":586,"babel-core":28,recast:561,"regenerator-preset":574}],588:[function(e,t,r){"use strict";var n=e("is-finite");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `input` to be a string");if(t<0||!n(t))throw new TypeError("Expected `count` to be a positive finite number");var r="";do{1&t&&(r+=e),e+=e}while(t>>=1);return r}},{"is-finite":309}],589:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],590:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function n(){l.readable&&l.resume&&l.resume()}function s(){c||(c=!0,e.end())}function a(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function o(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",r),e.removeListener("drain",n),l.removeListener("end",s),l.removeListener("close",a),l.removeListener("error",o),e.removeListener("error",o),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(l.on("end",s),l.on("close",a));var c=!1;return l.on("error",o),e.on("error",o),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},{events:301,inherits:306,"readable-stream/duplex.js":540,"readable-stream/passthrough.js":547,"readable-stream/readable.js":548,"readable-stream/transform.js":549,"readable-stream/writable.js":550}],591:[function(e,t,r){function n(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var o=e("buffer").Buffer,u=o.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},l=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};l.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=t.charCodeAt(t.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&n<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),e.copy(this.charBuffer,0,0,s),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:184}],592:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":1}],
-593:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t<n)};t.exports=function(){return"FORCE_COLOR"in e.env||!(i("no-color")||i("no-colors")||i("color=false"))&&(!!(i("color")||i("colors")||i("color=true")||i("color=always"))||!(e.stdout&&!e.stdout.isTTY)&&("win32"===e.platform||("COLORTERM"in e.env||"dumb"!==e.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM))))}()}).call(this,e("_process"))},{_process:539}],594:[function(e,t,r){(function(n){function i(e,t,r){function i(){for(;l.length&&!p.paused;){var e=l.shift();if(null===e)return p.emit("end");p.emit("data",e)}}function a(){p.writable=!1,t.call(p),!p.readable&&p.autoDestroy&&p.destroy()}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var o=!1,u=!1,l=[],c=!1,p=new s;return p.readable=p.writable=!0,p.paused=!1,p.autoDestroy=!(r&&!1===r.autoDestroy),p.write=function(t){return e.call(this,t),!p.paused},p.queue=p.push=function(e){return c?p:(null===e&&(c=!0),l.push(e),i(),p)},p.on("end",function(){p.readable=!1,!p.writable&&p.autoDestroy&&n.nextTick(function(){p.destroy()})}),p.end=function(e){if(!o)return o=!0,arguments.length&&p.write(e),a(),p},p.destroy=function(){if(!u)return u=!0,o=!0,l.length=0,p.writable=p.readable=!1,p.emit("close"),p},p.pause=function(){if(!p.paused)return p.paused=!0,p},p.resume=function(){return p.paused&&(p.paused=!1,p.emit("resume")),i(),p.paused||p.emit("drain"),p},p}var s=e("stream");r=t.exports=i,i.through=i}).call(this,e("_process"))},{_process:539,stream:590}],595:[function(e,t,r){"use strict";t.exports=function e(t){function r(){}r.prototype=t,new r}},{}],596:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length;/[\s\uFEFF\u00A0]/.test(e[t-1]);)t--;return e.slice(0,t)}},{}],597:[function(e,t,r){function n(){throw new Error("tty.ReadStream is not implemented")}function i(){throw new Error("tty.ReadStream is not implemented")}r.isatty=function(){return!1},r.ReadStream=n,r.WriteStream=i},{}],598:[function(e,t,r){(function(e){function r(e,t){function r(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],599:[function(e,t,r){arguments[4][306][0].apply(r,arguments)},{dup:306}],600:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],601:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return v(i)||(i=u(e,i,n)),i}var s=l(e,t);if(s)return s;var a=Object.keys(t),m=o(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),S(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(_(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(A(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return c(t)}var g="",b=!1,x=["{","}"];if(d(t)&&(b=!0,x=["[","]"]),_(t)){g=" [Function"+(t.name?": "+t.name:"")+"]"}if(A(t)&&(g=" "+RegExp.prototype.toString.call(t)),C(t)&&(g=" "+Date.prototype.toUTCString.call(t)),S(t)&&(g=" "+c(t)),0===a.length&&(!b||0==t.length))return x[0]+g+x[1];if(n<0)return A(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=b?p(e,t,n,m,a):a.map(function(r){return h(e,t,n,m,r,b)}),e.seen.pop(),f(E,g,x)}function l(e,t){if(E(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)P(t,String(a))?s.push(h(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(h(e,t,r,n,i,!0))}),s}function h(e,t,r,n,i,s){var a,o,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?o=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(o=e.stylize("[Setter]","special")),P(n,i)||(a="["+i+"]"),o||(e.seen.indexOf(l.value)<0?(o=y(r)?u(e,l.value,null):u(e,l.value,r-1),o.indexOf("\n")>-1&&(o=s?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),E(a)){if(s&&i.match(/^\d+$/))return o;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function f(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function x(e){return"symbol"==typeof e}function E(e){return void 0===e}function A(e){return D(e)&&"[object RegExp]"===k(e)}function D(e){return"object"==typeof e&&null!==e}function C(e){return D(e)&&"[object Date]"===k(e)}function S(e){return D(e)&&("[object Error]"===k(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function k(e){return Object.prototype.toString.call(e)}function F(e){return e<10?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[F(e.getHours()),F(e.getMinutes()),F(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,s=n.length,a=String(e).replace(/%[sdj%]/g,function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<s;o=n[++r])y(o)||!D(o)?a+=" "+o:a+=" "+i(o);return a},r.deprecate=function(e,i){function s(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(E(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return s};var B,O={};r.debuglog=function(e){if(E(B)&&(B=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!O[e])if(new RegExp("\\b"+e+"\\b","i").test(B)){var n=t.pid;O[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else O[e]=function(){};return O[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=m,r.isNull=y,r.isNullOrUndefined=g,r.isNumber=b,r.isString=v,r.isSymbol=x,r.isUndefined=E,r.isRegExp=A,r.isObject=D,r.isDate=C,r.isError=S,r.isFunction=_,r.isPrimitive=w,r.isBuffer=e("./support/isBuffer");var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!D(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":600,_process:539,inherits:599}],regenerator:[function(e,t,r){function r(e,t){function r(e){i.push(e)}function n(){try{this.queue(s(i.join(""),t).code),this.queue(null)}catch(e){this.emit("error",e)}}var i=[];return o(r,n)}function n(){regeneratorRuntime=e("regenerator-runtime")}function i(){return p||(p=a.readFileSync(n.path,"utf8"))}function s(t,r){var n;return r=l.defaults(r||{},{includeRuntime:!1}),n=c.test(t)?e("babel-core").transform(t,h):{code:t},!0===r.includeRuntime&&(n.code=i()+"\n"+n.code),n}var a=e("fs"),o=e("through"),u=e("./lib/visit").transform,l=e("./lib/util"),c=/\bfunction\s*\*|\basync\b/;t.exports=r,r.runtime=n,n.path=e("regenerator-runtime/path.js").path;var p,h={presets:[e("regenerator-preset")],parserOpts:{sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,strictMode:!1,plugins:["*","jsx","flow"]}};r.types=e("recast").types,r.compile=s,r.transform=u},{"./lib/util":586,"./lib/visit":587,"babel-core":28,fs:182,recast:561,"regenerator-preset":574,"regenerator-runtime":576,"regenerator-runtime/path.js":575,through:594}]},{},[]); \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/ajv.d.ts b/node_modules/node-gyp/node_modules/ajv/lib/ajv.d.ts
deleted file mode 100644
index 5976e9e3f..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/ajv.d.ts
+++ /dev/null
@@ -1,284 +0,0 @@
-declare var ajv: {
- (options?: ajv.Options): ajv.Ajv;
- new (options?: ajv.Options): ajv.Ajv;
-}
-
-declare namespace ajv {
- interface Ajv {
- /**
- * Validate data using schema
- * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
- * @param {String|Object} schemaKeyRef key, ref or schema object
- * @param {Any} data to be validated
- * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
- */
- validate(schemaKeyRef: Object | string, data: any): boolean;
- /**
- * Create validating function for passed schema.
- * @param {Object} schema schema object
- * @return {Function} validating function
- */
- compile(schema: Object): ValidateFunction;
- /**
- * Creates validating function for passed schema with asynchronous loading of missing schemas.
- * `loadSchema` option should be a function that accepts schema uri and node-style callback.
- * @this Ajv
- * @param {Object} schema schema object
- * @param {Function} callback node-style callback, it is always called with 2 parameters: error (or null) and validating function.
- */
- compileAsync(schema: Object, callback: (err: Error, validate: ValidateFunction) => any): void;
- /**
- * Adds schema to the instance.
- * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
- * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
- */
- addSchema(schema: Array<Object> | Object, key?: string): void;
- /**
- * Add schema that will be used to validate other schemas
- * options in META_IGNORE_OPTIONS are alway set to false
- * @param {Object} schema schema object
- * @param {String} key optional schema key
- */
- addMetaSchema(schema: Object, key?: string): void;
- /**
- * Validate schema
- * @param {Object} schema schema to validate
- * @return {Boolean} true if schema is valid
- */
- validateSchema(schema: Object): boolean;
- /**
- * Get compiled schema from the instance by `key` or `ref`.
- * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
- * @return {Function} schema validating function (with property `schema`).
- */
- getSchema(keyRef: string): ValidateFunction;
- /**
- * Remove cached schema(s).
- * If no parameter is passed all schemas but meta-schemas are removed.
- * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
- * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
- * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
- */
- removeSchema(schemaKeyRef?: Object | string | RegExp): void;
- /**
- * Add custom format
- * @param {String} name format name
- * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
- */
- addFormat(name: string, format: FormatValidator | FormatDefinition): void;
- /**
- * Define custom keyword
- * @this Ajv
- * @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
- * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
- */
- addKeyword(keyword: string, definition: KeywordDefinition): void;
- /**
- * Get keyword definition
- * @this Ajv
- * @param {String} keyword pre-defined or custom keyword.
- * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
- */
- getKeyword(keyword: string): Object | boolean;
- /**
- * Remove keyword
- * @this Ajv
- * @param {String} keyword pre-defined or custom keyword.
- */
- removeKeyword(keyword: string): void;
- /**
- * Convert array of error message objects to string
- * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
- * @param {Object} options optional options with properties `separator` and `dataVar`.
- * @return {String} human readable string with all errors descriptions
- */
- errorsText(errors?: Array<ErrorObject>, options?: ErrorsTextOptions): string;
- errors?: Array<ErrorObject>;
- }
-
- interface Thenable <R> {
- then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
- }
-
- interface ValidateFunction {
- (
- data: any,
- dataPath?: string,
- parentData?: Object | Array<any>,
- parentDataProperty?: string | number,
- rootData?: Object | Array<any>
- ): boolean | Thenable<boolean>;
- errors?: Array<ErrorObject>;
- schema?: Object;
- }
-
- interface Options {
- v5?: boolean;
- allErrors?: boolean;
- verbose?: boolean;
- jsonPointers?: boolean;
- uniqueItems?: boolean;
- unicode?: boolean;
- format?: string;
- formats?: Object;
- unknownFormats?: boolean | string | Array<string>;
- schemas?: Array<Object> | Object;
- ownProperties?: boolean;
- missingRefs?: boolean | string;
- extendRefs?: boolean | string;
- loadSchema?: (uri: string, cb: (err: Error, schema: Object) => any) => any;
- removeAdditional?: boolean | string;
- useDefaults?: boolean | string;
- coerceTypes?: boolean | string;
- async?: boolean | string;
- transpile?: string | ((code: string) => string);
- meta?: boolean | Object;
- validateSchema?: boolean | string;
- addUsedSchema?: boolean;
- inlineRefs?: boolean | number;
- passContext?: boolean;
- loopRequired?: number;
- multipleOfPrecision?: number;
- errorDataPath?: string;
- messages?: boolean;
- sourceCode?: boolean;
- beautify?: boolean | Object;
- cache?: Object;
- }
-
- type FormatValidator = string | RegExp | ((data: string) => boolean);
-
- interface FormatDefinition {
- validate: FormatValidator;
- compare: (data1: string, data2: string) => number;
- async?: boolean;
- }
-
- interface KeywordDefinition {
- type?: string | Array<string>;
- async?: boolean;
- errors?: boolean | string;
- // schema: false makes validate not to expect schema (ValidateFunction)
- schema?: boolean;
- modifying?: boolean;
- valid?: boolean;
- // one and only one of the following properties should be present
- validate?: ValidateFunction | SchemaValidateFunction;
- compile?: (schema: Object, parentSchema: Object) => ValidateFunction;
- macro?: (schema: Object, parentSchema: Object) => Object;
- inline?: (it: Object, keyword: string, schema: Object, parentSchema: Object) => string;
- }
-
- interface SchemaValidateFunction {
- (
- schema: Object,
- data: any,
- parentSchema?: Object,
- dataPath?: string,
- parentData?: Object | Array<any>,
- parentDataProperty?: string | number
- ): boolean | Thenable<boolean>;
- errors?: Array<ErrorObject>;
- }
-
- interface ErrorsTextOptions {
- separator?: string;
- dataVar?: string;
- }
-
- interface ErrorObject {
- keyword: string;
- dataPath: string;
- schemaPath: string;
- params: ErrorParameters;
- // Excluded if messages set to false.
- message?: string;
- // These are added with the `verbose` option.
- schema?: Object;
- parentSchema?: Object;
- data?: any;
- }
-
- type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams |
- DependenciesParams | FormatParams | ComparisonParams |
- MultipleOfParams | PatternParams | RequiredParams |
- TypeParams | UniqueItemsParams | CustomParams |
- PatternGroupsParams | PatternRequiredParams |
- SwitchParams | NoParams | EnumParams;
-
- interface RefParams {
- ref: string;
- }
-
- interface LimitParams {
- limit: number;
- }
-
- interface AdditionalPropertiesParams {
- additionalProperty: string;
- }
-
- interface DependenciesParams {
- property: string;
- missingProperty: string;
- depsCount: number;
- deps: string;
- }
-
- interface FormatParams {
- format: string
- }
-
- interface ComparisonParams {
- comparison: string;
- limit: number | string;
- exclusive: boolean;
- }
-
- interface MultipleOfParams {
- multipleOf: number;
- }
-
- interface PatternParams {
- pattern: string;
- }
-
- interface RequiredParams {
- missingProperty: string;
- }
-
- interface TypeParams {
- type: string;
- }
-
- interface UniqueItemsParams {
- i: number;
- j: number;
- }
-
- interface CustomParams {
- keyword: string;
- }
-
- interface PatternGroupsParams {
- reason: string;
- limit: number;
- pattern: string;
- }
-
- interface PatternRequiredParams {
- missingPattern: string;
- }
-
- interface SwitchParams {
- caseIndex: number;
- }
-
- interface NoParams {}
-
- interface EnumParams {
- allowedValues: Array<any>;
- }
-}
-
-export = ajv;
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/ajv.js b/node_modules/node-gyp/node_modules/ajv/lib/ajv.js
deleted file mode 100644
index 0502c1fd3..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/ajv.js
+++ /dev/null
@@ -1,420 +0,0 @@
-'use strict';
-
-var compileSchema = require('./compile')
- , resolve = require('./compile/resolve')
- , Cache = require('./cache')
- , SchemaObject = require('./compile/schema_obj')
- , stableStringify = require('json-stable-stringify')
- , formats = require('./compile/formats')
- , rules = require('./compile/rules')
- , v5 = require('./v5')
- , util = require('./compile/util')
- , async = require('./async')
- , co = require('co');
-
-module.exports = Ajv;
-
-Ajv.prototype.compileAsync = async.compile;
-
-var customKeyword = require('./keyword');
-Ajv.prototype.addKeyword = customKeyword.add;
-Ajv.prototype.getKeyword = customKeyword.get;
-Ajv.prototype.removeKeyword = customKeyword.remove;
-Ajv.ValidationError = require('./compile/validation_error');
-
-var META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';
-var SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i;
-function SCHEMA_URI_FORMAT_FUNC(str) {
- return SCHEMA_URI_FORMAT.test(str);
-}
-
-var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
-
-/**
- * Creates validator instance.
- * Usage: `Ajv(opts)`
- * @param {Object} opts optional options
- * @return {Object} ajv instance
- */
-function Ajv(opts) {
- if (!(this instanceof Ajv)) return new Ajv(opts);
- var self = this;
-
- opts = this._opts = util.copy(opts) || {};
- this._schemas = {};
- this._refs = {};
- this._fragments = {};
- this._formats = formats(opts.format);
- this._cache = opts.cache || new Cache;
- this._loadingSchemas = {};
- this._compilations = [];
- this.RULES = rules();
-
- // this is done on purpose, so that methods are bound to the instance
- // (without using bind) so that they can be used without the instance
- this.validate = validate;
- this.compile = compile;
- this.addSchema = addSchema;
- this.addMetaSchema = addMetaSchema;
- this.validateSchema = validateSchema;
- this.getSchema = getSchema;
- this.removeSchema = removeSchema;
- this.addFormat = addFormat;
- this.errorsText = errorsText;
-
- this._addSchema = _addSchema;
- this._compile = _compile;
-
- opts.loopRequired = opts.loopRequired || Infinity;
- if (opts.async || opts.transpile) async.setup(opts);
- if (opts.beautify === true) opts.beautify = { indent_size: 2 };
- if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
- this._metaOpts = getMetaSchemaOptions();
-
- if (opts.formats) addInitialFormats();
- addDraft4MetaSchema();
- if (opts.v5) v5.enable(this);
- if (typeof opts.meta == 'object') addMetaSchema(opts.meta);
- addInitialSchemas();
-
-
- /**
- * Validate data using schema
- * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
- * @param {String|Object} schemaKeyRef key, ref or schema object
- * @param {Any} data to be validated
- * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
- */
- function validate(schemaKeyRef, data) {
- var v;
- if (typeof schemaKeyRef == 'string') {
- v = getSchema(schemaKeyRef);
- if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
- } else {
- var schemaObj = _addSchema(schemaKeyRef);
- v = schemaObj.validate || _compile(schemaObj);
- }
-
- var valid = v(data);
- if (v.$async === true)
- return self._opts.async == '*' ? co(valid) : valid;
- self.errors = v.errors;
- return valid;
- }
-
-
- /**
- * Create validating function for passed schema.
- * @param {Object} schema schema object
- * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
- * @return {Function} validating function
- */
- function compile(schema, _meta) {
- var schemaObj = _addSchema(schema, undefined, _meta);
- return schemaObj.validate || _compile(schemaObj);
- }
-
-
- /**
- * Adds schema to the instance.
- * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
- * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
- * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
- * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
- */
- function addSchema(schema, key, _skipValidation, _meta) {
- if (Array.isArray(schema)){
- for (var i=0; i<schema.length; i++) addSchema(schema[i], undefined, _skipValidation, _meta);
- return;
- }
- // can key/id have # inside?
- key = resolve.normalizeId(key || schema.id);
- checkUnique(key);
- self._schemas[key] = _addSchema(schema, _skipValidation, _meta, true);
- }
-
-
- /**
- * Add schema that will be used to validate other schemas
- * options in META_IGNORE_OPTIONS are alway set to false
- * @param {Object} schema schema object
- * @param {String} key optional schema key
- * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
- */
- function addMetaSchema(schema, key, skipValidation) {
- addSchema(schema, key, skipValidation, true);
- }
-
-
- /**
- * Validate schema
- * @param {Object} schema schema to validate
- * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
- * @return {Boolean} true if schema is valid
- */
- function validateSchema(schema, throwOrLogError) {
- var $schema = schema.$schema || self._opts.defaultMeta || defaultMeta();
- var currentUriFormat = self._formats.uri;
- self._formats.uri = typeof currentUriFormat == 'function'
- ? SCHEMA_URI_FORMAT_FUNC
- : SCHEMA_URI_FORMAT;
- var valid;
- try { valid = validate($schema, schema); }
- finally { self._formats.uri = currentUriFormat; }
- if (!valid && throwOrLogError) {
- var message = 'schema is invalid: ' + errorsText();
- if (self._opts.validateSchema == 'log') console.error(message);
- else throw new Error(message);
- }
- return valid;
- }
-
-
- function defaultMeta() {
- var meta = self._opts.meta;
- self._opts.defaultMeta = typeof meta == 'object'
- ? meta.id || meta
- : self._opts.v5
- ? v5.META_SCHEMA_ID
- : META_SCHEMA_ID;
- return self._opts.defaultMeta;
- }
-
-
- /**
- * Get compiled schema from the instance by `key` or `ref`.
- * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
- * @return {Function} schema validating function (with property `schema`).
- */
- function getSchema(keyRef) {
- var schemaObj = _getSchemaObj(keyRef);
- switch (typeof schemaObj) {
- case 'object': return schemaObj.validate || _compile(schemaObj);
- case 'string': return getSchema(schemaObj);
- case 'undefined': return _getSchemaFragment(keyRef);
- }
- }
-
-
- function _getSchemaFragment(ref) {
- var res = resolve.schema.call(self, { schema: {} }, ref);
- if (res) {
- var schema = res.schema
- , root = res.root
- , baseId = res.baseId;
- var v = compileSchema.call(self, schema, root, undefined, baseId);
- self._fragments[ref] = new SchemaObject({
- ref: ref,
- fragment: true,
- schema: schema,
- root: root,
- baseId: baseId,
- validate: v
- });
- return v;
- }
- }
-
-
- function _getSchemaObj(keyRef) {
- keyRef = resolve.normalizeId(keyRef);
- return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
- }
-
-
- /**
- * Remove cached schema(s).
- * If no parameter is passed all schemas but meta-schemas are removed.
- * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
- * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
- * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
- */
- function removeSchema(schemaKeyRef) {
- if (schemaKeyRef instanceof RegExp) {
- _removeAllSchemas(self._schemas, schemaKeyRef);
- _removeAllSchemas(self._refs, schemaKeyRef);
- return;
- }
- switch (typeof schemaKeyRef) {
- case 'undefined':
- _removeAllSchemas(self._schemas);
- _removeAllSchemas(self._refs);
- self._cache.clear();
- return;
- case 'string':
- var schemaObj = _getSchemaObj(schemaKeyRef);
- if (schemaObj) self._cache.del(schemaObj.jsonStr);
- delete self._schemas[schemaKeyRef];
- delete self._refs[schemaKeyRef];
- return;
- case 'object':
- var jsonStr = stableStringify(schemaKeyRef);
- self._cache.del(jsonStr);
- var id = schemaKeyRef.id;
- if (id) {
- id = resolve.normalizeId(id);
- delete self._schemas[id];
- delete self._refs[id];
- }
- }
- }
-
-
- function _removeAllSchemas(schemas, regex) {
- for (var keyRef in schemas) {
- var schemaObj = schemas[keyRef];
- if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
- self._cache.del(schemaObj.jsonStr);
- delete schemas[keyRef];
- }
- }
- }
-
-
- function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
- if (typeof schema != 'object') throw new Error('schema should be object');
- var jsonStr = stableStringify(schema);
- var cached = self._cache.get(jsonStr);
- if (cached) return cached;
-
- shouldAddSchema = shouldAddSchema || self._opts.addUsedSchema !== false;
-
- var id = resolve.normalizeId(schema.id);
- if (id && shouldAddSchema) checkUnique(id);
-
- var willValidate = self._opts.validateSchema !== false && !skipValidation;
- var recursiveMeta;
- if (willValidate && !(recursiveMeta = schema.id && schema.id == schema.$schema))
- validateSchema(schema, true);
-
- var localRefs = resolve.ids.call(self, schema);
-
- var schemaObj = new SchemaObject({
- id: id,
- schema: schema,
- localRefs: localRefs,
- jsonStr: jsonStr,
- meta: meta
- });
-
- if (id[0] != '#' && shouldAddSchema) self._refs[id] = schemaObj;
- self._cache.put(jsonStr, schemaObj);
-
- if (willValidate && recursiveMeta) validateSchema(schema, true);
-
- return schemaObj;
- }
-
-
- function _compile(schemaObj, root) {
- if (schemaObj.compiling) {
- schemaObj.validate = callValidate;
- callValidate.schema = schemaObj.schema;
- callValidate.errors = null;
- callValidate.root = root ? root : callValidate;
- if (schemaObj.schema.$async === true)
- callValidate.$async = true;
- return callValidate;
- }
- schemaObj.compiling = true;
-
- var currentOpts;
- if (schemaObj.meta) {
- currentOpts = self._opts;
- self._opts = self._metaOpts;
- }
-
- var v;
- try { v = compileSchema.call(self, schemaObj.schema, root, schemaObj.localRefs); }
- finally {
- schemaObj.compiling = false;
- if (schemaObj.meta) self._opts = currentOpts;
- }
-
- schemaObj.validate = v;
- schemaObj.refs = v.refs;
- schemaObj.refVal = v.refVal;
- schemaObj.root = v.root;
- return v;
-
-
- function callValidate() {
- var _validate = schemaObj.validate;
- var result = _validate.apply(null, arguments);
- callValidate.errors = _validate.errors;
- return result;
- }
- }
-
-
- /**
- * Convert array of error message objects to string
- * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
- * @param {Object} options optional options with properties `separator` and `dataVar`.
- * @return {String} human readable string with all errors descriptions
- */
- function errorsText(errors, options) {
- errors = errors || self.errors;
- if (!errors) return 'No errors';
- options = options || {};
- var separator = options.separator === undefined ? ', ' : options.separator;
- var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
-
- var text = '';
- for (var i=0; i<errors.length; i++) {
- var e = errors[i];
- if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
- }
- return text.slice(0, -separator.length);
- }
-
-
- /**
- * Add custom format
- * @param {String} name format name
- * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
- */
- function addFormat(name, format) {
- if (typeof format == 'string') format = new RegExp(format);
- self._formats[name] = format;
- }
-
-
- function addDraft4MetaSchema() {
- if (self._opts.meta !== false) {
- var metaSchema = require('./refs/json-schema-draft-04.json');
- addMetaSchema(metaSchema, META_SCHEMA_ID, true);
- self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
- }
- }
-
-
- function addInitialSchemas() {
- var optsSchemas = self._opts.schemas;
- if (!optsSchemas) return;
- if (Array.isArray(optsSchemas)) addSchema(optsSchemas);
- else for (var key in optsSchemas) addSchema(optsSchemas[key], key);
- }
-
-
- function addInitialFormats() {
- for (var name in self._opts.formats) {
- var format = self._opts.formats[name];
- addFormat(name, format);
- }
- }
-
-
- function checkUnique(id) {
- if (self._schemas[id] || self._refs[id])
- throw new Error('schema with key or id "' + id + '" already exists');
- }
-
-
- function getMetaSchemaOptions() {
- var metaOpts = util.copy(self._opts);
- for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
- delete metaOpts[META_IGNORE_OPTIONS[i]];
- return metaOpts;
- }
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/async.js b/node_modules/node-gyp/node_modules/ajv/lib/async.js
deleted file mode 100644
index 173c2c00a..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/async.js
+++ /dev/null
@@ -1,218 +0,0 @@
-'use strict';
-
-module.exports = {
- setup: setupAsync,
- compile: compileAsync
-};
-
-
-var util = require('./compile/util');
-
-var ASYNC = {
- '*': checkGenerators,
- 'co*': checkGenerators,
- 'es7': checkAsyncFunction
-};
-
-var TRANSPILE = {
- 'nodent': getNodent,
- 'regenerator': getRegenerator
-};
-
-var MODES = [
- { async: 'co*' },
- { async: 'es7', transpile: 'nodent' },
- { async: 'co*', transpile: 'regenerator' }
-];
-
-
-var regenerator, nodent;
-
-
-function setupAsync(opts, required) {
- if (required !== false) required = true;
- var async = opts.async
- , transpile = opts.transpile
- , check;
-
- switch (typeof transpile) {
- case 'string':
- var get = TRANSPILE[transpile];
- if (!get) throw new Error('bad transpiler: ' + transpile);
- return (opts._transpileFunc = get(opts, required));
- case 'undefined':
- case 'boolean':
- if (typeof async == 'string') {
- check = ASYNC[async];
- if (!check) throw new Error('bad async mode: ' + async);
- return (opts.transpile = check(opts, required));
- }
-
- for (var i=0; i<MODES.length; i++) {
- var _opts = MODES[i];
- if (setupAsync(_opts, false)) {
- util.copy(_opts, opts);
- return opts.transpile;
- }
- }
- /* istanbul ignore next */
- throw new Error('generators, nodent and regenerator are not available');
- case 'function':
- return (opts._transpileFunc = opts.transpile);
- default:
- throw new Error('bad transpiler: ' + transpile);
- }
-}
-
-
-function checkGenerators(opts, required) {
- /* jshint evil: true */
- try {
- (new Function('(function*(){})()'))();
- return true;
- } catch(e) {
- /* istanbul ignore next */
- if (required) throw new Error('generators not supported');
- }
-}
-
-
-function checkAsyncFunction(opts, required) {
- /* jshint evil: true */
- try {
- (new Function('(async function(){})()'))();
- /* istanbul ignore next */
- return true;
- } catch(e) {
- if (required) throw new Error('es7 async functions not supported');
- }
-}
-
-
-function getRegenerator(opts, required) {
- try {
- if (!regenerator) {
- var name = 'regenerator';
- regenerator = require(name);
- regenerator.runtime();
- }
- if (!opts.async || opts.async === true)
- opts.async = 'es7';
- return regeneratorTranspile;
- } catch(e) {
- /* istanbul ignore next */
- if (required) throw new Error('regenerator not available');
- }
-}
-
-
-function regeneratorTranspile(code) {
- return regenerator.compile(code).code;
-}
-
-
-function getNodent(opts, required) {
- /* jshint evil: true */
- try {
- if (!nodent) {
- var name = 'nodent';
- nodent = require(name)({ log: false, dontInstallRequireHook: true });
- }
- if (opts.async != 'es7') {
- if (opts.async && opts.async !== true) console.warn('nodent transpiles only es7 async functions');
- opts.async = 'es7';
- }
- return nodentTranspile;
- } catch(e) {
- /* istanbul ignore next */
- if (required) throw new Error('nodent not available');
- }
-}
-
-
-function nodentTranspile(code) {
- return nodent.compile(code, '', { promises: true, sourcemap: false }).code;
-}
-
-
-/**
- * Creates validating function for passed schema with asynchronous loading of missing schemas.
- * `loadSchema` option should be a function that accepts schema uri and node-style callback.
- * @this Ajv
- * @param {Object} schema schema object
- * @param {Function} callback node-style callback, it is always called with 2 parameters: error (or null) and validating function.
- */
-function compileAsync(schema, callback) {
- /* eslint no-shadow: 0 */
- /* jshint validthis: true */
- var schemaObj;
- var self = this;
- try {
- schemaObj = this._addSchema(schema);
- } catch(e) {
- setTimeout(function() { callback(e); });
- return;
- }
- if (schemaObj.validate) {
- setTimeout(function() { callback(null, schemaObj.validate); });
- } else {
- if (typeof this._opts.loadSchema != 'function')
- throw new Error('options.loadSchema should be a function');
- _compileAsync(schema, callback, true);
- }
-
-
- function _compileAsync(schema, callback, firstCall) {
- var validate;
- try { validate = self.compile(schema); }
- catch(e) {
- if (e.missingSchema) loadMissingSchema(e);
- else deferCallback(e);
- return;
- }
- deferCallback(null, validate);
-
- function loadMissingSchema(e) {
- var ref = e.missingSchema;
- if (self._refs[ref] || self._schemas[ref])
- return callback(new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'));
- var _callbacks = self._loadingSchemas[ref];
- if (_callbacks) {
- if (typeof _callbacks == 'function')
- self._loadingSchemas[ref] = [_callbacks, schemaLoaded];
- else
- _callbacks[_callbacks.length] = schemaLoaded;
- } else {
- self._loadingSchemas[ref] = schemaLoaded;
- self._opts.loadSchema(ref, function (err, sch) {
- var _callbacks = self._loadingSchemas[ref];
- delete self._loadingSchemas[ref];
- if (typeof _callbacks == 'function') {
- _callbacks(err, sch);
- } else {
- for (var i=0; i<_callbacks.length; i++)
- _callbacks[i](err, sch);
- }
- });
- }
-
- function schemaLoaded(err, sch) {
- if (err) return callback(err);
- if (!(self._refs[ref] || self._schemas[ref])) {
- try {
- self.addSchema(sch, ref);
- } catch(e) {
- callback(e);
- return;
- }
- }
- _compileAsync(schema, callback);
- }
- }
-
- function deferCallback(err, validate) {
- if (firstCall) setTimeout(function() { callback(err, validate); });
- else return callback(err, validate);
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/cache.js b/node_modules/node-gyp/node_modules/ajv/lib/cache.js
deleted file mode 100644
index 7558874c7..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/cache.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-
-var Cache = module.exports = function Cache() {
- this._cache = {};
-};
-
-
-Cache.prototype.put = function Cache_put(key, value) {
- this._cache[key] = value;
-};
-
-
-Cache.prototype.get = function Cache_get(key) {
- return this._cache[key];
-};
-
-
-Cache.prototype.del = function Cache_del(key) {
- delete this._cache[key];
-};
-
-
-Cache.prototype.clear = function Cache_clear() {
- this._cache = {};
-};
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/_rules.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/_rules.js
deleted file mode 100644
index c98610e41..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/_rules.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-//all requires must be explicit because browserify won't work with dynamic requires
-module.exports = {
- '$ref': require('../dotjs/ref'),
- allOf: require('../dotjs/allOf'),
- anyOf: require('../dotjs/anyOf'),
- dependencies: require('../dotjs/dependencies'),
- 'enum': require('../dotjs/enum'),
- format: require('../dotjs/format'),
- items: require('../dotjs/items'),
- maximum: require('../dotjs/_limit'),
- minimum: require('../dotjs/_limit'),
- maxItems: require('../dotjs/_limitItems'),
- minItems: require('../dotjs/_limitItems'),
- maxLength: require('../dotjs/_limitLength'),
- minLength: require('../dotjs/_limitLength'),
- maxProperties: require('../dotjs/_limitProperties'),
- minProperties: require('../dotjs/_limitProperties'),
- multipleOf: require('../dotjs/multipleOf'),
- not: require('../dotjs/not'),
- oneOf: require('../dotjs/oneOf'),
- pattern: require('../dotjs/pattern'),
- properties: require('../dotjs/properties'),
- required: require('../dotjs/required'),
- uniqueItems: require('../dotjs/uniqueItems'),
- validate: require('../dotjs/validate')
-};
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/equal.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/equal.js
deleted file mode 100644
index 2a918746c..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/equal.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-/*eslint complexity: 0*/
-
-module.exports = function equal(a, b) {
- if (a === b) return true;
-
- var arrA = Array.isArray(a)
- , arrB = Array.isArray(b)
- , i;
-
- if (arrA && arrB) {
- if (a.length != b.length) return false;
- for (i = 0; i < a.length; i++)
- if (!equal(a[i], b[i])) return false;
- return true;
- }
-
- if (arrA != arrB) return false;
-
- if (a && b && typeof a === 'object' && typeof b === 'object') {
- var keys = Object.keys(a);
- if (keys.length !== Object.keys(b).length) return false;
-
- var dateA = a instanceof Date
- , dateB = b instanceof Date;
- if (dateA && dateB) return a.getTime() == b.getTime();
- if (dateA != dateB) return false;
-
- var regexpA = a instanceof RegExp
- , regexpB = b instanceof RegExp;
- if (regexpA && regexpB) return a.toString() == b.toString();
- if (regexpA != regexpB) return false;
-
- for (i = 0; i < keys.length; i++)
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
-
- for (i = 0; i < keys.length; i++)
- if(!equal(a[keys[i]], b[keys[i]])) return false;
-
- return true;
- }
-
- return false;
-};
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/formats.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/formats.js
deleted file mode 100644
index 2130a31b0..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/formats.js
+++ /dev/null
@@ -1,164 +0,0 @@
-'use strict';
-
-var util = require('./util');
-
-var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
-var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
-var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
-var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
-var URI = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i;
-var UUID = /^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
-var JSON_POINTER = /^(?:\/(?:[^~\/]|~0|~1)*)*$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
-var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/;
-
-
-module.exports = formats;
-
-function formats(mode) {
- mode = mode == 'full' ? 'full' : 'fast';
- var formatDefs = util.copy(formats[mode]);
- for (var fName in formats.compare) {
- formatDefs[fName] = {
- validate: formatDefs[fName],
- compare: formats.compare[fName]
- };
- }
- return formatDefs;
-}
-
-
-formats.fast = {
- // date: http://tools.ietf.org/html/rfc3339#section-5.6
- date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
- // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
- time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
- 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
- // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
- uri: /^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,
- // email (sources from jsen validator):
- // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
- // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
- email: /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
- hostname: HOSTNAME,
- // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
- ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
- // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
- ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
- regex: regex,
- // uuid: http://tools.ietf.org/html/rfc4122
- uuid: UUID,
- // JSON-pointer: https://tools.ietf.org/html/rfc6901
- // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
- 'json-pointer': JSON_POINTER,
- // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
- 'relative-json-pointer': RELATIVE_JSON_POINTER
-};
-
-
-formats.full = {
- date: date,
- time: time,
- 'date-time': date_time,
- uri: uri,
- email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
- hostname: hostname,
- ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
- ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
- regex: regex,
- uuid: UUID,
- 'json-pointer': JSON_POINTER,
- 'relative-json-pointer': RELATIVE_JSON_POINTER
-};
-
-
-formats.compare = {
- date: compareDate,
- time: compareTime,
- 'date-time': compareDateTime
-};
-
-
-function date(str) {
- // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
- var matches = str.match(DATE);
- if (!matches) return false;
-
- var month = +matches[1];
- var day = +matches[2];
- return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month];
-}
-
-
-function time(str, full) {
- var matches = str.match(TIME);
- if (!matches) return false;
-
- var hour = matches[1];
- var minute = matches[2];
- var second = matches[3];
- var timeZone = matches[5];
- return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);
-}
-
-
-var DATE_TIME_SEPARATOR = /t|\s/i;
-function date_time(str) {
- // http://tools.ietf.org/html/rfc3339#section-5.6
- var dateTime = str.split(DATE_TIME_SEPARATOR);
- return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
-}
-
-
-function hostname(str) {
- // https://tools.ietf.org/html/rfc1034#section-3.5
- // https://tools.ietf.org/html/rfc1123#section-2
- return str.length <= 255 && HOSTNAME.test(str);
-}
-
-
-var NOT_URI_FRAGMENT = /\/|\:/;
-function uri(str) {
- // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
- return NOT_URI_FRAGMENT.test(str) && URI.test(str);
-}
-
-
-function regex(str) {
- try {
- new RegExp(str);
- return true;
- } catch(e) {
- return false;
- }
-}
-
-
-function compareDate(d1, d2) {
- if (!(d1 && d2)) return;
- if (d1 > d2) return 1;
- if (d1 < d2) return -1;
- if (d1 === d2) return 0;
-}
-
-
-function compareTime(t1, t2) {
- if (!(t1 && t2)) return;
- t1 = t1.match(TIME);
- t2 = t2.match(TIME);
- if (!(t1 && t2)) return;
- t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');
- t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');
- if (t1 > t2) return 1;
- if (t1 < t2) return -1;
- if (t1 === t2) return 0;
-}
-
-
-function compareDateTime(dt1, dt2) {
- if (!(dt1 && dt2)) return;
- dt1 = dt1.split(DATE_TIME_SEPARATOR);
- dt2 = dt2.split(DATE_TIME_SEPARATOR);
- var res = compareDate(dt1[0], dt2[0]);
- if (res === undefined) return;
- return res || compareTime(dt1[1], dt2[1]);
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/index.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/index.js
deleted file mode 100644
index c9c6730f8..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/index.js
+++ /dev/null
@@ -1,390 +0,0 @@
-'use strict';
-
-var resolve = require('./resolve')
- , util = require('./util')
- , stableStringify = require('json-stable-stringify')
- , async = require('../async');
-
-var beautify;
-
-function loadBeautify(){
- if (beautify === undefined) {
- var name = 'js-beautify';
- try { beautify = require(name).js_beautify; }
- catch(e) { beautify = false; }
- }
-}
-
-var validateGenerator = require('../dotjs/validate');
-
-/**
- * Functions below are used inside compiled validations function
- */
-
-var co = require('co');
-var ucs2length = util.ucs2length;
-var equal = require('./equal');
-
-// this error is thrown by async schemas to return validation errors via exception
-var ValidationError = require('./validation_error');
-
-module.exports = compile;
-
-
-/**
- * Compiles schema to validation function
- * @this Ajv
- * @param {Object} schema schema object
- * @param {Object} root object with information about the root schema for this schema
- * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
- * @param {String} baseId base ID for IDs in the schema
- * @return {Function} validation function
- */
-function compile(schema, root, localRefs, baseId) {
- /* jshint validthis: true, evil: true */
- /* eslint no-shadow: 0 */
- var self = this
- , opts = this._opts
- , refVal = [ undefined ]
- , refs = {}
- , patterns = []
- , patternsHash = {}
- , defaults = []
- , defaultsHash = {}
- , customRules = []
- , keepSourceCode = opts.sourceCode !== false;
-
- root = root || { schema: schema, refVal: refVal, refs: refs };
-
- var c = checkCompiling.call(this, schema, root, baseId);
- var compilation = this._compilations[c.index];
- if (c.compiling) return (compilation.callValidate = callValidate);
-
- var formats = this._formats;
- var RULES = this.RULES;
-
- try {
- var v = localCompile(schema, root, localRefs, baseId);
- compilation.validate = v;
- var cv = compilation.callValidate;
- if (cv) {
- cv.schema = v.schema;
- cv.errors = null;
- cv.refs = v.refs;
- cv.refVal = v.refVal;
- cv.root = v.root;
- cv.$async = v.$async;
- if (keepSourceCode) cv.sourceCode = v.sourceCode;
- }
- return v;
- } finally {
- endCompiling.call(this, schema, root, baseId);
- }
-
- function callValidate() {
- var validate = compilation.validate;
- var result = validate.apply(null, arguments);
- callValidate.errors = validate.errors;
- return result;
- }
-
- function localCompile(_schema, _root, localRefs, baseId) {
- var isRoot = !_root || (_root && _root.schema == _schema);
- if (_root.schema != root.schema)
- return compile.call(self, _schema, _root, localRefs, baseId);
-
- var $async = _schema.$async === true;
- if ($async && !opts.transpile) async.setup(opts);
-
- var sourceCode = validateGenerator({
- isTop: true,
- schema: _schema,
- isRoot: isRoot,
- baseId: baseId,
- root: _root,
- schemaPath: '',
- errSchemaPath: '#',
- errorPath: '""',
- RULES: RULES,
- validate: validateGenerator,
- util: util,
- resolve: resolve,
- resolveRef: resolveRef,
- usePattern: usePattern,
- useDefault: useDefault,
- useCustomRule: useCustomRule,
- opts: opts,
- formats: formats,
- self: self
- });
-
- sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
- + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
- + sourceCode;
-
- if (opts.beautify) {
- loadBeautify();
- /* istanbul ignore else */
- if (beautify) sourceCode = beautify(sourceCode, opts.beautify);
- else console.error('"npm install js-beautify" to use beautify option');
- }
- // console.log('\n\n\n *** \n', sourceCode);
- var validate, validateCode
- , transpile = opts._transpileFunc;
- try {
- validateCode = $async && transpile
- ? transpile(sourceCode)
- : sourceCode;
-
- var makeValidate = new Function(
- 'self',
- 'RULES',
- 'formats',
- 'root',
- 'refVal',
- 'defaults',
- 'customRules',
- 'co',
- 'equal',
- 'ucs2length',
- 'ValidationError',
- validateCode
- );
-
- validate = makeValidate(
- self,
- RULES,
- formats,
- root,
- refVal,
- defaults,
- customRules,
- co,
- equal,
- ucs2length,
- ValidationError
- );
-
- refVal[0] = validate;
- } catch(e) {
- console.error('Error compiling schema, function code:', validateCode);
- throw e;
- }
-
- validate.schema = _schema;
- validate.errors = null;
- validate.refs = refs;
- validate.refVal = refVal;
- validate.root = isRoot ? validate : _root;
- if ($async) validate.$async = true;
- if (keepSourceCode) validate.sourceCode = sourceCode;
- if (opts.sourceCode === true) {
- validate.source = {
- patterns: patterns,
- defaults: defaults
- };
- }
-
- return validate;
- }
-
- function resolveRef(baseId, ref, isRoot) {
- ref = resolve.url(baseId, ref);
- var refIndex = refs[ref];
- var _refVal, refCode;
- if (refIndex !== undefined) {
- _refVal = refVal[refIndex];
- refCode = 'refVal[' + refIndex + ']';
- return resolvedRef(_refVal, refCode);
- }
- if (!isRoot && root.refs) {
- var rootRefId = root.refs[ref];
- if (rootRefId !== undefined) {
- _refVal = root.refVal[rootRefId];
- refCode = addLocalRef(ref, _refVal);
- return resolvedRef(_refVal, refCode);
- }
- }
-
- refCode = addLocalRef(ref);
- var v = resolve.call(self, localCompile, root, ref);
- if (!v) {
- var localSchema = localRefs && localRefs[ref];
- if (localSchema) {
- v = resolve.inlineRef(localSchema, opts.inlineRefs)
- ? localSchema
- : compile.call(self, localSchema, root, localRefs, baseId);
- }
- }
-
- if (v) {
- replaceLocalRef(ref, v);
- return resolvedRef(v, refCode);
- }
- }
-
- function addLocalRef(ref, v) {
- var refId = refVal.length;
- refVal[refId] = v;
- refs[ref] = refId;
- return 'refVal' + refId;
- }
-
- function replaceLocalRef(ref, v) {
- var refId = refs[ref];
- refVal[refId] = v;
- }
-
- function resolvedRef(refVal, code) {
- return typeof refVal == 'object'
- ? { code: code, schema: refVal, inline: true }
- : { code: code, $async: refVal && refVal.$async };
- }
-
- function usePattern(regexStr) {
- var index = patternsHash[regexStr];
- if (index === undefined) {
- index = patternsHash[regexStr] = patterns.length;
- patterns[index] = regexStr;
- }
- return 'pattern' + index;
- }
-
- function useDefault(value) {
- switch (typeof value) {
- case 'boolean':
- case 'number':
- return '' + value;
- case 'string':
- return util.toQuotedString(value);
- case 'object':
- if (value === null) return 'null';
- var valueStr = stableStringify(value);
- var index = defaultsHash[valueStr];
- if (index === undefined) {
- index = defaultsHash[valueStr] = defaults.length;
- defaults[index] = value;
- }
- return 'default' + index;
- }
- }
-
- function useCustomRule(rule, schema, parentSchema, it) {
- var validateSchema = rule.definition.validateSchema;
- if (validateSchema && self._opts.validateSchema !== false) {
- var valid = validateSchema(schema);
- if (!valid) {
- var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
- if (self._opts.validateSchema == 'log') console.error(message);
- else throw new Error(message);
- }
- }
-
- var compile = rule.definition.compile
- , inline = rule.definition.inline
- , macro = rule.definition.macro;
-
- var validate;
- if (compile) {
- validate = compile.call(self, schema, parentSchema, it);
- } else if (macro) {
- validate = macro.call(self, schema, parentSchema, it);
- if (opts.validateSchema !== false) self.validateSchema(validate, true);
- } else if (inline) {
- validate = inline.call(self, it, rule.keyword, schema, parentSchema);
- } else {
- validate = rule.definition.validate;
- }
-
- var index = customRules.length;
- customRules[index] = validate;
-
- return {
- code: 'customRule' + index,
- validate: validate
- };
- }
-}
-
-
-/**
- * Checks if the schema is currently compiled
- * @this Ajv
- * @param {Object} schema schema to compile
- * @param {Object} root root object
- * @param {String} baseId base schema ID
- * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
- */
-function checkCompiling(schema, root, baseId) {
- /* jshint validthis: true */
- var index = compIndex.call(this, schema, root, baseId);
- if (index >= 0) return { index: index, compiling: true };
- index = this._compilations.length;
- this._compilations[index] = {
- schema: schema,
- root: root,
- baseId: baseId
- };
- return { index: index, compiling: false };
-}
-
-
-/**
- * Removes the schema from the currently compiled list
- * @this Ajv
- * @param {Object} schema schema to compile
- * @param {Object} root root object
- * @param {String} baseId base schema ID
- */
-function endCompiling(schema, root, baseId) {
- /* jshint validthis: true */
- var i = compIndex.call(this, schema, root, baseId);
- if (i >= 0) this._compilations.splice(i, 1);
-}
-
-
-/**
- * Index of schema compilation in the currently compiled list
- * @this Ajv
- * @param {Object} schema schema to compile
- * @param {Object} root root object
- * @param {String} baseId base schema ID
- * @return {Integer} compilation index
- */
-function compIndex(schema, root, baseId) {
- /* jshint validthis: true */
- for (var i=0; i<this._compilations.length; i++) {
- var c = this._compilations[i];
- if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
- }
- return -1;
-}
-
-
-function patternCode(i, patterns) {
- return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
-}
-
-
-function defaultCode(i) {
- return 'var default' + i + ' = defaults[' + i + '];';
-}
-
-
-function refValCode(i, refVal) {
- return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';
-}
-
-
-function customRuleCode(i) {
- return 'var customRule' + i + ' = customRules[' + i + '];';
-}
-
-
-function vars(arr, statement) {
- if (!arr.length) return '';
- var code = '';
- for (var i=0; i<arr.length; i++)
- code += statement(i, arr);
- return code;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/resolve.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/resolve.js
deleted file mode 100644
index db2b91fbf..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/resolve.js
+++ /dev/null
@@ -1,267 +0,0 @@
-'use strict';
-
-var url = require('url')
- , equal = require('./equal')
- , util = require('./util')
- , SchemaObject = require('./schema_obj');
-
-module.exports = resolve;
-
-resolve.normalizeId = normalizeId;
-resolve.fullPath = getFullPath;
-resolve.url = resolveUrl;
-resolve.ids = resolveIds;
-resolve.inlineRef = inlineRef;
-resolve.schema = resolveSchema;
-
-/**
- * [resolve and compile the references ($ref)]
- * @this Ajv
- * @param {Function} compile reference to schema compilation funciton (localCompile)
- * @param {Object} root object with information about the root schema for the current schema
- * @param {String} ref reference to resolve
- * @return {Object|Function} schema object (if the schema can be inlined) or validation function
- */
-function resolve(compile, root, ref) {
- /* jshint validthis: true */
- var refVal = this._refs[ref];
- if (typeof refVal == 'string') {
- if (this._refs[refVal]) refVal = this._refs[refVal];
- else return resolve.call(this, compile, root, refVal);
- }
-
- refVal = refVal || this._schemas[ref];
- if (refVal instanceof SchemaObject) {
- return inlineRef(refVal.schema, this._opts.inlineRefs)
- ? refVal.schema
- : refVal.validate || this._compile(refVal);
- }
-
- var res = resolveSchema.call(this, root, ref);
- var schema, v, baseId;
- if (res) {
- schema = res.schema;
- root = res.root;
- baseId = res.baseId;
- }
-
- if (schema instanceof SchemaObject) {
- v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
- } else if (schema) {
- v = inlineRef(schema, this._opts.inlineRefs)
- ? schema
- : compile.call(this, schema, root, undefined, baseId);
- }
-
- return v;
-}
-
-
-/**
- * Resolve schema, its root and baseId
- * @this Ajv
- * @param {Object} root root object with properties schema, refVal, refs
- * @param {String} ref reference to resolve
- * @return {Object} object with properties schema, root, baseId
- */
-function resolveSchema(root, ref) {
- /* jshint validthis: true */
- var p = url.parse(ref, false, true)
- , refPath = _getFullPath(p)
- , baseId = getFullPath(root.schema.id);
- if (refPath !== baseId) {
- var id = normalizeId(refPath);
- var refVal = this._refs[id];
- if (typeof refVal == 'string') {
- return resolveRecursive.call(this, root, refVal, p);
- } else if (refVal instanceof SchemaObject) {
- if (!refVal.validate) this._compile(refVal);
- root = refVal;
- } else {
- refVal = this._schemas[id];
- if (refVal instanceof SchemaObject) {
- if (!refVal.validate) this._compile(refVal);
- if (id == normalizeId(ref))
- return { schema: refVal, root: root, baseId: baseId };
- root = refVal;
- } else {
- return;
- }
- }
- if (!root.schema) return;
- baseId = getFullPath(root.schema.id);
- }
- return getJsonPointer.call(this, p, baseId, root.schema, root);
-}
-
-
-/* @this Ajv */
-function resolveRecursive(root, ref, parsedRef) {
- /* jshint validthis: true */
- var res = resolveSchema.call(this, root, ref);
- if (res) {
- var schema = res.schema;
- var baseId = res.baseId;
- root = res.root;
- if (schema.id) baseId = resolveUrl(baseId, schema.id);
- return getJsonPointer.call(this, parsedRef, baseId, schema, root);
- }
-}
-
-
-var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
-/* @this Ajv */
-function getJsonPointer(parsedRef, baseId, schema, root) {
- /* jshint validthis: true */
- parsedRef.hash = parsedRef.hash || '';
- if (parsedRef.hash.slice(0,2) != '#/') return;
- var parts = parsedRef.hash.split('/');
-
- for (var i = 1; i < parts.length; i++) {
- var part = parts[i];
- if (part) {
- part = util.unescapeFragment(part);
- schema = schema[part];
- if (!schema) break;
- if (schema.id && !PREVENT_SCOPE_CHANGE[part]) baseId = resolveUrl(baseId, schema.id);
- if (schema.$ref) {
- var $ref = resolveUrl(baseId, schema.$ref);
- var res = resolveSchema.call(this, root, $ref);
- if (res) {
- schema = res.schema;
- root = res.root;
- baseId = res.baseId;
- }
- }
- }
- }
- if (schema && schema != root.schema)
- return { schema: schema, root: root, baseId: baseId };
-}
-
-
-var SIMPLE_INLINED = util.toHash([
- 'type', 'format', 'pattern',
- 'maxLength', 'minLength',
- 'maxProperties', 'minProperties',
- 'maxItems', 'minItems',
- 'maximum', 'minimum',
- 'uniqueItems', 'multipleOf',
- 'required', 'enum'
-]);
-function inlineRef(schema, limit) {
- if (limit === false) return false;
- if (limit === undefined || limit === true) return checkNoRef(schema);
- else if (limit) return countKeys(schema) <= limit;
-}
-
-
-function checkNoRef(schema) {
- var item;
- if (Array.isArray(schema)) {
- for (var i=0; i<schema.length; i++) {
- item = schema[i];
- if (typeof item == 'object' && !checkNoRef(item)) return false;
- }
- } else {
- for (var key in schema) {
- if (key == '$ref') return false;
- item = schema[key];
- if (typeof item == 'object' && !checkNoRef(item)) return false;
- }
- }
- return true;
-}
-
-
-function countKeys(schema) {
- var count = 0, item;
- if (Array.isArray(schema)) {
- for (var i=0; i<schema.length; i++) {
- item = schema[i];
- if (typeof item == 'object') count += countKeys(item);
- if (count == Infinity) return Infinity;
- }
- } else {
- for (var key in schema) {
- if (key == '$ref') return Infinity;
- if (SIMPLE_INLINED[key]) {
- count++;
- } else {
- item = schema[key];
- if (typeof item == 'object') count += countKeys(item) + 1;
- if (count == Infinity) return Infinity;
- }
- }
- }
- return count;
-}
-
-
-function getFullPath(id, normalize) {
- if (normalize !== false) id = normalizeId(id);
- var p = url.parse(id, false, true);
- return _getFullPath(p);
-}
-
-
-function _getFullPath(p) {
- var protocolSeparator = p.protocol || p.href.slice(0,2) == '//' ? '//' : '';
- return (p.protocol||'') + protocolSeparator + (p.host||'') + (p.path||'') + '#';
-}
-
-
-var TRAILING_SLASH_HASH = /#\/?$/;
-function normalizeId(id) {
- return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
-}
-
-
-function resolveUrl(baseId, id) {
- id = normalizeId(id);
- return url.resolve(baseId, id);
-}
-
-
-/* @this Ajv */
-function resolveIds(schema) {
- /* eslint no-shadow: 0 */
- /* jshint validthis: true */
- var id = normalizeId(schema.id);
- var localRefs = {};
- _resolveIds.call(this, schema, getFullPath(id, false), id);
- return localRefs;
-
- /* @this Ajv */
- function _resolveIds(schema, fullPath, baseId) {
- /* jshint validthis: true */
- if (Array.isArray(schema)) {
- for (var i=0; i<schema.length; i++)
- _resolveIds.call(this, schema[i], fullPath+'/'+i, baseId);
- } else if (schema && typeof schema == 'object') {
- if (typeof schema.id == 'string') {
- var id = baseId = baseId
- ? url.resolve(baseId, schema.id)
- : schema.id;
- id = normalizeId(id);
-
- var refVal = this._refs[id];
- if (typeof refVal == 'string') refVal = this._refs[refVal];
- if (refVal && refVal.schema) {
- if (!equal(schema, refVal.schema))
- throw new Error('id "' + id + '" resolves to more than one schema');
- } else if (id != normalizeId(fullPath)) {
- if (id[0] == '#') {
- if (localRefs[id] && !equal(schema, localRefs[id]))
- throw new Error('id "' + id + '" resolves to more than one schema');
- localRefs[id] = schema;
- } else {
- this._refs[id] = fullPath;
- }
- }
- }
- for (var key in schema)
- _resolveIds.call(this, schema[key], fullPath+'/'+util.escapeFragment(key), baseId);
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/rules.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/rules.js
deleted file mode 100644
index 39b1708d9..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/rules.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-var ruleModules = require('./_rules')
- , toHash = require('./util').toHash;
-
-module.exports = function rules() {
- var RULES = [
- { type: 'number',
- rules: [ 'maximum', 'minimum', 'multipleOf'] },
- { type: 'string',
- rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
- { type: 'array',
- rules: [ 'maxItems', 'minItems', 'uniqueItems', 'items' ] },
- { type: 'object',
- rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'properties' ] },
- { rules: [ '$ref', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
- ];
-
- var ALL = [ 'type', 'additionalProperties', 'patternProperties' ];
- var KEYWORDS = [ 'additionalItems', '$schema', 'id', 'title', 'description', 'default' ];
- var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
- RULES.all = toHash(ALL);
-
- RULES.forEach(function (group) {
- group.rules = group.rules.map(function (keyword) {
- ALL.push(keyword);
- var rule = RULES.all[keyword] = {
- keyword: keyword,
- code: ruleModules[keyword]
- };
- return rule;
- });
- });
-
- RULES.keywords = toHash(ALL.concat(KEYWORDS));
- RULES.types = toHash(TYPES);
- RULES.custom = {};
-
- return RULES;
-};
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/schema_obj.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/schema_obj.js
deleted file mode 100644
index e7903b0f4..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/schema_obj.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var util = require('./util');
-
-module.exports = SchemaObject;
-
-function SchemaObject(obj) {
- util.copy(obj, this);
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/ucs2length.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/ucs2length.js
deleted file mode 100644
index d193fb170..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/ucs2length.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-// https://mathiasbynens.be/notes/javascript-encoding
-// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
-module.exports = function ucs2length(str) {
- var length = 0
- , len = str.length
- , pos = 0
- , value;
- while (pos < len) {
- length++;
- value = str.charCodeAt(pos++);
- if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
- // high surrogate, and there is a next character
- value = str.charCodeAt(pos);
- if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
- }
- }
- return length;
-};
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/util.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/util.js
deleted file mode 100644
index 8451f83ae..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/util.js
+++ /dev/null
@@ -1,257 +0,0 @@
-'use strict';
-
-
-module.exports = {
- copy: copy,
- checkDataType: checkDataType,
- checkDataTypes: checkDataTypes,
- coerceToTypes: coerceToTypes,
- toHash: toHash,
- getProperty: getProperty,
- escapeQuotes: escapeQuotes,
- ucs2length: require('./ucs2length'),
- varOccurences: varOccurences,
- varReplace: varReplace,
- cleanUpCode: cleanUpCode,
- cleanUpVarErrors: cleanUpVarErrors,
- schemaHasRules: schemaHasRules,
- schemaHasRulesExcept: schemaHasRulesExcept,
- stableStringify: require('json-stable-stringify'),
- toQuotedString: toQuotedString,
- getPathExpr: getPathExpr,
- getPath: getPath,
- getData: getData,
- unescapeFragment: unescapeFragment,
- escapeFragment: escapeFragment,
- escapeJsonPointer: escapeJsonPointer
-};
-
-
-function copy(o, to) {
- to = to || {};
- for (var key in o) to[key] = o[key];
- return to;
-}
-
-
-function checkDataType(dataType, data, negate) {
- var EQUAL = negate ? ' !== ' : ' === '
- , AND = negate ? ' || ' : ' && '
- , OK = negate ? '!' : ''
- , NOT = negate ? '' : '!';
- switch (dataType) {
- case 'null': return data + EQUAL + 'null';
- case 'array': return OK + 'Array.isArray(' + data + ')';
- case 'object': return '(' + OK + data + AND +
- 'typeof ' + data + EQUAL + '"object"' + AND +
- NOT + 'Array.isArray(' + data + '))';
- case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
- NOT + '(' + data + ' % 1)' +
- AND + data + EQUAL + data + ')';
- default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
- }
-}
-
-
-function checkDataTypes(dataTypes, data) {
- switch (dataTypes.length) {
- case 1: return checkDataType(dataTypes[0], data, true);
- default:
- var code = '';
- var types = toHash(dataTypes);
- if (types.array && types.object) {
- code = types.null ? '(': '(!' + data + ' || ';
- code += 'typeof ' + data + ' !== "object")';
- delete types.null;
- delete types.array;
- delete types.object;
- }
- if (types.number) delete types.integer;
- for (var t in types)
- code += (code ? ' && ' : '' ) + checkDataType(t, data, true);
-
- return code;
- }
-}
-
-
-var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
-function coerceToTypes(optionCoerceTypes, dataTypes) {
- if (Array.isArray(dataTypes)) {
- var types = [];
- for (var i=0; i<dataTypes.length; i++) {
- var t = dataTypes[i];
- if (COERCE_TO_TYPES[t]) types[types.length] = t;
- else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
- }
- if (types.length) return types;
- } else if (COERCE_TO_TYPES[dataTypes]) {
- return [dataTypes];
- } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
- return ['array'];
- }
-}
-
-
-function toHash(arr) {
- var hash = {};
- for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
- return hash;
-}
-
-
-var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
-var SINGLE_QUOTE = /'|\\/g;
-function getProperty(key) {
- return typeof key == 'number'
- ? '[' + key + ']'
- : IDENTIFIER.test(key)
- ? '.' + key
- : "['" + escapeQuotes(key) + "']";
-}
-
-
-function escapeQuotes(str) {
- return str.replace(SINGLE_QUOTE, '\\$&')
- .replace(/\n/g, '\\n')
- .replace(/\r/g, '\\r')
- .replace(/\f/g, '\\f')
- .replace(/\t/g, '\\t');
-}
-
-
-function varOccurences(str, dataVar) {
- dataVar += '[^0-9]';
- var matches = str.match(new RegExp(dataVar, 'g'));
- return matches ? matches.length : 0;
-}
-
-
-function varReplace(str, dataVar, expr) {
- dataVar += '([^0-9])';
- expr = expr.replace(/\$/g, '$$$$');
- return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
-}
-
-
-var EMPTY_ELSE = /else\s*{\s*}/g
- , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g
- , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;
-function cleanUpCode(out) {
- return out.replace(EMPTY_ELSE, '')
- .replace(EMPTY_IF_NO_ELSE, '')
- .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');
-}
-
-
-var ERRORS_REGEXP = /[^v\.]errors/g
- , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
- , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g
- , RETURN_VALID = 'return errors === 0;'
- , RETURN_TRUE = 'validate.errors = null; return true;'
- , RETURN_ASYNC = /if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/
- , RETURN_TRUE_ASYNC = 'return true;';
-
-function cleanUpVarErrors(out, async) {
- var matches = out.match(ERRORS_REGEXP);
- if (!matches || matches.length !== 2) return out;
- return async
- ? out.replace(REMOVE_ERRORS_ASYNC, '')
- .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)
- : out.replace(REMOVE_ERRORS, '')
- .replace(RETURN_VALID, RETURN_TRUE);
-}
-
-
-function schemaHasRules(schema, rules) {
- for (var key in schema) if (rules[key]) return true;
-}
-
-
-function schemaHasRulesExcept(schema, rules, exceptKeyword) {
- for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
-}
-
-
-function toQuotedString(str) {
- return '\'' + escapeQuotes(str) + '\'';
-}
-
-
-function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
- var path = jsonPointers // false by default
- ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
- : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
- return joinPaths(currentPath, path);
-}
-
-
-function getPath(currentPath, prop, jsonPointers) {
- var path = jsonPointers // false by default
- ? toQuotedString('/' + escapeJsonPointer(prop))
- : toQuotedString(getProperty(prop));
- return joinPaths(currentPath, path);
-}
-
-
-var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
-var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
-function getData($data, lvl, paths) {
- var up, jsonPointer, data, matches;
- if ($data === '') return 'rootData';
- if ($data[0] == '/') {
- if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
- jsonPointer = $data;
- data = 'rootData';
- } else {
- matches = $data.match(RELATIVE_JSON_POINTER);
- if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
- up = +matches[1];
- jsonPointer = matches[2];
- if (jsonPointer == '#') {
- if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
- return paths[lvl - up];
- }
-
- if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
- data = 'data' + ((lvl - up) || '');
- if (!jsonPointer) return data;
- }
-
- var expr = data;
- var segments = jsonPointer.split('/');
- for (var i=0; i<segments.length; i++) {
- var segment = segments[i];
- if (segment) {
- data += getProperty(unescapeJsonPointer(segment));
- expr += ' && ' + data;
- }
- }
- return expr;
-}
-
-
-function joinPaths (a, b) {
- if (a == '""') return b;
- return (a + ' + ' + b).replace(/' \+ '/g, '');
-}
-
-
-function unescapeFragment(str) {
- return unescapeJsonPointer(decodeURIComponent(str));
-}
-
-
-function escapeFragment(str) {
- return encodeURIComponent(escapeJsonPointer(str));
-}
-
-
-function escapeJsonPointer(str) {
- return str.replace(/~/g, '~0').replace(/\//g, '~1');
-}
-
-
-function unescapeJsonPointer(str) {
- return str.replace(/~1/g, '/').replace(/~0/g, '~');
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/compile/validation_error.js b/node_modules/node-gyp/node_modules/ajv/lib/compile/validation_error.js
deleted file mode 100644
index 3c5c59478..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/compile/validation_error.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = ValidationError;
-
-
-function ValidationError(errors) {
- this.message = 'validation failed';
- this.errors = errors;
- this.ajv = this.validation = true;
-}
-
-
-ValidationError.prototype = Object.create(Error.prototype);
-ValidationError.prototype.constructor = ValidationError;
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limit.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/_limit.jst
deleted file mode 100644
index 21793d874..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limit.jst
+++ /dev/null
@@ -1,49 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{
- var $isMax = $keyword == 'maximum'
- , $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
- , $schemaExcl = it.schema[$exclusiveKeyword]
- , $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data
- , $op = $isMax ? '<' : '>'
- , $notOp = $isMax ? '>' : '<';
-}}
-
-{{? $isDataExcl }}
- {{
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
- , $exclusive = 'exclusive' + $lvl
- , $opExpr = 'op' + $lvl
- , $opStr = '\' + ' + $opExpr + ' + \'';
- }}
- var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
- {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
-
- var exclusive{{=$lvl}};
- if (typeof {{=$schemaValueExcl}} != 'boolean' && typeof {{=$schemaValueExcl}} != 'undefined') {
- {{ var $errorKeyword = $exclusiveKeyword; }}
- {{# def.error:'_exclusiveLimit' }}
- } else if({{# def.$dataNotType:'number' }}
- ((exclusive{{=$lvl}} = {{=$schemaValueExcl}} === true)
- ? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
- : {{=$data}} {{=$notOp}} {{=$schemaValue}})
- || {{=$data}} !== {{=$data}}) {
- var op{{=$lvl}} = exclusive{{=$lvl}} ? '{{=$op}}' : '{{=$op}}=';
-{{??}}
- {{
- var $exclusive = $schemaExcl === true
- , $opStr = $op; /*used in error*/
- if (!$exclusive) $opStr += '=';
- var $opExpr = '\'' + $opStr + '\''; /*used in error*/
- }}
-
- if ({{# def.$dataNotType:'number' }}
- {{=$data}} {{=$notOp}}{{?$exclusive}}={{?}} {{=$schemaValue}}
- || {{=$data}} !== {{=$data}}) {
-{{?}}
- {{ var $errorKeyword = $keyword; }}
- {{# def.error:'_limit' }}
- } {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitItems.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitItems.jst
deleted file mode 100644
index a3e078e51..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitItems.jst
+++ /dev/null
@@ -1,10 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }}
-if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) {
- {{ var $errorKeyword = $keyword; }}
- {{# def.error:'_limitItems' }}
-} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitLength.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitLength.jst
deleted file mode 100644
index cfc8dbb01..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitLength.jst
+++ /dev/null
@@ -1,10 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }}
-if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) {
- {{ var $errorKeyword = $keyword; }}
- {{# def.error:'_limitLength' }}
-} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitProperties.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitProperties.jst
deleted file mode 100644
index da7ea776f..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/_limitProperties.jst
+++ /dev/null
@@ -1,10 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }}
-if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) {
- {{ var $errorKeyword = $keyword; }}
- {{# def.error:'_limitProperties' }}
-} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/allOf.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/allOf.jst
deleted file mode 100644
index 4c2836311..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/allOf.jst
+++ /dev/null
@@ -1,34 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-{{
- var $currentBaseId = $it.baseId
- , $allSchemasEmpty = true;
-}}
-
-{{~ $schema:$sch:$i }}
- {{? {{# def.nonEmptySchema:$sch }} }}
- {{
- $allSchemasEmpty = false;
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- }}
-
- {{# def.insertSubschemaCode }}
-
- {{# def.ifResultValid }}
- {{?}}
-{{~}}
-
-{{? $breakOnError }}
- {{? $allSchemasEmpty }}
- if (true) {
- {{??}}
- {{= $closingBraces.slice(0,-1) }}
- {{?}}
-{{?}}
-
-{{# def.cleanUp }}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/anyOf.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/anyOf.jst
deleted file mode 100644
index 93c3cd828..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/anyOf.jst
+++ /dev/null
@@ -1,48 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-{{
- var $noEmptySchema = $schema.every(function($sch) {
- return {{# def.nonEmptySchema:$sch }};
- });
-}}
-{{? $noEmptySchema }}
- {{ var $currentBaseId = $it.baseId; }}
- var {{=$errs}} = errors;
- var {{=$valid}} = false;
-
- {{# def.setCompositeRule }}
-
- {{~ $schema:$sch:$i }}
- {{
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- }}
-
- {{# def.insertSubschemaCode }}
-
- {{=$valid}} = {{=$valid}} || {{=$nextValid}};
-
- if (!{{=$valid}}) {
- {{ $closingBraces += '}'; }}
- {{~}}
-
- {{# def.resetCompositeRule }}
-
- {{= $closingBraces }}
-
- if (!{{=$valid}}) {
- {{# def.addError:'anyOf' }}
- } else {
- {{# def.resetErrors }}
- {{? it.opts.allErrors }} } {{?}}
-
- {{# def.cleanUp }}
-{{??}}
- {{? $breakOnError }}
- if (true) {
- {{?}}
-{{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/coerce.def b/node_modules/node-gyp/node_modules/ajv/lib/dot/coerce.def
deleted file mode 100644
index 86e0e18af..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/coerce.def
+++ /dev/null
@@ -1,61 +0,0 @@
-{{## def.coerceType:
- {{
- var $dataType = 'dataType' + $lvl
- , $coerced = 'coerced' + $lvl;
- }}
- var {{=$dataType}} = typeof {{=$data}};
- {{? it.opts.coerceTypes == 'array'}}
- if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';
- {{?}}
-
- var {{=$coerced}} = undefined;
-
- {{ var $bracesCoercion = ''; }}
- {{~ $coerceToTypes:$type:$i }}
- {{? $i }}
- if ({{=$coerced}} === undefined) {
- {{ $bracesCoercion += '}'; }}
- {{?}}
-
- {{? it.opts.coerceTypes == 'array' && $type != 'array' }}
- if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) {
- {{=$coerced}} = {{=$data}} = {{=$data}}[0];
- {{=$dataType}} = typeof {{=$data}};
- /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/
- }
- {{?}}
-
- {{? $type == 'string' }}
- if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean')
- {{=$coerced}} = '' + {{=$data}};
- else if ({{=$data}} === null) {{=$coerced}} = '';
- {{?? $type == 'number' || $type == 'integer' }}
- if ({{=$dataType}} == 'boolean' || {{=$data}} === null
- || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}}
- {{? $type == 'integer' }} && !({{=$data}} % 1){{?}}))
- {{=$coerced}} = +{{=$data}};
- {{?? $type == 'boolean' }}
- if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null)
- {{=$coerced}} = false;
- else if ({{=$data}} === 'true' || {{=$data}} === 1)
- {{=$coerced}} = true;
- {{?? $type == 'null' }}
- if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false)
- {{=$coerced}} = null;
- {{?? it.opts.coerceTypes == 'array' && $type == 'array' }}
- if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null)
- {{=$coerced}} = [{{=$data}}];
- {{?}}
- {{~}}
-
- {{= $bracesCoercion }}
-
- if ({{=$coerced}} === undefined) {
- {{# def.error:'type' }}
- } else {
- {{# def.setParentData }}
- {{=$data}} = {{=$coerced}};
- {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}}
- {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}};
- }
-#}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/custom.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/custom.jst
deleted file mode 100644
index e91c50e6f..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/custom.jst
+++ /dev/null
@@ -1,184 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{
- var $rule = this
- , $definition = 'definition' + $lvl
- , $rDef = $rule.definition;
- var $validate = $rDef.validate;
- var $compile, $inline, $macro, $ruleValidate, $validateCode;
-}}
-
-{{? $isData && $rDef.$data }}
- {{
- $validateCode = 'keywordValidate' + $lvl;
- var $validateSchema = $rDef.validateSchema;
- }}
- var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition;
- var {{=$validateCode}} = {{=$definition}}.validate;
-{{??}}
- {{
- $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
- $schemaValue = 'validate.schema' + $schemaPath;
- $validateCode = $ruleValidate.code;
- $compile = $rDef.compile;
- $inline = $rDef.inline;
- $macro = $rDef.macro;
- }}
-{{?}}
-
-{{
- var $ruleErrs = $validateCode + '.errors'
- , $i = 'i' + $lvl
- , $ruleErr = 'ruleErr' + $lvl
- , $asyncKeyword = $rDef.async;
-
- if ($asyncKeyword && !it.async)
- throw new Error('async keyword in sync schema');
-}}
-
-
-{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}}
-var {{=$errs}} = errors;
-var {{=$valid}};
-
-{{## def.callRuleValidate:
- {{=$validateCode}}.call(
- {{? it.opts.passContext }}this{{??}}self{{?}}
- {{? $compile || $rDef.schema === false }}
- , {{=$data}}
- {{??}}
- , {{=$schemaValue}}
- , {{=$data}}
- , validate.schema{{=it.schemaPath}}
- {{?}}
- , {{# def.dataPath }}
- {{# def.passParentData }}
- , rootData
- )
-#}}
-
-{{## def.extendErrors:_inline:
- for (var {{=$i}}={{=$errs}}; {{=$i}}<errors; {{=$i}}++) {
- var {{=$ruleErr}} = vErrors[{{=$i}}];
- if ({{=$ruleErr}}.dataPath === undefined)
- {{=$ruleErr}}.dataPath = (dataPath || '') + {{= it.errorPath }};
- {{# _inline ? 'if (\{\{=$ruleErr\}\}.schemaPath === undefined) {' : '' }}
- {{=$ruleErr}}.schemaPath = "{{=$errSchemaPath}}";
- {{# _inline ? '}' : '' }}
- {{? it.opts.verbose }}
- {{=$ruleErr}}.schema = {{=$schemaValue}};
- {{=$ruleErr}}.data = {{=$data}};
- {{?}}
- }
-#}}
-
-
-{{? $validateSchema }}
- {{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
- if ({{=$valid}}) {
-{{?}}
-
-{{? $inline }}
- {{? $rDef.statements }}
- {{= $ruleValidate.validate }}
- {{??}}
- {{=$valid}} = {{= $ruleValidate.validate }};
- {{?}}
-{{?? $macro }}
- {{# def.setupNextLevel }}
- {{
- $it.schema = $ruleValidate.validate;
- $it.schemaPath = '';
- }}
- {{# def.setCompositeRule }}
- {{ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); }}
- {{# def.resetCompositeRule }}
- {{= $code }}
-{{??}}
- {{# def.beginDefOut}}
- {{# def.callRuleValidate }}
- {{# def.storeDefOut:def_callRuleValidate }}
-
- {{? $rDef.errors === false }}
- {{=$valid}} = {{? $asyncKeyword }}{{=it.yieldAwait}}{{?}}{{= def_callRuleValidate }};
- {{??}}
- {{? $asyncKeyword }}
- {{ $ruleErrs = 'customErrors' + $lvl; }}
- var {{=$ruleErrs}} = null;
- try {
- {{=$valid}} = {{=it.yieldAwait}}{{= def_callRuleValidate }};
- } catch (e) {
- {{=$valid}} = false;
- if (e instanceof ValidationError) {{=$ruleErrs}} = e.errors;
- else throw e;
- }
- {{??}}
- {{=$ruleErrs}} = null;
- {{=$valid}} = {{= def_callRuleValidate }};
- {{?}}
- {{?}}
-{{?}}
-
-{{? $rDef.modifying }}
- {{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
-{{?}}
-
-{{? $validateSchema }}
- }
-{{?}}
-
-{{## def.notValidationResult:
- {{? $rDef.valid === undefined }}
- !{{? $macro }}{{=$nextValid}}{{??}}{{=$valid}}{{?}}
- {{??}}
- {{= !$rDef.valid }}
- {{?}}
-#}}
-
-{{? $rDef.valid }}
- {{? $breakOnError }} if (true) { {{?}}
-{{??}}
- if ({{# def.notValidationResult }}) {
- {{ $errorKeyword = $rule.keyword; }}
- {{# def.beginDefOut}}
- {{# def.error:'custom' }}
- {{# def.storeDefOut:def_customError }}
-
- {{? $inline }}
- {{? $rDef.errors }}
- {{? $rDef.errors != 'full' }}
- {{# def.extendErrors:true }}
- {{?}}
- {{??}}
- {{? $rDef.errors === false}}
- {{= def_customError }}
- {{??}}
- if ({{=$errs}} == errors) {
- {{= def_customError }}
- } else {
- {{# def.extendErrors:true }}
- }
- {{?}}
- {{?}}
- {{?? $macro }}
- {{# def.extraError:'custom' }}
- {{??}}
- {{? $rDef.errors === false}}
- {{= def_customError }}
- {{??}}
- if (Array.isArray({{=$ruleErrs}})) {
- if (vErrors === null) vErrors = {{=$ruleErrs}};
- else vErrors = vErrors.concat({{=$ruleErrs}});
- errors = vErrors.length;
- {{# def.extendErrors:false }}
- } else {
- {{= def_customError }}
- }
- {{?}}
- {{?}}
-
- } {{? $breakOnError }} else { {{?}}
-{{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/defaults.def b/node_modules/node-gyp/node_modules/ajv/lib/dot/defaults.def
deleted file mode 100644
index 5ad8d1d2d..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/defaults.def
+++ /dev/null
@@ -1,32 +0,0 @@
-{{## def.assignDefault:
- if ({{=$passData}} === undefined)
- {{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
- {{= it.useDefault($sch.default) }}
- {{??}}
- {{= JSON.stringify($sch.default) }}
- {{?}};
-#}}
-
-
-{{## def.defaultProperties:
- {{
- var $schema = it.schema.properties
- , $schemaKeys = Object.keys($schema); }}
- {{~ $schemaKeys:$propertyKey }}
- {{ var $sch = $schema[$propertyKey]; }}
- {{? $sch.default !== undefined }}
- {{ var $passData = $data + it.util.getProperty($propertyKey); }}
- {{# def.assignDefault }}
- {{?}}
- {{~}}
-#}}
-
-
-{{## def.defaultItems:
- {{~ it.schema.items:$sch:$i }}
- {{? $sch.default !== undefined }}
- {{ var $passData = $data + '[' + $i + ']'; }}
- {{# def.assignDefault }}
- {{?}}
- {{~}}
-#}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/definitions.def b/node_modules/node-gyp/node_modules/ajv/lib/dot/definitions.def
deleted file mode 100644
index a442346f5..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/definitions.def
+++ /dev/null
@@ -1,182 +0,0 @@
-{{## def.setupKeyword:
- {{
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
-
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- }}
-#}}
-
-
-{{## def.setCompositeRule:
- {{
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- }}
-#}}
-
-
-{{## def.resetCompositeRule:
- {{ it.compositeRule = $it.compositeRule = $wasComposite; }}
-#}}
-
-
-{{## def.setupNextLevel:
- {{
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- }}
-#}}
-
-
-{{## def.ifValid:
- {{? $breakOnError }}
- if ({{=$valid}}) {
- {{ $closingBraces += '}'; }}
- {{?}}
-#}}
-
-
-{{## def.ifResultValid:
- {{? $breakOnError }}
- if ({{=$nextValid}}) {
- {{ $closingBraces += '}'; }}
- {{?}}
-#}}
-
-
-{{## def.elseIfValid:
- {{? $breakOnError }}
- {{ $closingBraces += '}'; }}
- else {
- {{?}}
-#}}
-
-
-{{## def.nonEmptySchema:_schema:
- it.util.schemaHasRules(_schema, it.RULES.all)
-#}}
-
-
-{{## def.strLength:
- {{? it.opts.unicode === false }}
- {{=$data}}.length
- {{??}}
- ucs2length({{=$data}})
- {{?}}
-#}}
-
-
-{{## def.willOptimize:
- it.util.varOccurences($code, $nextData) < 2
-#}}
-
-
-{{## def.generateSubschemaCode:
- {{
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- }}
-#}}
-
-
-{{## def.insertSubschemaCode:
- {{= it.validate($it) }}
- {{ $it.baseId = $currentBaseId; }}
-#}}
-
-
-{{## def._optimizeValidate:
- it.util.varReplace($code, $nextData, $passData)
-#}}
-
-
-{{## def.optimizeValidate:
- {{? {{# def.willOptimize}} }}
- {{= {{# def._optimizeValidate }} }}
- {{??}}
- var {{=$nextData}} = {{=$passData}};
- {{= $code }}
- {{?}}
-#}}
-
-
-{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}}
-
-
-{{## def.cleanUpVarErrors: {{ out = it.util.cleanUpVarErrors(out, $async); }} #}}
-
-
-{{## def.$data:
- {{
- var $isData = it.opts.v5 && $schema && $schema.$data
- , $schemaValue;
- }}
- {{? $isData }}
- var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }};
- {{ $schemaValue = 'schema' + $lvl; }}
- {{??}}
- {{ $schemaValue = $schema; }}
- {{?}}
-#}}
-
-
-{{## def.$dataNotType:_type:
- {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}}
-#}}
-
-
-{{## def.check$dataIsArray:
- if (schema{{=$lvl}} === undefined) {{=$valid}} = true;
- else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false;
- else {
-#}}
-
-
-{{## def.beginDefOut:
- {{
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = '';
- }}
-#}}
-
-
-{{## def.storeDefOut:_variable:
- {{
- var _variable = out;
- out = $$outStack.pop();
- }}
-#}}
-
-
-{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}}
-
-{{## def.setParentData:
- {{
- var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData'
- , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- }}
-#}}
-
-{{## def.passParentData:
- {{# def.setParentData }}
- , {{= $parentData }}
- , {{= $parentDataProperty }}
-#}}
-
-
-{{## def.checkOwnProperty:
- {{? $ownProperties }}
- if (!Object.prototype.hasOwnProperty.call({{=$data}}, {{=$key}})) continue;
- {{?}}
-#}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/dependencies.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/dependencies.jst
deleted file mode 100644
index 1198a45fe..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/dependencies.jst
+++ /dev/null
@@ -1,69 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.missing }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-
-{{
- var $schemaDeps = {}
- , $propertyDeps = {};
-
- for ($property in $schema) {
- var $sch = $schema[$property];
- var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
- $deps[$property] = $sch;
- }
-}}
-
-var {{=$errs}} = errors;
-
-{{ var $currentErrorPath = it.errorPath; }}
-
-var missing{{=$lvl}};
-{{ for (var $property in $propertyDeps) { }}
- {{ $deps = $propertyDeps[$property]; }}
- if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined
- {{? $breakOnError }}
- && ({{# def.checkMissingProperty:$deps }})) {
- {{# def.errorMissingProperty:'dependencies' }}
- {{??}}
- ) {
- {{~ $deps:$reqProperty }}
- {{# def.allErrorsMissingProperty:'dependencies' }}
- {{~}}
- {{?}}
- } {{# def.elseIfValid }}
-{{ } }}
-
-{{
- it.errorPath = $currentErrorPath;
- var $currentBaseId = $it.baseId;
-}}
-
-
-{{ for (var $property in $schemaDeps) { }}
- {{ var $sch = $schemaDeps[$property]; }}
- {{? {{# def.nonEmptySchema:$sch }} }}
- {{=$nextValid}} = true;
-
- if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined) {
- {{
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + it.util.getProperty($property);
- $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
- }}
-
- {{# def.insertSubschemaCode }}
- }
-
- {{# def.ifResultValid }}
- {{?}}
-{{ } }}
-
-{{? $breakOnError }}
- {{= $closingBraces }}
- if ({{=$errs}} == errors) {
-{{?}}
-
-{{# def.cleanUp }}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/enum.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/enum.jst
deleted file mode 100644
index 357c2e8c0..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/enum.jst
+++ /dev/null
@@ -1,30 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{
- var $i = 'i' + $lvl
- , $vSchema = 'schema' + $lvl;
-}}
-
-{{? !$isData }}
- var {{=$vSchema}} = validate.schema{{=$schemaPath}};
-{{?}}
-var {{=$valid}};
-
-{{?$isData}}{{# def.check$dataIsArray }}{{?}}
-
-{{=$valid}} = false;
-
-for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++)
- if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) {
- {{=$valid}} = true;
- break;
- }
-
-{{? $isData }} } {{?}}
-
-{{# def.checkError:'enum' }}
-
-{{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/errors.def b/node_modules/node-gyp/node_modules/ajv/lib/dot/errors.def
deleted file mode 100644
index 3e0472120..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/errors.def
+++ /dev/null
@@ -1,185 +0,0 @@
-{{# def.definitions }}
-
-{{## def._error:_rule:
- {{ 'istanbul ignore else'; }}
- {{? it.createErrors !== false }}
- {
- keyword: '{{= $errorKeyword || _rule }}'
- , dataPath: (dataPath || '') + {{= it.errorPath }}
- , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}}
- , params: {{# def._errorParams[_rule] }}
- {{? it.opts.messages !== false }}
- , message: {{# def._errorMessages[_rule] }}
- {{?}}
- {{? it.opts.verbose }}
- , schema: {{# def._errorSchemas[_rule] }}
- , parentSchema: validate.schema{{=it.schemaPath}}
- , data: {{=$data}}
- {{?}}
- }
- {{??}}
- {}
- {{?}}
-#}}
-
-
-{{## def._addError:_rule:
- if (vErrors === null) vErrors = [err];
- else vErrors.push(err);
- errors++;
-#}}
-
-
-{{## def.addError:_rule:
- var err = {{# def._error:_rule }};
- {{# def._addError:_rule }}
-#}}
-
-
-{{## def.error:_rule:
- {{# def.beginDefOut}}
- {{# def._error:_rule }}
- {{# def.storeDefOut:__err }}
-
- {{? !it.compositeRule && $breakOnError }}
- {{ 'istanbul ignore if'; }}
- {{? it.async }}
- throw new ValidationError([{{=__err}}]);
- {{??}}
- validate.errors = [{{=__err}}];
- return false;
- {{?}}
- {{??}}
- var err = {{=__err}};
- {{# def._addError:_rule }}
- {{?}}
-#}}
-
-
-{{## def.extraError:_rule:
- {{# def.addError:_rule}}
- {{? !it.compositeRule && $breakOnError }}
- {{ 'istanbul ignore if'; }}
- {{? it.async }}
- throw new ValidationError(vErrors);
- {{??}}
- validate.errors = vErrors;
- return false;
- {{?}}
- {{?}}
-#}}
-
-
-{{## def.checkError:_rule:
- if (!{{=$valid}}) {
- {{# def.error:_rule }}
- }
-#}}
-
-
-{{## def.resetErrors:
- errors = {{=$errs}};
- if (vErrors !== null) {
- if ({{=$errs}}) vErrors.length = {{=$errs}};
- else vErrors = null;
- }
-#}}
-
-
-{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
-{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schema}}'{{?}}#}}
-{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
-
-{{## def._errorMessages = {
- $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
- additionalItems: "'should NOT have more than {{=$schema.length}} items'",
- additionalProperties: "'should NOT have additional properties'",
- anyOf: "'should match some schema in anyOf'",
- dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
- 'enum': "'should be equal to one of the allowed values'",
- format: "'should match format \"{{#def.concatSchemaEQ}}\"'",
- _limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
- _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
- _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}less{{?}} than {{#def.concatSchema}} items'",
- _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
- _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}less{{?}} than {{#def.concatSchema}} properties'",
- multipleOf: "'should be multiple of {{#def.appendSchema}}",
- not: "'should NOT be valid'",
- oneOf: "'should match exactly one schema in oneOf'",
- pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
- required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'",
- type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'",
- uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'",
- custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'",
- patternGroups: "'should NOT have {{=$moreOrLess}} than {{=$limit}} properties matching pattern \"{{=it.util.escapeQuotes($pgProperty)}}\"'",
- patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
- switch: "'should pass \"switch\" keyword validation'",
- constant: "'should be equal to constant'",
- _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'",
- _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'"
-} #}}
-
-
-{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}}
-{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
-
-{{## def._errorSchemas = {
- $ref: "{{=it.util.toQuotedString($schema)}}",
- additionalItems: "false",
- additionalProperties: "false",
- anyOf: "validate.schema{{=$schemaPath}}",
- dependencies: "validate.schema{{=$schemaPath}}",
- 'enum': "validate.schema{{=$schemaPath}}",
- format: "{{#def.schemaRefOrQS}}",
- _limit: "{{#def.schemaRefOrVal}}",
- _exclusiveLimit: "validate.schema{{=$schemaPath}}",
- _limitItems: "{{#def.schemaRefOrVal}}",
- _limitLength: "{{#def.schemaRefOrVal}}",
- _limitProperties:"{{#def.schemaRefOrVal}}",
- multipleOf: "{{#def.schemaRefOrVal}}",
- not: "validate.schema{{=$schemaPath}}",
- oneOf: "validate.schema{{=$schemaPath}}",
- pattern: "{{#def.schemaRefOrQS}}",
- required: "validate.schema{{=$schemaPath}}",
- type: "validate.schema{{=$schemaPath}}",
- uniqueItems: "{{#def.schemaRefOrVal}}",
- custom: "validate.schema{{=$schemaPath}}",
- patternGroups: "validate.schema{{=$schemaPath}}",
- patternRequired: "validate.schema{{=$schemaPath}}",
- switch: "validate.schema{{=$schemaPath}}",
- constant: "validate.schema{{=$schemaPath}}",
- _formatLimit: "{{#def.schemaRefOrQS}}",
- _formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
-} #}}
-
-
-{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
-
-{{## def._errorParams = {
- $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
- additionalItems: "{ limit: {{=$schema.length}} }",
- additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
- anyOf: "{}",
- dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
- 'enum': "{ allowedValues: schema{{=$lvl}} }",
- format: "{ format: {{#def.schemaValueQS}} }",
- _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
- _exclusiveLimit: "{}",
- _limitItems: "{ limit: {{=$schemaValue}} }",
- _limitLength: "{ limit: {{=$schemaValue}} }",
- _limitProperties:"{ limit: {{=$schemaValue}} }",
- multipleOf: "{ multipleOf: {{=$schemaValue}} }",
- not: "{}",
- oneOf: "{}",
- pattern: "{ pattern: {{#def.schemaValueQS}} }",
- required: "{ missingProperty: '{{=$missingProperty}}' }",
- type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
- uniqueItems: "{ i: i, j: j }",
- custom: "{ keyword: '{{=$rule.keyword}}' }",
- patternGroups: "{ reason: '{{=$reason}}', limit: {{=$limit}}, pattern: '{{=it.util.escapeQuotes($pgProperty)}}' }",
- patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
- switch: "{ caseIndex: {{=$caseIndex}} }",
- constant: "{}",
- _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
- _formatExclusiveLimit: "{}"
-} #}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/format.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/format.jst
deleted file mode 100644
index 961fe4fc9..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/format.jst
+++ /dev/null
@@ -1,100 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-
-{{## def.skipFormat:
- {{? $breakOnError }} if (true) { {{?}}
- {{ return out; }}
-#}}
-
-{{? it.opts.format === false }}{{# def.skipFormat }}{{?}}
-
-
-{{# def.$data }}
-
-
-{{## def.$dataCheckFormat:
- {{# def.$dataNotType:'string' }}
- ({{? $unknownFormats === true || $allowUnknown }}
- ({{=$schemaValue}} && !{{=$format}}
- {{? $allowUnknown }}
- && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
- {{?}}) ||
- {{?}}
- ({{=$format}} && !(typeof {{=$format}} == 'function'
- ? {{? it.async}}
- (async{{=$lvl}} ? {{=it.yieldAwait}} {{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
- {{??}}
- {{=$format}}({{=$data}})
- {{?}}
- : {{=$format}}.test({{=$data}}))))
-#}}
-
-{{## def.checkFormat:
- {{
- var $formatRef = 'formats' + it.util.getProperty($schema);
- if ($isObject) $formatRef += '.validate';
- }}
- {{? typeof $format == 'function' }}
- {{=$formatRef}}({{=$data}})
- {{??}}
- {{=$formatRef}}.test({{=$data}})
- {{?}}
-#}}
-
-
-{{
- var $unknownFormats = it.opts.unknownFormats
- , $allowUnknown = Array.isArray($unknownFormats);
-}}
-
-{{? $isData }}
- {{ var $format = 'format' + $lvl; }}
- var {{=$format}} = formats[{{=$schemaValue}}];
- var isObject{{=$lvl}} = typeof {{=$format}} == 'object'
- && !({{=$format}} instanceof RegExp)
- && {{=$format}}.validate;
- if (isObject{{=$lvl}}) {
- {{? it.async}}
- var async{{=$lvl}} = {{=$format}}.async;
- {{?}}
- {{=$format}} = {{=$format}}.validate;
- }
- if ({{# def.$dataCheckFormat }}) {
-{{??}}
- {{ var $format = it.formats[$schema]; }}
- {{? !$format }}
- {{? $unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1) }}
- {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
- {{??}}
- {{
- if (!$allowUnknown) {
- console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
- if ($unknownFormats !== 'ignore')
- console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
- }
- }}
- {{# def.skipFormat }}
- {{?}}
- {{?}}
- {{
- var $isObject = typeof $format == 'object'
- && !($format instanceof RegExp)
- && $format.validate;
- if ($isObject) {
- var $async = $format.async === true;
- $format = $format.validate;
- }
- }}
- {{? $async }}
- {{
- if (!it.async) throw new Error('async format in sync schema');
- var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
- }}
- if (!({{=it.yieldAwait}} {{=$formatRef}}({{=$data}}))) {
- {{??}}
- if (!{{# def.checkFormat }}) {
- {{?}}
-{{?}}
- {{# def.error:'format' }}
- } {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/items.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/items.jst
deleted file mode 100644
index a8b8aa7dd..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/items.jst
+++ /dev/null
@@ -1,101 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-
-{{## def.validateItems:startFrom:
- for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
- {{
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- }}
-
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
-
- {{? $breakOnError }}
- if (!{{=$nextValid}}) break;
- {{?}}
- }
-#}}
-
-{{
- var $idx = 'i' + $lvl
- , $dataNxt = $it.dataLevel = it.dataLevel + 1
- , $nextData = 'data' + $dataNxt
- , $currentBaseId = it.baseId;
-}}
-
-var {{=$errs}} = errors;
-var {{=$valid}};
-
-{{? Array.isArray($schema) }}
- {{ /* 'items' is an array of schemas */}}
- {{ var $additionalItems = it.schema.additionalItems; }}
- {{? $additionalItems === false }}
- {{=$valid}} = {{=$data}}.length <= {{= $schema.length }};
- {{
- var $currErrSchemaPath = $errSchemaPath;
- $errSchemaPath = it.errSchemaPath + '/additionalItems';
- }}
- {{# def.checkError:'additionalItems' }}
- {{ $errSchemaPath = $currErrSchemaPath; }}
- {{# def.elseIfValid}}
- {{?}}
-
- {{~ $schema:$sch:$i }}
- {{? {{# def.nonEmptySchema:$sch }} }}
- {{=$nextValid}} = true;
-
- if ({{=$data}}.length > {{=$i}}) {
- {{
- var $passData = $data + '[' + $i + ']';
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
- $it.dataPathArr[$dataNxt] = $i;
- }}
-
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
- }
-
- {{# def.ifResultValid }}
- {{?}}
- {{~}}
-
- {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }}
- {{
- $it.schema = $additionalItems;
- $it.schemaPath = it.schemaPath + '.additionalItems';
- $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
- }}
- {{=$nextValid}} = true;
-
- if ({{=$data}}.length > {{= $schema.length }}) {
- {{# def.validateItems: $schema.length }}
- }
-
- {{# def.ifResultValid }}
- {{?}}
-
-{{?? {{# def.nonEmptySchema:$schema }} }}
- {{ /* 'items' is a single schema */}}
- {{
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- }}
- {{# def.validateItems: 0 }}
- {{# def.ifResultValid }}
-{{?}}
-
-{{? $breakOnError }}
- {{= $closingBraces }}
- if ({{=$errs}} == errors) {
-{{?}}
-
-{{# def.cleanUp }}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/missing.def b/node_modules/node-gyp/node_modules/ajv/lib/dot/missing.def
deleted file mode 100644
index 23ad04cf4..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/missing.def
+++ /dev/null
@@ -1,34 +0,0 @@
-{{## def.checkMissingProperty:_properties:
- {{~ _properties:_$property:$i }}
- {{?$i}} || {{?}}
- {{ var $prop = it.util.getProperty(_$property); }}
- ( {{=$data}}{{=$prop}} === undefined && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop) }}) )
- {{~}}
-#}}
-
-
-{{## def.errorMissingProperty:_error:
- {{
- var $propertyPath = 'missing' + $lvl
- , $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.opts.jsonPointers
- ? it.util.getPathExpr($currentErrorPath, $propertyPath, true)
- : $currentErrorPath + ' + ' + $propertyPath;
- }
- }}
- {{# def.error:_error }}
-#}}
-
-{{## def.allErrorsMissingProperty:_error:
- {{
- var $prop = it.util.getProperty($reqProperty)
- , $missingProperty = it.util.escapeQuotes($reqProperty);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
- }
- }}
- if ({{=$data}}{{=$prop}} === undefined) {
- {{# def.addError:_error }}
- }
-#}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/multipleOf.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/multipleOf.jst
deleted file mode 100644
index 5f8dd33b5..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/multipleOf.jst
+++ /dev/null
@@ -1,20 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-var division{{=$lvl}};
-if ({{?$isData}}
- {{=$schemaValue}} !== undefined && (
- typeof {{=$schemaValue}} != 'number' ||
- {{?}}
- (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
- {{? it.opts.multipleOfPrecision }}
- Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
- {{??}}
- division{{=$lvl}} !== parseInt(division{{=$lvl}})
- {{?}}
- )
- {{?$isData}} ) {{?}} ) {
- {{# def.error:'multipleOf' }}
-} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/not.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/not.jst
deleted file mode 100644
index e03185ae8..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/not.jst
+++ /dev/null
@@ -1,43 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-{{? {{# def.nonEmptySchema:$schema }} }}
- {{
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- }}
-
- var {{=$errs}} = errors;
-
- {{# def.setCompositeRule }}
-
- {{
- $it.createErrors = false;
- var $allErrorsOption;
- if ($it.opts.allErrors) {
- $allErrorsOption = $it.opts.allErrors;
- $it.opts.allErrors = false;
- }
- }}
- {{= it.validate($it) }}
- {{
- $it.createErrors = true;
- if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
- }}
-
- {{# def.resetCompositeRule }}
-
- if ({{=$nextValid}}) {
- {{# def.error:'not' }}
- } else {
- {{# def.resetErrors }}
- {{? it.opts.allErrors }} } {{?}}
-{{??}}
- {{# def.addError:'not' }}
- {{? $breakOnError}}
- if (false) {
- {{?}}
-{{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/oneOf.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/oneOf.jst
deleted file mode 100644
index b7f7bff07..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/oneOf.jst
+++ /dev/null
@@ -1,44 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-var {{=$errs}} = errors;
-var prevValid{{=$lvl}} = false;
-var {{=$valid}} = false;
-
-{{ var $currentBaseId = $it.baseId; }}
-{{# def.setCompositeRule }}
-
-{{~ $schema:$sch:$i }}
- {{? {{# def.nonEmptySchema:$sch }} }}
- {{
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- }}
-
- {{# def.insertSubschemaCode }}
- {{??}}
- var {{=$nextValid}} = true;
- {{?}}
-
- {{? $i }}
- if ({{=$nextValid}} && prevValid{{=$lvl}})
- {{=$valid}} = false;
- else {
- {{ $closingBraces += '}'; }}
- {{?}}
-
- if ({{=$nextValid}}) {{=$valid}} = prevValid{{=$lvl}} = true;
-{{~}}
-
-{{# def.resetCompositeRule }}
-
-{{= $closingBraces }}
-
-if (!{{=$valid}}) {
- {{# def.error:'oneOf' }}
-} else {
- {{# def.resetErrors }}
-{{? it.opts.allErrors }} } {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/pattern.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/pattern.jst
deleted file mode 100644
index 3a37ef6cb..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/pattern.jst
+++ /dev/null
@@ -1,14 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{
- var $regexp = $isData
- ? '(new RegExp(' + $schemaValue + '))'
- : it.usePattern($schema);
-}}
-
-if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
- {{# def.error:'pattern' }}
-} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/properties.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/properties.jst
deleted file mode 100644
index 3a4b966ff..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/properties.jst
+++ /dev/null
@@ -1,319 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-
-{{## def.validateAdditional:
- {{ /* additionalProperties is schema */
- $it.schema = $aProperties;
- $it.schemaPath = it.schemaPath + '.additionalProperties';
- $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
- $it.errorPath = it.opts._errorDataPathProperty
- ? it.errorPath
- : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- }}
-
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
-#}}
-
-
-{{
- var $key = 'key' + $lvl
- , $dataNxt = $it.dataLevel = it.dataLevel + 1
- , $nextData = 'data' + $dataNxt;
-
- var $schemaKeys = Object.keys($schema || {})
- , $pProperties = it.schema.patternProperties || {}
- , $pPropertyKeys = Object.keys($pProperties)
- , $aProperties = it.schema.additionalProperties
- , $someProperties = $schemaKeys.length || $pPropertyKeys.length
- , $noAdditional = $aProperties === false
- , $additionalIsSchema = typeof $aProperties == 'object'
- && Object.keys($aProperties).length
- , $removeAdditional = it.opts.removeAdditional
- , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional
- , $ownProperties = it.opts.ownProperties
- , $currentBaseId = it.baseId;
-
- var $required = it.schema.required;
- if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired)
- var $requiredHash = it.util.toHash($required);
-
- if (it.opts.v5) {
- var $pgProperties = it.schema.patternGroups || {}
- , $pgPropertyKeys = Object.keys($pgProperties);
- }
-}}
-
-
-var {{=$errs}} = errors;
-var {{=$nextValid}} = true;
-
-{{? $checkAdditional }}
- for (var {{=$key}} in {{=$data}}) {
- {{# def.checkOwnProperty }}
- {{? $someProperties }}
- var isAdditional{{=$lvl}} = !(false
- {{? $schemaKeys.length }}
- {{? $schemaKeys.length > 5 }}
- || validate.schema{{=$schemaPath}}[{{=$key}}]
- {{??}}
- {{~ $schemaKeys:$propertyKey }}
- || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }}
- {{~}}
- {{?}}
- {{?}}
- {{? $pPropertyKeys.length }}
- {{~ $pPropertyKeys:$pProperty:$i }}
- || {{= it.usePattern($pProperty) }}.test({{=$key}})
- {{~}}
- {{?}}
- {{? it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length }}
- {{~ $pgPropertyKeys:$pgProperty:$i }}
- || {{= it.usePattern($pgProperty) }}.test({{=$key}})
- {{~}}
- {{?}}
- );
-
- if (isAdditional{{=$lvl}}) {
- {{?}}
- {{? $removeAdditional == 'all' }}
- delete {{=$data}}[{{=$key}}];
- {{??}}
- {{
- var $currentErrorPath = it.errorPath;
- var $additionalProperty = '\' + ' + $key + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- }
- }}
- {{? $noAdditional }}
- {{? $removeAdditional }}
- delete {{=$data}}[{{=$key}}];
- {{??}}
- {{=$nextValid}} = false;
- {{
- var $currErrSchemaPath = $errSchemaPath;
- $errSchemaPath = it.errSchemaPath + '/additionalProperties';
- }}
- {{# def.error:'additionalProperties' }}
- {{ $errSchemaPath = $currErrSchemaPath; }}
- {{? $breakOnError }} break; {{?}}
- {{?}}
- {{?? $additionalIsSchema }}
- {{? $removeAdditional == 'failing' }}
- var {{=$errs}} = errors;
- {{# def.setCompositeRule }}
-
- {{# def.validateAdditional }}
-
- if (!{{=$nextValid}}) {
- errors = {{=$errs}};
- if (validate.errors !== null) {
- if (errors) validate.errors.length = errors;
- else validate.errors = null;
- }
- delete {{=$data}}[{{=$key}}];
- }
-
- {{# def.resetCompositeRule }}
- {{??}}
- {{# def.validateAdditional }}
- {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
- {{?}}
- {{?}}
- {{ it.errorPath = $currentErrorPath; }}
- {{?}}
- {{? $someProperties }}
- }
- {{?}}
- }
-
- {{# def.ifResultValid }}
-{{?}}
-
-{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }}
-
-{{? $schemaKeys.length }}
- {{~ $schemaKeys:$propertyKey }}
- {{ var $sch = $schema[$propertyKey]; }}
-
- {{? {{# def.nonEmptySchema:$sch}} }}
- {{
- var $prop = it.util.getProperty($propertyKey)
- , $passData = $data + $prop
- , $hasDefault = $useDefaults && $sch.default !== undefined;
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + $prop;
- $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
- $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
- $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
- }}
-
- {{# def.generateSubschemaCode }}
-
- {{? {{# def.willOptimize }} }}
- {{
- $code = {{# def._optimizeValidate }};
- var $useData = $passData;
- }}
- {{??}}
- {{ var $useData = $nextData; }}
- var {{=$nextData}} = {{=$passData}};
- {{?}}
-
- {{? $hasDefault }}
- {{= $code }}
- {{??}}
- {{? $requiredHash && $requiredHash[$propertyKey] }}
- if ({{=$useData}} === undefined) {
- {{=$nextValid}} = false;
- {{
- var $currentErrorPath = it.errorPath
- , $currErrSchemaPath = $errSchemaPath
- , $missingProperty = it.util.escapeQuotes($propertyKey);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
- }
- $errSchemaPath = it.errSchemaPath + '/required';
- }}
- {{# def.error:'required' }}
- {{ $errSchemaPath = $currErrSchemaPath; }}
- {{ it.errorPath = $currentErrorPath; }}
- } else {
- {{??}}
- {{? $breakOnError }}
- if ({{=$useData}} === undefined) {
- {{=$nextValid}} = true;
- } else {
- {{??}}
- if ({{=$useData}} !== undefined) {
- {{?}}
- {{?}}
-
- {{= $code }}
- }
- {{?}} {{ /* $hasDefault */ }}
- {{?}} {{ /* def.nonEmptySchema */ }}
-
- {{# def.ifResultValid }}
- {{~}}
-{{?}}
-
-{{~ $pPropertyKeys:$pProperty }}
- {{ var $sch = $pProperties[$pProperty]; }}
-
- {{? {{# def.nonEmptySchema:$sch}} }}
- {{
- $it.schema = $sch;
- $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
- $it.errSchemaPath = it.errSchemaPath + '/patternProperties/'
- + it.util.escapeFragment($pProperty);
- }}
-
- for (var {{=$key}} in {{=$data}}) {
- {{# def.checkOwnProperty }}
- if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
- {{
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- }}
-
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
-
- {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
- }
- {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
- }
-
- {{# def.ifResultValid }}
- {{?}} {{ /* def.nonEmptySchema */ }}
-{{~}}
-
-
-{{? it.opts.v5 }}
- {{~ $pgPropertyKeys:$pgProperty }}
- {{
- var $pgSchema = $pgProperties[$pgProperty]
- , $sch = $pgSchema.schema;
- }}
-
- {{? {{# def.nonEmptySchema:$sch}} }}
- {{
- $it.schema = $sch;
- $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
- $it.errSchemaPath = it.errSchemaPath + '/patternGroups/'
- + it.util.escapeFragment($pgProperty)
- + '/schema';
- }}
-
- var pgPropCount{{=$lvl}} = 0;
-
- for (var {{=$key}} in {{=$data}}) {
- {{# def.checkOwnProperty }}
- if ({{= it.usePattern($pgProperty) }}.test({{=$key}})) {
- pgPropCount{{=$lvl}}++;
-
- {{
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- }}
-
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
-
- {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
- }
- {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
- }
-
- {{# def.ifResultValid }}
-
- {{
- var $pgMin = $pgSchema.minimum
- , $pgMax = $pgSchema.maximum;
- }}
- {{? $pgMin !== undefined || $pgMax !== undefined }}
- var {{=$valid}} = true;
-
- {{ var $currErrSchemaPath = $errSchemaPath; }}
-
- {{? $pgMin !== undefined }}
- {{ var $limit = $pgMin, $reason = 'minimum', $moreOrLess = 'less'; }}
- {{=$valid}} = pgPropCount{{=$lvl}} >= {{=$pgMin}};
- {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; }}
- {{# def.checkError:'patternGroups' }}
- {{? $pgMax !== undefined }}
- else
- {{?}}
- {{?}}
-
- {{? $pgMax !== undefined }}
- {{ var $limit = $pgMax, $reason = 'maximum', $moreOrLess = 'more'; }}
- {{=$valid}} = pgPropCount{{=$lvl}} <= {{=$pgMax}};
- {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; }}
- {{# def.checkError:'patternGroups' }}
- {{?}}
-
- {{ $errSchemaPath = $currErrSchemaPath; }}
-
- {{# def.ifValid }}
- {{?}}
- {{?}} {{ /* def.nonEmptySchema */ }}
- {{~}}
-{{?}}
-
-
-{{? $breakOnError }}
- {{= $closingBraces }}
- if ({{=$errs}} == errors) {
-{{?}}
-
-{{# def.cleanUp }}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/ref.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/ref.jst
deleted file mode 100644
index e8cdc4435..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/ref.jst
+++ /dev/null
@@ -1,86 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-
-{{## def._validateRef:_v:
- {{? it.opts.passContext }}
- {{=_v}}.call(this,
- {{??}}
- {{=_v}}(
- {{?}}
- {{=$data}}, {{# def.dataPath }}{{# def.passParentData }}, rootData)
-#}}
-
-{{ var $async, $refCode; }}
-{{? $schema == '#' || $schema == '#/' }}
- {{
- if (it.isRoot) {
- $async = it.async;
- $refCode = 'validate';
- } else {
- $async = it.root.schema.$async === true;
- $refCode = 'root.refVal[0]';
- }
- }}
-{{??}}
- {{ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); }}
- {{? $refVal === undefined }}
- {{ var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId; }}
- {{? it.opts.missingRefs == 'fail' }}
- {{ console.log($message); }}
- {{# def.error:'$ref' }}
- {{? $breakOnError }} if (false) { {{?}}
- {{?? it.opts.missingRefs == 'ignore' }}
- {{ console.log($message); }}
- {{? $breakOnError }} if (true) { {{?}}
- {{??}}
- {{
- var $error = new Error($message);
- $error.missingRef = it.resolve.url(it.baseId, $schema);
- $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));
- throw $error;
- }}
- {{?}}
- {{?? $refVal.inline }}
- {{# def.setupNextLevel }}
- {{
- $it.schema = $refVal.schema;
- $it.schemaPath = '';
- $it.errSchemaPath = $schema;
- }}
- {{ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); }}
- {{= $code }}
- {{? $breakOnError}}
- if ({{=$nextValid}}) {
- {{?}}
- {{??}}
- {{
- $async = $refVal.$async === true;
- $refCode = $refVal.code;
- }}
- {{?}}
-{{?}}
-
-{{? $refCode }}
- {{# def.beginDefOut}}
- {{# def._validateRef:$refCode }}
- {{# def.storeDefOut:__callValidate }}
-
- {{? $async }}
- {{ if (!it.async) throw new Error('async schema referenced by sync schema'); }}
- try { {{? $breakOnError }}var {{=$valid}} ={{?}} {{=it.yieldAwait}} {{=__callValidate}}; }
- catch (e) {
- if (!(e instanceof ValidationError)) throw e;
- if (vErrors === null) vErrors = e.errors;
- else vErrors = vErrors.concat(e.errors);
- errors = vErrors.length;
- }
- {{? $breakOnError }} if ({{=$valid}}) { {{?}}
- {{??}}
- if (!{{=__callValidate}}) {
- if (vErrors === null) vErrors = {{=$refCode}}.errors;
- else vErrors = vErrors.concat({{=$refCode}}.errors);
- errors = vErrors.length;
- } {{? $breakOnError }} else { {{?}}
- {{?}}
-{{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/required.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/required.jst
deleted file mode 100644
index e109568f3..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/required.jst
+++ /dev/null
@@ -1,96 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.missing }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{ var $vSchema = 'schema' + $lvl; }}
-
-{{## def.setupLoop:
- {{? !$isData }}
- var {{=$vSchema}} = validate.schema{{=$schemaPath}};
- {{?}}
-
- {{
- var $i = 'i' + $lvl
- , $propertyPath = 'schema' + $lvl + '[' + $i + ']'
- , $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
- }
- }}
-#}}
-
-
-{{? !$isData }}
- {{? $schema.length < it.opts.loopRequired &&
- it.schema.properties && Object.keys(it.schema.properties).length }}
- {{ var $required = []; }}
- {{~ $schema:$property }}
- {{ var $propertySch = it.schema.properties[$property]; }}
- {{? !($propertySch && {{# def.nonEmptySchema:$propertySch}}) }}
- {{ $required[$required.length] = $property; }}
- {{?}}
- {{~}}
- {{??}}
- {{ var $required = $schema; }}
- {{?}}
-{{?}}
-
-
-{{? $isData || $required.length }}
- {{
- var $currentErrorPath = it.errorPath
- , $loopRequired = $isData || $required.length >= it.opts.loopRequired;
- }}
-
- {{? $breakOnError }}
- var missing{{=$lvl}};
- {{? $loopRequired }}
- {{# def.setupLoop }}
- var {{=$valid}} = true;
-
- {{?$isData}}{{# def.check$dataIsArray }}{{?}}
-
- for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
- {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined;
- if (!{{=$valid}}) break;
- }
-
- {{? $isData }} } {{?}}
-
- {{# def.checkError:'required' }}
- else {
- {{??}}
- if ({{# def.checkMissingProperty:$required }}) {
- {{# def.errorMissingProperty:'required' }}
- } else {
- {{?}}
- {{??}}
- {{? $loopRequired }}
- {{# def.setupLoop }}
- {{? $isData }}
- if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) {
- {{# def.addError:'required' }}
- } else if ({{=$vSchema}} !== undefined) {
- {{?}}
-
- for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
- if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined) {
- {{# def.addError:'required' }}
- }
- }
-
- {{? $isData }} } {{?}}
- {{??}}
- {{~ $required:$reqProperty }}
- {{# def.allErrorsMissingProperty:'required' }}
- {{~}}
- {{?}}
- {{?}}
-
- {{ it.errorPath = $currentErrorPath; }}
-
-{{?? $breakOnError }}
- if (true) {
-{{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/uniqueItems.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/uniqueItems.jst
deleted file mode 100644
index dfc42b03b..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/uniqueItems.jst
+++ /dev/null
@@ -1,38 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-
-{{? ($schema || $isData) && it.opts.uniqueItems !== false }}
- {{? $isData }}
- var {{=$valid}};
- if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined)
- {{=$valid}} = true;
- else if (typeof {{=$schemaValue}} != 'boolean')
- {{=$valid}} = false;
- else {
- {{?}}
-
- var {{=$valid}} = true;
- if ({{=$data}}.length > 1) {
- var i = {{=$data}}.length, j;
- outer:
- for (;i--;) {
- for (j = i; j--;) {
- if (equal({{=$data}}[i], {{=$data}}[j])) {
- {{=$valid}} = false;
- break outer;
- }
- }
- }
- }
-
- {{? $isData }} } {{?}}
-
- if (!{{=$valid}}) {
- {{# def.error:'uniqueItems' }}
- } {{? $breakOnError }} else { {{?}}
-{{??}}
- {{? $breakOnError }} if (true) { {{?}}
-{{?}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/_formatLimit.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/_formatLimit.jst
deleted file mode 100644
index af16b88d8..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/_formatLimit.jst
+++ /dev/null
@@ -1,116 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-
-var {{=$valid}} = undefined;
-
-{{## def.skipFormatLimit:
- {{=$valid}} = true;
- {{ return out; }}
-#}}
-
-{{## def.compareFormat:
- {{? $isData }}
- if ({{=$schemaValue}} === undefined) {{=$valid}} = true;
- else if (typeof {{=$schemaValue}} != 'string') {{=$valid}} = false;
- else {
- {{ $closingBraces += '}'; }}
- {{?}}
-
- {{? $isDataFormat }}
- if (!{{=$compare}}) {{=$valid}} = true;
- else {
- {{ $closingBraces += '}'; }}
- {{?}}
-
- var {{=$result}} = {{=$compare}}({{=$data}}, {{# def.schemaValueQS }});
-
- if ({{=$result}} === undefined) {{=$valid}} = false;
-#}}
-
-
-{{? it.opts.format === false }}{{# def.skipFormatLimit }}{{?}}
-
-{{
- var $schemaFormat = it.schema.format
- , $isDataFormat = it.opts.v5 && $schemaFormat.$data
- , $closingBraces = '';
-}}
-
-{{? $isDataFormat }}
- {{
- var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr)
- , $format = 'format' + $lvl
- , $compare = 'compare' + $lvl;
- }}
-
- var {{=$format}} = formats[{{=$schemaValueFormat}}]
- , {{=$compare}} = {{=$format}} && {{=$format}}.compare;
-{{??}}
- {{ var $format = it.formats[$schemaFormat]; }}
- {{? !($format && $format.compare) }}
- {{# def.skipFormatLimit }}
- {{?}}
- {{ var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare'; }}
-{{?}}
-
-{{
- var $isMax = $keyword == 'formatMaximum'
- , $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum')
- , $schemaExcl = it.schema[$exclusiveKeyword]
- , $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data
- , $op = $isMax ? '<' : '>'
- , $result = 'result' + $lvl;
-}}
-
-{{# def.$data }}
-
-
-{{? $isDataExcl }}
- {{
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
- , $exclusive = 'exclusive' + $lvl
- , $opExpr = 'op' + $lvl
- , $opStr = '\' + ' + $opExpr + ' + \'';
- }}
- var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
- {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
-
- if (typeof {{=$schemaValueExcl}} != 'boolean' && {{=$schemaValueExcl}} !== undefined) {
- {{=$valid}} = false;
- {{ var $errorKeyword = $exclusiveKeyword; }}
- {{# def.error:'_formatExclusiveLimit' }}
- }
-
- {{# def.elseIfValid }}
-
- {{# def.compareFormat }}
- var {{=$exclusive}} = {{=$schemaValueExcl}} === true;
-
- if ({{=$valid}} === undefined) {
- {{=$valid}} = {{=$exclusive}}
- ? {{=$result}} {{=$op}} 0
- : {{=$result}} {{=$op}}= 0;
- }
-
- if (!{{=$valid}}) var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
-{{??}}
- {{
- var $exclusive = $schemaExcl === true
- , $opStr = $op; /*used in error*/
- if (!$exclusive) $opStr += '=';
- var $opExpr = '\'' + $opStr + '\''; /*used in error*/
- }}
-
- {{# def.compareFormat }}
-
- if ({{=$valid}} === undefined)
- {{=$valid}} = {{=$result}} {{=$op}}{{?!$exclusive}}={{?}} 0;
-{{?}}
-
-{{= $closingBraces }}
-
-if (!{{=$valid}}) {
- {{ var $errorKeyword = $keyword; }}
- {{# def.error:'_formatLimit' }}
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/constant.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/constant.jst
deleted file mode 100644
index 67969c1b9..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/constant.jst
+++ /dev/null
@@ -1,10 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{? !$isData }}
- var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
-{{?}}
-var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
-{{# def.checkError:'constant' }}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/patternRequired.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/patternRequired.jst
deleted file mode 100644
index 9af2cdc9d..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/patternRequired.jst
+++ /dev/null
@@ -1,28 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-
-{{
- var $key = 'key' + $lvl
- , $matched = 'patternMatched' + $lvl
- , $closingBraces = ''
- , $ownProperties = it.opts.ownProperties;
-}}
-
-var {{=$valid}} = true;
-{{~ $schema:$pProperty }}
- var {{=$matched}} = false;
- for (var {{=$key}} in {{=$data}}) {
- {{# def.checkOwnProperty }}
- {{=$matched}} = {{= it.usePattern($pProperty) }}.test({{=$key}});
- if ({{=$matched}}) break;
- }
-
- {{ var $missingPattern = it.util.escapeQuotes($pProperty); }}
- if (!{{=$matched}}) {
- {{=$valid}} = false;
- {{# def.addError:'patternRequired' }}
- } {{# def.elseIfValid }}
-{{~}}
-
-{{= $closingBraces }}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/switch.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/switch.jst
deleted file mode 100644
index 389678e34..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/v5/switch.jst
+++ /dev/null
@@ -1,73 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-
-{{## def.validateIf:
- {{# def.setCompositeRule }}
- {{ $it.createErrors = false; }}
- {{# def._validateSwitchRule:if }}
- {{ $it.createErrors = true; }}
- {{# def.resetCompositeRule }}
- {{=$ifPassed}} = {{=$nextValid}};
-#}}
-
-{{## def.validateThen:
- {{? typeof $sch.then == 'boolean' }}
- {{? $sch.then === false }}
- {{# def.error:'switch' }}
- {{?}}
- var {{=$nextValid}} = {{= $sch.then }};
- {{??}}
- {{# def._validateSwitchRule:then }}
- {{?}}
-#}}
-
-{{## def._validateSwitchRule:_clause:
- {{
- $it.schema = $sch._clause;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + ']._clause';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/_clause';
- }}
- {{# def.insertSubschemaCode }}
-#}}
-
-{{## def.switchCase:
- {{? $sch.if && {{# def.nonEmptySchema:$sch.if }} }}
- var {{=$errs}} = errors;
- {{# def.validateIf }}
- if ({{=$ifPassed}}) {
- {{# def.validateThen }}
- } else {
- {{# def.resetErrors }}
- }
- {{??}}
- {{=$ifPassed}} = true;
- {{# def.validateThen }}
- {{?}}
-#}}
-
-
-{{
- var $ifPassed = 'ifPassed' + it.level
- , $currentBaseId = $it.baseId
- , $shouldContinue;
-}}
-var {{=$ifPassed}};
-
-{{~ $schema:$sch:$caseIndex }}
- {{? $caseIndex && !$shouldContinue }}
- if (!{{=$ifPassed}}) {
- {{ $closingBraces+= '}'; }}
- {{?}}
-
- {{# def.switchCase }}
- {{ $shouldContinue = $sch.continue }}
-{{~}}
-
-{{= $closingBraces }}
-
-var {{=$valid}} = {{=$nextValid}};
-
-{{# def.cleanUp }}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dot/validate.jst b/node_modules/node-gyp/node_modules/ajv/lib/dot/validate.jst
deleted file mode 100644
index 896e0860a..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dot/validate.jst
+++ /dev/null
@@ -1,210 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.defaults }}
-{{# def.coerce }}
-
-{{ /**
- * schema compilation (render) time:
- * it = { schema, RULES, _validate, opts }
- * it.validate - this template function,
- * it is used recursively to generate code for subschemas
- *
- * runtime:
- * "validate" is a variable name to which this function will be assigned
- * validateRef etc. are defined in the parent scope in index.js
- */ }}
-
-{{ var $async = it.schema.$async === true; }}
-
-{{? it.isTop}}
- {{
- var $top = it.isTop
- , $lvl = it.level = 0
- , $dataLvl = it.dataLevel = 0
- , $data = 'data';
- it.rootId = it.resolve.fullPath(it.root.schema.id);
- it.baseId = it.baseId || it.rootId;
- if ($async) {
- it.async = true;
- var $es7 = it.opts.async == 'es7';
- it.yieldAwait = $es7 ? 'await' : 'yield';
- }
- delete it.isTop;
-
- it.dataPathArr = [undefined];
- }}
-
- var validate =
- {{? $async }}
- {{? $es7 }}
- (async function
- {{??}}
- {{? it.opts.async == 'co*'}}co.wrap{{?}}(function*
- {{?}}
- {{??}}
- (function
- {{?}}
- (data, dataPath, parentData, parentDataProperty, rootData) {
- 'use strict';
- var vErrors = null; {{ /* don't edit, used in replace */ }}
- var errors = 0; {{ /* don't edit, used in replace */ }}
- if (rootData === undefined) rootData = data;
-{{??}}
- {{
- var $lvl = it.level
- , $dataLvl = it.dataLevel
- , $data = 'data' + ($dataLvl || '');
-
- if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);
-
- if ($async && !it.async) throw new Error('async schema in sync schema');
- }}
-
- var errs_{{=$lvl}} = errors;
-{{?}}
-
-{{
- var $valid = 'valid' + $lvl
- , $breakOnError = !it.opts.allErrors
- , $closingBraces1 = ''
- , $closingBraces2 = '';
-
- var $errorKeyword;
- var $typeSchema = it.schema.type
- , $typeIsArray = Array.isArray($typeSchema);
-}}
-
-{{## def.checkType:
- {{
- var $schemaPath = it.schemaPath + '.type'
- , $errSchemaPath = it.errSchemaPath + '/type'
- , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
- }}
-
- if ({{= it.util[$method]($typeSchema, $data, true) }}) {
-#}}
-
-{{? $typeSchema && it.opts.coerceTypes }}
- {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
- {{? $coerceToTypes }}
- {{# def.checkType }}
- {{# def.coerceType }}
- }
- {{?}}
-{{?}}
-
-{{ var $refKeywords; }}
-{{? it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref')) }}
- {{? it.opts.extendRefs == 'fail' }}
- {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"'); }}
- {{?? it.opts.extendRefs == 'ignore' }}
- {{
- $refKeywords = false;
- console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
- }}
- {{?? it.opts.extendRefs !== true }}
- {{ console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour'); }}
- {{?}}
-{{?}}
-
-{{? it.schema.$ref && !$refKeywords }}
- {{= it.RULES.all.$ref.code(it, '$ref') }}
- {{? $breakOnError }}
- }
- if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
- {{ $closingBraces2 += '}'; }}
- {{?}}
-{{??}}
- {{~ it.RULES:$rulesGroup }}
- {{? $shouldUseGroup($rulesGroup) }}
- {{? $rulesGroup.type }}
- if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) {
- {{?}}
- {{? it.opts.useDefaults && !it.compositeRule }}
- {{? $rulesGroup.type == 'object' && it.schema.properties }}
- {{# def.defaultProperties }}
- {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }}
- {{# def.defaultItems }}
- {{?}}
- {{?}}
- {{~ $rulesGroup.rules:$rule }}
- {{? $shouldUseRule($rule) }}
- {{= $rule.code(it, $rule.keyword) }}
- {{? $breakOnError }}
- {{ $closingBraces1 += '}'; }}
- {{?}}
- {{?}}
- {{~}}
- {{? $breakOnError }}
- {{= $closingBraces1 }}
- {{ $closingBraces1 = ''; }}
- {{?}}
- {{? $rulesGroup.type }}
- }
- {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }}
- {{ var $typeChecked = true; }}
- else {
- {{
- var $schemaPath = it.schemaPath + '.type'
- , $errSchemaPath = it.errSchemaPath + '/type';
- }}
- {{# def.error:'type' }}
- }
- {{?}}
- {{?}}
-
- {{? $breakOnError }}
- if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
- {{ $closingBraces2 += '}'; }}
- {{?}}
- {{?}}
- {{~}}
-{{?}}
-
-{{? $typeSchema && !$typeChecked && !$coerceToTypes }}
- {{# def.checkType }}
- {{# def.error:'type' }}
- }
-{{?}}
-
-{{? $breakOnError }} {{= $closingBraces2 }} {{?}}
-
-{{? $top }}
- {{? $async }}
- if (errors === 0) return true; {{ /* don't edit, used in replace */ }}
- else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }}
- {{??}}
- validate.errors = vErrors; {{ /* don't edit, used in replace */ }}
- return errors === 0; {{ /* don't edit, used in replace */ }}
- {{?}}
- });
-
- return validate;
-{{??}}
- var {{=$valid}} = errors === errs_{{=$lvl}};
-{{?}}
-
-{{# def.cleanUp }}
-
-{{? $top && $breakOnError }}
- {{# def.cleanUpVarErrors }}
-{{?}}
-
-{{
- function $shouldUseGroup($rulesGroup) {
- for (var i=0; i < $rulesGroup.rules.length; i++)
- if ($shouldUseRule($rulesGroup.rules[i]))
- return true;
- }
-
- function $shouldUseRule($rule) {
- return it.schema[$rule.keyword] !== undefined ||
- ( $rule.keyword == 'properties' &&
- ( it.schema.additionalProperties === false ||
- typeof it.schema.additionalProperties == 'object'
- || ( it.schema.patternProperties &&
- Object.keys(it.schema.patternProperties).length )
- || ( it.opts.v5 && it.schema.patternGroups &&
- Object.keys(it.schema.patternGroups).length )));
- }
-}}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/README.md b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/README.md
deleted file mode 100644
index 4d994846c..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-These files are compiled dot templates from dot folder.
-
-Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder.
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_formatLimit.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_formatLimit.js
deleted file mode 100644
index 996e1f2c2..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_formatLimit.js
+++ /dev/null
@@ -1,176 +0,0 @@
-'use strict';
-module.exports = function generate__formatLimit(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- out += 'var ' + ($valid) + ' = undefined;';
- if (it.opts.format === false) {
- out += ' ' + ($valid) + ' = true; ';
- return out;
- }
- var $schemaFormat = it.schema.format,
- $isDataFormat = it.opts.v5 && $schemaFormat.$data,
- $closingBraces = '';
- if ($isDataFormat) {
- var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr),
- $format = 'format' + $lvl,
- $compare = 'compare' + $lvl;
- out += ' var ' + ($format) + ' = formats[' + ($schemaValueFormat) + '] , ' + ($compare) + ' = ' + ($format) + ' && ' + ($format) + '.compare;';
- } else {
- var $format = it.formats[$schemaFormat];
- if (!($format && $format.compare)) {
- out += ' ' + ($valid) + ' = true; ';
- return out;
- }
- var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare';
- }
- var $isMax = $keyword == 'formatMaximum',
- $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum'),
- $schemaExcl = it.schema[$exclusiveKeyword],
- $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
- $op = $isMax ? '<' : '>',
- $result = 'result' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- if ($isDataExcl) {
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
- $exclusive = 'exclusive' + $lvl,
- $opExpr = 'op' + $lvl,
- $opStr = '\' + ' + $opExpr + ' + \'';
- out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
- $schemaValueExcl = 'schemaExcl' + $lvl;
- out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';
- var $errorKeyword = $exclusiveKeyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- if ($isData) {
- out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
- $closingBraces += '}';
- }
- if ($isDataFormat) {
- out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
- $closingBraces += '}';
- }
- out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
- } else {
- var $exclusive = $schemaExcl === true,
- $opStr = $op;
- if (!$exclusive) $opStr += '=';
- var $opExpr = '\'' + $opStr + '\'';
- if ($isData) {
- out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
- $closingBraces += '}';
- }
- if ($isDataFormat) {
- out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
- $closingBraces += '}';
- }
- out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);
- if (!$exclusive) {
- out += '=';
- }
- out += ' 0;';
- }
- out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , exclusive: ' + ($exclusive) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ' + ($opStr) + ' "';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + (it.util.escapeQuotes($schema));
- }
- out += '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '}';
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limit.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limit.js
deleted file mode 100644
index 4d92024af..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limit.js
+++ /dev/null
@@ -1,124 +0,0 @@
-'use strict';
-module.exports = function generate__limit(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $isMax = $keyword == 'maximum',
- $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
- $schemaExcl = it.schema[$exclusiveKeyword],
- $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
- $op = $isMax ? '<' : '>',
- $notOp = $isMax ? '>' : '<';
- if ($isDataExcl) {
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
- $exclusive = 'exclusive' + $lvl,
- $opExpr = 'op' + $lvl,
- $opStr = '\' + ' + $opExpr + ' + \'';
- out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
- $schemaValueExcl = 'schemaExcl' + $lvl;
- out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { ';
- var $errorKeyword = $exclusiveKeyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else if( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
- } else {
- var $exclusive = $schemaExcl === true,
- $opStr = $op;
- if (!$exclusive) $opStr += '=';
- var $opExpr = '\'' + $opStr + '\'';
- out += ' if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ' + ($data) + ' ' + ($notOp);
- if ($exclusive) {
- out += '=';
- }
- out += ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') {';
- }
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ' + ($opStr) + ' ';
- if ($isData) {
- out += '\' + ' + ($schemaValue);
- } else {
- out += '' + ($schema) + '\'';
- }
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitItems.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitItems.js
deleted file mode 100644
index 6a843627b..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitItems.js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-module.exports = function generate__limitItems(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $op = $keyword == 'maxItems' ? '>' : '<';
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ';
- if ($keyword == 'maxItems') {
- out += 'more';
- } else {
- out += 'less';
- }
- out += ' than ';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + ($schema);
- }
- out += ' items\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitLength.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitLength.js
deleted file mode 100644
index e378104df..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitLength.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict';
-module.exports = function generate__limitLength(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $op = $keyword == 'maxLength' ? '>' : '<';
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- if (it.opts.unicode === false) {
- out += ' ' + ($data) + '.length ';
- } else {
- out += ' ucs2length(' + ($data) + ') ';
- }
- out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT be ';
- if ($keyword == 'maxLength') {
- out += 'longer';
- } else {
- out += 'shorter';
- }
- out += ' than ';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + ($schema);
- }
- out += ' characters\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitProperties.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitProperties.js
deleted file mode 100644
index 74c085184..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/_limitProperties.js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-module.exports = function generate__limitProperties(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $op = $keyword == 'maxProperties' ? '>' : '<';
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
- var $errorKeyword = $keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ';
- if ($keyword == 'maxProperties') {
- out += 'more';
- } else {
- out += 'less';
- }
- out += ' than ';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + ($schema);
- }
- out += ' properties\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/allOf.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/allOf.js
deleted file mode 100644
index 0063ecf1a..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/allOf.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-module.exports = function generate_allOf(it, $keyword) {
- var out = ' ';
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $currentBaseId = $it.baseId,
- $allSchemasEmpty = true;
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $allSchemasEmpty = false;
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- if ($breakOnError) {
- if ($allSchemasEmpty) {
- out += ' if (true) { ';
- } else {
- out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
- }
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/anyOf.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/anyOf.js
deleted file mode 100644
index c95f8ff9a..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/anyOf.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict';
-module.exports = function generate_anyOf(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $noEmptySchema = $schema.every(function($sch) {
- return it.util.schemaHasRules($sch, it.RULES.all);
- });
- if ($noEmptySchema) {
- var $currentBaseId = $it.baseId;
- out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
- $closingBraces += '}';
- }
- }
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match some schema in anyOf\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
- if (it.opts.allErrors) {
- out += ' } ';
- }
- out = it.util.cleanUpCode(out);
- } else {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/constant.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/constant.js
deleted file mode 100644
index 2a3e147ff..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/constant.js
+++ /dev/null
@@ -1,52 +0,0 @@
-'use strict';
-module.exports = function generate_constant(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- if (!$isData) {
- out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
- }
- out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be equal to constant\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' }';
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/custom.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/custom.js
deleted file mode 100644
index cbd481ccf..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/custom.js
+++ /dev/null
@@ -1,220 +0,0 @@
-'use strict';
-module.exports = function generate_custom(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $rule = this,
- $definition = 'definition' + $lvl,
- $rDef = $rule.definition;
- var $compile, $inline, $macro, $ruleValidate, $validateCode;
- if ($isData && $rDef.$data) {
- $validateCode = 'keywordValidate' + $lvl;
- var $validateSchema = $rDef.validateSchema;
- out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
- } else {
- $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
- $schemaValue = 'validate.schema' + $schemaPath;
- $validateCode = $ruleValidate.code;
- $compile = $rDef.compile;
- $inline = $rDef.inline;
- $macro = $rDef.macro;
- }
- var $ruleErrs = $validateCode + '.errors',
- $i = 'i' + $lvl,
- $ruleErr = 'ruleErr' + $lvl,
- $asyncKeyword = $rDef.async;
- if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
- if (!($inline || $macro)) {
- out += '' + ($ruleErrs) + ' = null;';
- }
- out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if ($validateSchema) {
- out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') {';
- }
- if ($inline) {
- if ($rDef.statements) {
- out += ' ' + ($ruleValidate.validate) + ' ';
- } else {
- out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';
- }
- } else if ($macro) {
- var $it = it.util.copy(it);
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- $it.schema = $ruleValidate.validate;
- $it.schemaPath = '';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($code);
- } else {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = '';
- out += ' ' + ($validateCode) + '.call( ';
- if (it.opts.passContext) {
- out += 'this';
- } else {
- out += 'self';
- }
- if ($compile || $rDef.schema === false) {
- out += ' , ' + ($data) + ' ';
- } else {
- out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
- }
- out += ' , (dataPath || \'\')';
- if (it.errorPath != '""') {
- out += ' + ' + (it.errorPath);
- }
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';
- var def_callRuleValidate = out;
- out = $$outStack.pop();
- if ($rDef.errors === false) {
- out += ' ' + ($valid) + ' = ';
- if ($asyncKeyword) {
- out += '' + (it.yieldAwait);
- }
- out += '' + (def_callRuleValidate) + '; ';
- } else {
- if ($asyncKeyword) {
- $ruleErrs = 'customErrors' + $lvl;
- out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
- } else {
- out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';
- }
- }
- }
- if ($rDef.modifying) {
- out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
- }
- if ($validateSchema) {
- out += ' }';
- }
- if ($rDef.valid) {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- } else {
- out += ' if ( ';
- if ($rDef.valid === undefined) {
- out += ' !';
- if ($macro) {
- out += '' + ($nextValid);
- } else {
- out += '' + ($valid);
- }
- } else {
- out += ' ' + (!$rDef.valid) + ' ';
- }
- out += ') { ';
- $errorKeyword = $rule.keyword;
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = '';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- var def_customError = out;
- out = $$outStack.pop();
- if ($inline) {
- if ($rDef.errors) {
- if ($rDef.errors != 'full') {
- out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
- if (it.opts.verbose) {
- out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
- }
- out += ' } ';
- }
- } else {
- if ($rDef.errors === false) {
- out += ' ' + (def_customError) + ' ';
- } else {
- out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
- if (it.opts.verbose) {
- out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
- }
- out += ' } } ';
- }
- }
- } else if ($macro) {
- out += ' var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError(vErrors); ';
- } else {
- out += ' validate.errors = vErrors; return false; ';
- }
- }
- } else {
- if ($rDef.errors === false) {
- out += ' ' + (def_customError) + ' ';
- } else {
- out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
- if (it.opts.verbose) {
- out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
- }
- out += ' } } else { ' + (def_customError) + ' } ';
- }
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/dependencies.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/dependencies.js
deleted file mode 100644
index 9ba4c5437..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/dependencies.js
+++ /dev/null
@@ -1,147 +0,0 @@
-'use strict';
-module.exports = function generate_dependencies(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $schemaDeps = {},
- $propertyDeps = {};
- for ($property in $schema) {
- var $sch = $schema[$property];
- var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
- $deps[$property] = $sch;
- }
- out += 'var ' + ($errs) + ' = errors;';
- var $currentErrorPath = it.errorPath;
- out += 'var missing' + ($lvl) + ';';
- for (var $property in $propertyDeps) {
- $deps = $propertyDeps[$property];
- out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
- if ($breakOnError) {
- out += ' && ( ';
- var arr1 = $deps;
- if (arr1) {
- var _$property, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- _$property = arr1[$i += 1];
- if ($i) {
- out += ' || ';
- }
- var $prop = it.util.getProperty(_$property);
- out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
- }
- }
- out += ')) { ';
- var $propertyPath = 'missing' + $lvl,
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should have ';
- if ($deps.length == 1) {
- out += 'property ' + (it.util.escapeQuotes($deps[0]));
- } else {
- out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
- }
- out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- } else {
- out += ' ) { ';
- var arr2 = $deps;
- if (arr2) {
- var $reqProperty, i2 = -1,
- l2 = arr2.length - 1;
- while (i2 < l2) {
- $reqProperty = arr2[i2 += 1];
- var $prop = it.util.getProperty($reqProperty),
- $missingProperty = it.util.escapeQuotes($reqProperty);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
- }
- out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should have ';
- if ($deps.length == 1) {
- out += 'property ' + (it.util.escapeQuotes($deps[0]));
- } else {
- out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
- }
- out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
- }
- }
- }
- out += ' } ';
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- }
- it.errorPath = $currentErrorPath;
- var $currentBaseId = $it.baseId;
- for (var $property in $schemaDeps) {
- var $sch = $schemaDeps[$property];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- out += ' ' + ($nextValid) + ' = true; if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined) { ';
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + it.util.getProperty($property);
- $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/enum.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/enum.js
deleted file mode 100644
index ccbf0d831..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/enum.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict';
-module.exports = function generate_enum(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $i = 'i' + $lvl,
- $vSchema = 'schema' + $lvl;
- if (!$isData) {
- out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
- }
- out += 'var ' + ($valid) + ';';
- if ($isData) {
- out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
- }
- out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
- if ($isData) {
- out += ' } ';
- }
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be equal to one of the allowed values\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' }';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/format.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/format.js
deleted file mode 100644
index 09872c2c4..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/format.js
+++ /dev/null
@@ -1,138 +0,0 @@
-'use strict';
-module.exports = function generate_format(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- if (it.opts.format === false) {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- return out;
- }
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $unknownFormats = it.opts.unknownFormats,
- $allowUnknown = Array.isArray($unknownFormats);
- if ($isData) {
- var $format = 'format' + $lvl;
- out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { ';
- if (it.async) {
- out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
- }
- out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
- }
- out += ' (';
- if ($unknownFormats === true || $allowUnknown) {
- out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
- if ($allowUnknown) {
- out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
- }
- out += ') || ';
- }
- out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? ';
- if (it.async) {
- out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
- } else {
- out += ' ' + ($format) + '(' + ($data) + ') ';
- }
- out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
- } else {
- var $format = it.formats[$schema];
- if (!$format) {
- if ($unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1)) {
- throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
- } else {
- if (!$allowUnknown) {
- console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
- if ($unknownFormats !== 'ignore') console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
- }
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- return out;
- }
- }
- var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
- if ($isObject) {
- var $async = $format.async === true;
- $format = $format.validate;
- }
- if ($async) {
- if (!it.async) throw new Error('async format in sync schema');
- var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
- out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
- } else {
- out += ' if (! ';
- var $formatRef = 'formats' + it.util.getProperty($schema);
- if ($isObject) $formatRef += '.validate';
- if (typeof $format == 'function') {
- out += ' ' + ($formatRef) + '(' + ($data) + ') ';
- } else {
- out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
- }
- out += ') { ';
- }
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match format "';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + (it.util.escapeQuotes($schema));
- }
- out += '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/items.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/items.js
deleted file mode 100644
index b7431b72d..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/items.js
+++ /dev/null
@@ -1,144 +0,0 @@
-'use strict';
-module.exports = function generate_items(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $idx = 'i' + $lvl,
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $currentBaseId = it.baseId;
- out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if (Array.isArray($schema)) {
- var $additionalItems = it.schema.additionalItems;
- if ($additionalItems === false) {
- out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
- var $currErrSchemaPath = $errSchemaPath;
- $errSchemaPath = it.errSchemaPath + '/additionalItems';
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- $errSchemaPath = $currErrSchemaPath;
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- }
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
- var $passData = $data + '[' + $i + ']';
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
- $it.dataPathArr[$dataNxt] = $i;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
- $it.schema = $additionalItems;
- $it.schemaPath = it.schemaPath + '.additionalItems';
- $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
- out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- } else if (it.util.schemaHasRules($schema, it.RULES.all)) {
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/multipleOf.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/multipleOf.js
deleted file mode 100644
index d0e43daa3..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/multipleOf.js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-module.exports = function generate_multipleOf(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- out += 'var division' + ($lvl) + ';if (';
- if ($isData) {
- out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
- }
- out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
- if (it.opts.multipleOfPrecision) {
- out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
- } else {
- out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
- }
- out += ' ) ';
- if ($isData) {
- out += ' ) ';
- }
- out += ' ) { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be multiple of ';
- if ($isData) {
- out += '\' + ' + ($schemaValue);
- } else {
- out += '' + ($schema) + '\'';
- }
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/not.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/not.js
deleted file mode 100644
index 2cb2a4765..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/not.js
+++ /dev/null
@@ -1,83 +0,0 @@
-'use strict';
-module.exports = function generate_not(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- if (it.util.schemaHasRules($schema, it.RULES.all)) {
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- out += ' var ' + ($errs) + ' = errors; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.createErrors = false;
- var $allErrorsOption;
- if ($it.opts.allErrors) {
- $allErrorsOption = $it.opts.allErrors;
- $it.opts.allErrors = false;
- }
- out += ' ' + (it.validate($it)) + ' ';
- $it.createErrors = true;
- if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' if (' + ($nextValid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT be valid\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
- if (it.opts.allErrors) {
- out += ' } ';
- }
- } else {
- out += ' var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT be valid\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- if ($breakOnError) {
- out += ' if (false) { ';
- }
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/oneOf.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/oneOf.js
deleted file mode 100644
index 39f60e620..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/oneOf.js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-module.exports = function generate_oneOf(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;';
- var $currentBaseId = $it.baseId;
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- var arr1 = $schema;
- if (arr1) {
- var $sch, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $sch = arr1[$i += 1];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + '[' + $i + ']';
- $it.errSchemaPath = $errSchemaPath + '/' + $i;
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- } else {
- out += ' var ' + ($nextValid) + ' = true; ';
- }
- if ($i) {
- out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';
- $closingBraces += '}';
- }
- out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';
- }
- }
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match exactly one schema in oneOf\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
- if (it.opts.allErrors) {
- out += ' } ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/pattern.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/pattern.js
deleted file mode 100644
index 5518152a8..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/pattern.js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-module.exports = function generate_pattern(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
- out += 'if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
- }
- out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
- if ($isData) {
- out += '' + ($schemaValue);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should match pattern "';
- if ($isData) {
- out += '\' + ' + ($schemaValue) + ' + \'';
- } else {
- out += '' + (it.util.escapeQuotes($schema));
- }
- out += '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + (it.util.toQuotedString($schema));
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += '} ';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/patternRequired.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/patternRequired.js
deleted file mode 100644
index 07bf31d29..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/patternRequired.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-module.exports = function generate_patternRequired(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $key = 'key' + $lvl,
- $matched = 'patternMatched' + $lvl,
- $closingBraces = '',
- $ownProperties = it.opts.ownProperties;
- out += 'var ' + ($valid) + ' = true;';
- var arr1 = $schema;
- if (arr1) {
- var $pProperty, i1 = -1,
- l1 = arr1.length - 1;
- while (i1 < l1) {
- $pProperty = arr1[i1 += 1];
- out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';
- var $missingPattern = it.util.escapeQuotes($pProperty);
- out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
- if ($breakOnError) {
- $closingBraces += '}';
- out += ' else { ';
- }
- }
- }
- out += '' + ($closingBraces);
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/properties.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/properties.js
deleted file mode 100644
index 32eafce6a..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/properties.js
+++ /dev/null
@@ -1,445 +0,0 @@
-'use strict';
-module.exports = function generate_properties(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $key = 'key' + $lvl,
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt;
- var $schemaKeys = Object.keys($schema || {}),
- $pProperties = it.schema.patternProperties || {},
- $pPropertyKeys = Object.keys($pProperties),
- $aProperties = it.schema.additionalProperties,
- $someProperties = $schemaKeys.length || $pPropertyKeys.length,
- $noAdditional = $aProperties === false,
- $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
- $removeAdditional = it.opts.removeAdditional,
- $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
- $ownProperties = it.opts.ownProperties,
- $currentBaseId = it.baseId;
- var $required = it.schema.required;
- if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);
- if (it.opts.v5) {
- var $pgProperties = it.schema.patternGroups || {},
- $pgPropertyKeys = Object.keys($pgProperties);
- }
- out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
- if ($checkAdditional) {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- if ($someProperties) {
- out += ' var isAdditional' + ($lvl) + ' = !(false ';
- if ($schemaKeys.length) {
- if ($schemaKeys.length > 5) {
- out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] ';
- } else {
- var arr1 = $schemaKeys;
- if (arr1) {
- var $propertyKey, i1 = -1,
- l1 = arr1.length - 1;
- while (i1 < l1) {
- $propertyKey = arr1[i1 += 1];
- out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
- }
- }
- }
- }
- if ($pPropertyKeys.length) {
- var arr2 = $pPropertyKeys;
- if (arr2) {
- var $pProperty, $i = -1,
- l2 = arr2.length - 1;
- while ($i < l2) {
- $pProperty = arr2[$i += 1];
- out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
- }
- }
- }
- if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {
- var arr3 = $pgPropertyKeys;
- if (arr3) {
- var $pgProperty, $i = -1,
- l3 = arr3.length - 1;
- while ($i < l3) {
- $pgProperty = arr3[$i += 1];
- out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') ';
- }
- }
- }
- out += ' ); if (isAdditional' + ($lvl) + ') { ';
- }
- if ($removeAdditional == 'all') {
- out += ' delete ' + ($data) + '[' + ($key) + ']; ';
- } else {
- var $currentErrorPath = it.errorPath;
- var $additionalProperty = '\' + ' + $key + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- }
- if ($noAdditional) {
- if ($removeAdditional) {
- out += ' delete ' + ($data) + '[' + ($key) + ']; ';
- } else {
- out += ' ' + ($nextValid) + ' = false; ';
- var $currErrSchemaPath = $errSchemaPath;
- $errSchemaPath = it.errSchemaPath + '/additionalProperties';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have additional properties\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- $errSchemaPath = $currErrSchemaPath;
- if ($breakOnError) {
- out += ' break; ';
- }
- }
- } else if ($additionalIsSchema) {
- if ($removeAdditional == 'failing') {
- out += ' var ' + ($errs) + ' = errors; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.schema = $aProperties;
- $it.schemaPath = it.schemaPath + '.additionalProperties';
- $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
- $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
- it.compositeRule = $it.compositeRule = $wasComposite;
- } else {
- $it.schema = $aProperties;
- $it.schemaPath = it.schemaPath + '.additionalProperties';
- $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
- $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- }
- }
- it.errorPath = $currentErrorPath;
- }
- if ($someProperties) {
- out += ' } ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- var $useDefaults = it.opts.useDefaults && !it.compositeRule;
- if ($schemaKeys.length) {
- var arr4 = $schemaKeys;
- if (arr4) {
- var $propertyKey, i4 = -1,
- l4 = arr4.length - 1;
- while (i4 < l4) {
- $propertyKey = arr4[i4 += 1];
- var $sch = $schema[$propertyKey];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- var $prop = it.util.getProperty($propertyKey),
- $passData = $data + $prop,
- $hasDefault = $useDefaults && $sch.default !== undefined;
- $it.schema = $sch;
- $it.schemaPath = $schemaPath + $prop;
- $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
- $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
- $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- $code = it.util.varReplace($code, $nextData, $passData);
- var $useData = $passData;
- } else {
- var $useData = $nextData;
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
- }
- if ($hasDefault) {
- out += ' ' + ($code) + ' ';
- } else {
- if ($requiredHash && $requiredHash[$propertyKey]) {
- out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = false; ';
- var $currentErrorPath = it.errorPath,
- $currErrSchemaPath = $errSchemaPath,
- $missingProperty = it.util.escapeQuotes($propertyKey);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
- }
- $errSchemaPath = it.errSchemaPath + '/required';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- $errSchemaPath = $currErrSchemaPath;
- it.errorPath = $currentErrorPath;
- out += ' } else { ';
- } else {
- if ($breakOnError) {
- out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = true; } else { ';
- } else {
- out += ' if (' + ($useData) + ' !== undefined) { ';
- }
- }
- out += ' ' + ($code) + ' } ';
- }
- }
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- var arr5 = $pPropertyKeys;
- if (arr5) {
- var $pProperty, i5 = -1,
- l5 = arr5.length - 1;
- while (i5 < l5) {
- $pProperty = arr5[i5 += 1];
- var $sch = $pProperties[$pProperty];
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $it.schema = $sch;
- $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
- $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else ' + ($nextValid) + ' = true; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- if (it.opts.v5) {
- var arr6 = $pgPropertyKeys;
- if (arr6) {
- var $pgProperty, i6 = -1,
- l6 = arr6.length - 1;
- while (i6 < l6) {
- $pgProperty = arr6[i6 += 1];
- var $pgSchema = $pgProperties[$pgProperty],
- $sch = $pgSchema.schema;
- if (it.util.schemaHasRules($sch, it.RULES.all)) {
- $it.schema = $sch;
- $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
- $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';
- out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { ';
- if ($ownProperties) {
- out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
- }
- out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- var $code = it.validate($it);
- $it.baseId = $currentBaseId;
- if (it.util.varOccurences($code, $nextData) < 2) {
- out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
- } else {
- out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
- }
- if ($breakOnError) {
- out += ' if (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else ' + ($nextValid) + ' = true; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- var $pgMin = $pgSchema.minimum,
- $pgMax = $pgSchema.maximum;
- if ($pgMin !== undefined || $pgMax !== undefined) {
- out += ' var ' + ($valid) + ' = true; ';
- var $currErrSchemaPath = $errSchemaPath;
- if ($pgMin !== undefined) {
- var $limit = $pgMin,
- $reason = 'minimum',
- $moreOrLess = 'less';
- out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';
- $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($pgMax !== undefined) {
- out += ' else ';
- }
- }
- if ($pgMax !== undefined) {
- var $limit = $pgMax,
- $reason = 'maximum',
- $moreOrLess = 'more';
- out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';
- $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- }
- $errSchemaPath = $currErrSchemaPath;
- if ($breakOnError) {
- out += ' if (' + ($valid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/ref.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/ref.js
deleted file mode 100644
index e07c70c3b..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/ref.js
+++ /dev/null
@@ -1,119 +0,0 @@
-'use strict';
-module.exports = function generate_ref(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $async, $refCode;
- if ($schema == '#' || $schema == '#/') {
- if (it.isRoot) {
- $async = it.async;
- $refCode = 'validate';
- } else {
- $async = it.root.schema.$async === true;
- $refCode = 'root.refVal[0]';
- }
- } else {
- var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
- if ($refVal === undefined) {
- var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId;
- if (it.opts.missingRefs == 'fail') {
- console.log($message);
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- if ($breakOnError) {
- out += ' if (false) { ';
- }
- } else if (it.opts.missingRefs == 'ignore') {
- console.log($message);
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- } else {
- var $error = new Error($message);
- $error.missingRef = it.resolve.url(it.baseId, $schema);
- $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));
- throw $error;
- }
- } else if ($refVal.inline) {
- var $it = it.util.copy(it);
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- $it.schema = $refVal.schema;
- $it.schemaPath = '';
- $it.errSchemaPath = $schema;
- var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
- out += ' ' + ($code) + ' ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- }
- } else {
- $async = $refVal.$async === true;
- $refCode = $refVal.code;
- }
- }
- if ($refCode) {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = '';
- if (it.opts.passContext) {
- out += ' ' + ($refCode) + '.call(this, ';
- } else {
- out += ' ' + ($refCode) + '( ';
- }
- out += ' ' + ($data) + ', (dataPath || \'\')';
- if (it.errorPath != '""') {
- out += ' + ' + (it.errorPath);
- }
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
- var __callValidate = out;
- out = $$outStack.pop();
- if ($async) {
- if (!it.async) throw new Error('async schema referenced by sync schema');
- out += ' try { ';
- if ($breakOnError) {
- out += 'var ' + ($valid) + ' =';
- }
- out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';
- if ($breakOnError) {
- out += ' if (' + ($valid) + ') { ';
- }
- } else {
- out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- }
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/required.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/required.js
deleted file mode 100644
index eb32aeae5..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/required.js
+++ /dev/null
@@ -1,249 +0,0 @@
-'use strict';
-module.exports = function generate_required(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- var $vSchema = 'schema' + $lvl;
- if (!$isData) {
- if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
- var $required = [];
- var arr1 = $schema;
- if (arr1) {
- var $property, i1 = -1,
- l1 = arr1.length - 1;
- while (i1 < l1) {
- $property = arr1[i1 += 1];
- var $propertySch = it.schema.properties[$property];
- if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
- $required[$required.length] = $property;
- }
- }
- }
- } else {
- var $required = $schema;
- }
- }
- if ($isData || $required.length) {
- var $currentErrorPath = it.errorPath,
- $loopRequired = $isData || $required.length >= it.opts.loopRequired;
- if ($breakOnError) {
- out += ' var missing' + ($lvl) + '; ';
- if ($loopRequired) {
- if (!$isData) {
- out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
- }
- var $i = 'i' + $lvl,
- $propertyPath = 'schema' + $lvl + '[' + $i + ']',
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
- }
- out += ' var ' + ($valid) + ' = true; ';
- if ($isData) {
- out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
- }
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';
- if ($isData) {
- out += ' } ';
- }
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { ';
- } else {
- out += ' if ( ';
- var arr2 = $required;
- if (arr2) {
- var _$property, $i = -1,
- l2 = arr2.length - 1;
- while ($i < l2) {
- _$property = arr2[$i += 1];
- if ($i) {
- out += ' || ';
- }
- var $prop = it.util.getProperty(_$property);
- out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
- }
- }
- out += ') { ';
- var $propertyPath = 'missing' + $lvl,
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { ';
- }
- } else {
- if ($loopRequired) {
- if (!$isData) {
- out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
- }
- var $i = 'i' + $lvl,
- $propertyPath = 'schema' + $lvl + '[' + $i + ']',
- $missingProperty = '\' + ' + $propertyPath + ' + \'';
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
- }
- if ($isData) {
- out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
- }
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
- if ($isData) {
- out += ' } ';
- }
- } else {
- var arr3 = $required;
- if (arr3) {
- var $reqProperty, i3 = -1,
- l3 = arr3.length - 1;
- while (i3 < l3) {
- $reqProperty = arr3[i3 += 1];
- var $prop = it.util.getProperty($reqProperty),
- $missingProperty = it.util.escapeQuotes($reqProperty);
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
- }
- out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'';
- if (it.opts._errorDataPathProperty) {
- out += 'is a required property';
- } else {
- out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
- }
- }
- }
- }
- it.errorPath = $currentErrorPath;
- } else if ($breakOnError) {
- out += ' if (true) {';
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/switch.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/switch.js
deleted file mode 100644
index 18f17e487..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/switch.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-module.exports = function generate_switch(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $ifPassed = 'ifPassed' + it.level,
- $currentBaseId = $it.baseId,
- $shouldContinue;
- out += 'var ' + ($ifPassed) + ';';
- var arr1 = $schema;
- if (arr1) {
- var $sch, $caseIndex = -1,
- l1 = arr1.length - 1;
- while ($caseIndex < l1) {
- $sch = arr1[$caseIndex += 1];
- if ($caseIndex && !$shouldContinue) {
- out += ' if (!' + ($ifPassed) + ') { ';
- $closingBraces += '}';
- }
- if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {
- out += ' var ' + ($errs) + ' = errors; ';
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.createErrors = false;
- $it.schema = $sch.if;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- $it.createErrors = true;
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($ifPassed) + ' = ' + ($nextValid) + '; if (' + ($ifPassed) + ') { ';
- if (typeof $sch.then == 'boolean') {
- if ($sch.then === false) {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "switch" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- }
- out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; ';
- } else {
- $it.schema = $sch.then;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- }
- out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';
- } else {
- out += ' ' + ($ifPassed) + ' = true; ';
- if (typeof $sch.then == 'boolean') {
- if ($sch.then === false) {
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should pass "switch" keyword validation\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- }
- out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; ';
- } else {
- $it.schema = $sch.then;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
- out += ' ' + (it.validate($it)) + ' ';
- $it.baseId = $currentBaseId;
- }
- }
- $shouldContinue = $sch.continue
- }
- }
- out += '' + ($closingBraces) + 'var ' + ($valid) + ' = ' + ($nextValid) + '; ';
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/uniqueItems.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/uniqueItems.js
deleted file mode 100644
index 2f27b0eea..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/uniqueItems.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict';
-module.exports = function generate_uniqueItems(it, $keyword) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $isData = it.opts.v5 && $schema && $schema.$data,
- $schemaValue;
- if ($isData) {
- out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
- $schemaValue = 'schema' + $lvl;
- } else {
- $schemaValue = $schema;
- }
- if (($schema || $isData) && it.opts.uniqueItems !== false) {
- if ($isData) {
- out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
- }
- out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';
- if ($isData) {
- out += ' } ';
- }
- out += ' if (!' + ($valid) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: ';
- if ($isData) {
- out += 'validate.schema' + ($schemaPath);
- } else {
- out += '' + ($schema);
- }
- out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else { ';
- }
- } else {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/validate.js b/node_modules/node-gyp/node_modules/ajv/lib/dotjs/validate.js
deleted file mode 100644
index 0c4112e1d..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/dotjs/validate.js
+++ /dev/null
@@ -1,375 +0,0 @@
-'use strict';
-module.exports = function generate_validate(it, $keyword) {
- var out = '';
- var $async = it.schema.$async === true;
- if (it.isTop) {
- var $top = it.isTop,
- $lvl = it.level = 0,
- $dataLvl = it.dataLevel = 0,
- $data = 'data';
- it.rootId = it.resolve.fullPath(it.root.schema.id);
- it.baseId = it.baseId || it.rootId;
- if ($async) {
- it.async = true;
- var $es7 = it.opts.async == 'es7';
- it.yieldAwait = $es7 ? 'await' : 'yield';
- }
- delete it.isTop;
- it.dataPathArr = [undefined];
- out += ' var validate = ';
- if ($async) {
- if ($es7) {
- out += ' (async function ';
- } else {
- if (it.opts.async == 'co*') {
- out += 'co.wrap';
- }
- out += '(function* ';
- }
- } else {
- out += ' (function ';
- }
- out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; var vErrors = null; ';
- out += ' var errors = 0; ';
- out += ' if (rootData === undefined) rootData = data;';
- } else {
- var $lvl = it.level,
- $dataLvl = it.dataLevel,
- $data = 'data' + ($dataLvl || '');
- if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);
- if ($async && !it.async) throw new Error('async schema in sync schema');
- out += ' var errs_' + ($lvl) + ' = errors;';
- }
- var $valid = 'valid' + $lvl,
- $breakOnError = !it.opts.allErrors,
- $closingBraces1 = '',
- $closingBraces2 = '';
- var $typeSchema = it.schema.type,
- $typeIsArray = Array.isArray($typeSchema);
- if ($typeSchema && it.opts.coerceTypes) {
- var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
- if ($coerceToTypes) {
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type',
- $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
- out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
- var $dataType = 'dataType' + $lvl,
- $coerced = 'coerced' + $lvl;
- out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';
- if (it.opts.coerceTypes == 'array') {
- out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; ';
- }
- out += ' var ' + ($coerced) + ' = undefined; ';
- var $bracesCoercion = '';
- var arr1 = $coerceToTypes;
- if (arr1) {
- var $type, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $type = arr1[$i += 1];
- if ($i) {
- out += ' if (' + ($coerced) + ' === undefined) { ';
- $bracesCoercion += '}';
- }
- if (it.opts.coerceTypes == 'array' && $type != 'array') {
- out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
- }
- if ($type == 'string') {
- out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
- } else if ($type == 'number' || $type == 'integer') {
- out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
- if ($type == 'integer') {
- out += ' && !(' + ($data) + ' % 1)';
- }
- out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
- } else if ($type == 'boolean') {
- out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
- } else if ($type == 'null') {
- out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
- } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
- out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
- }
- }
- }
- out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { ';
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
- if (!$dataLvl) {
- out += 'if (' + ($parentData) + ' !== undefined)';
- }
- out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } } ';
- }
- }
- var $refKeywords;
- if (it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'))) {
- if (it.opts.extendRefs == 'fail') {
- throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"');
- } else if (it.opts.extendRefs == 'ignore') {
- $refKeywords = false;
- console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
- } else if (it.opts.extendRefs !== true) {
- console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour');
- }
- }
- if (it.schema.$ref && !$refKeywords) {
- out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
- if ($breakOnError) {
- out += ' } if (errors === ';
- if ($top) {
- out += '0';
- } else {
- out += 'errs_' + ($lvl);
- }
- out += ') { ';
- $closingBraces2 += '}';
- }
- } else {
- var arr2 = it.RULES;
- if (arr2) {
- var $rulesGroup, i2 = -1,
- l2 = arr2.length - 1;
- while (i2 < l2) {
- $rulesGroup = arr2[i2 += 1];
- if ($shouldUseGroup($rulesGroup)) {
- if ($rulesGroup.type) {
- out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
- }
- if (it.opts.useDefaults && !it.compositeRule) {
- if ($rulesGroup.type == 'object' && it.schema.properties) {
- var $schema = it.schema.properties,
- $schemaKeys = Object.keys($schema);
- var arr3 = $schemaKeys;
- if (arr3) {
- var $propertyKey, i3 = -1,
- l3 = arr3.length - 1;
- while (i3 < l3) {
- $propertyKey = arr3[i3 += 1];
- var $sch = $schema[$propertyKey];
- if ($sch.default !== undefined) {
- var $passData = $data + it.util.getProperty($propertyKey);
- out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
- if (it.opts.useDefaults == 'shared') {
- out += ' ' + (it.useDefault($sch.default)) + ' ';
- } else {
- out += ' ' + (JSON.stringify($sch.default)) + ' ';
- }
- out += '; ';
- }
- }
- }
- } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
- var arr4 = it.schema.items;
- if (arr4) {
- var $sch, $i = -1,
- l4 = arr4.length - 1;
- while ($i < l4) {
- $sch = arr4[$i += 1];
- if ($sch.default !== undefined) {
- var $passData = $data + '[' + $i + ']';
- out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
- if (it.opts.useDefaults == 'shared') {
- out += ' ' + (it.useDefault($sch.default)) + ' ';
- } else {
- out += ' ' + (JSON.stringify($sch.default)) + ' ';
- }
- out += '; ';
- }
- }
- }
- }
- }
- var arr5 = $rulesGroup.rules;
- if (arr5) {
- var $rule, i5 = -1,
- l5 = arr5.length - 1;
- while (i5 < l5) {
- $rule = arr5[i5 += 1];
- if ($shouldUseRule($rule)) {
- out += ' ' + ($rule.code(it, $rule.keyword)) + ' ';
- if ($breakOnError) {
- $closingBraces1 += '}';
- }
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces1) + ' ';
- $closingBraces1 = '';
- }
- if ($rulesGroup.type) {
- out += ' } ';
- if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
- var $typeChecked = true;
- out += ' else { ';
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } ';
- }
- }
- if ($breakOnError) {
- out += ' if (errors === ';
- if ($top) {
- out += '0';
- } else {
- out += 'errs_' + ($lvl);
- }
- out += ') { ';
- $closingBraces2 += '}';
- }
- }
- }
- }
- }
- if ($typeSchema && !$typeChecked && !$coerceToTypes) {
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type',
- $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
- out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
- }
- out += '\' ';
- }
- if (it.opts.verbose) {
- out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
- }
- out += ' } ';
- } else {
- out += ' {} ';
- }
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
- } else {
- out += ' validate.errors = [' + (__err) + ']; return false; ';
- }
- } else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' }';
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces2) + ' ';
- }
- if ($top) {
- if ($async) {
- out += ' if (errors === 0) return true; ';
- out += ' else throw new ValidationError(vErrors); ';
- } else {
- out += ' validate.errors = vErrors; ';
- out += ' return errors === 0; ';
- }
- out += ' }); return validate;';
- } else {
- out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
- }
- out = it.util.cleanUpCode(out);
- if ($top && $breakOnError) {
- out = it.util.cleanUpVarErrors(out, $async);
- }
-
- function $shouldUseGroup($rulesGroup) {
- for (var i = 0; i < $rulesGroup.rules.length; i++)
- if ($shouldUseRule($rulesGroup.rules[i])) return true;
- }
-
- function $shouldUseRule($rule) {
- return it.schema[$rule.keyword] !== undefined || ($rule.keyword == 'properties' && (it.schema.additionalProperties === false || typeof it.schema.additionalProperties == 'object' || (it.schema.patternProperties && Object.keys(it.schema.patternProperties).length) || (it.opts.v5 && it.schema.patternGroups && Object.keys(it.schema.patternGroups).length)));
- }
- return out;
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/keyword.js b/node_modules/node-gyp/node_modules/ajv/lib/keyword.js
deleted file mode 100644
index 1c9cccfe6..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/keyword.js
+++ /dev/null
@@ -1,129 +0,0 @@
-'use strict';
-
-var IDENTIFIER = /^[a-z_$][a-z0-9_$\-]*$/i;
-var customRuleCode = require('./dotjs/custom');
-
-module.exports = {
- add: addKeyword,
- get: getKeyword,
- remove: removeKeyword
-};
-
-/**
- * Define custom keyword
- * @this Ajv
- * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
- * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
- */
-function addKeyword(keyword, definition) {
- /* jshint validthis: true */
- /* eslint no-shadow: 0 */
- var RULES = this.RULES;
-
- if (RULES.keywords[keyword])
- throw new Error('Keyword ' + keyword + ' is already defined');
-
- if (!IDENTIFIER.test(keyword))
- throw new Error('Keyword ' + keyword + ' is not a valid identifier');
-
- if (definition) {
- if (definition.macro && definition.valid !== undefined)
- throw new Error('"valid" option cannot be used with macro keywords');
-
- var dataType = definition.type;
- if (Array.isArray(dataType)) {
- var i, len = dataType.length;
- for (i=0; i<len; i++) checkDataType(dataType[i]);
- for (i=0; i<len; i++) _addRule(keyword, dataType[i], definition);
- } else {
- if (dataType) checkDataType(dataType);
- _addRule(keyword, dataType, definition);
- }
-
- var $data = definition.$data === true && this._opts.v5;
- if ($data && !definition.validate)
- throw new Error('$data support: "validate" function is not defined');
-
- var metaSchema = definition.metaSchema;
- if (metaSchema) {
- if ($data) {
- metaSchema = {
- anyOf: [
- metaSchema,
- { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' }
- ]
- };
- }
- definition.validateSchema = this.compile(metaSchema, true);
- }
- }
-
- RULES.keywords[keyword] = RULES.all[keyword] = true;
-
-
- function _addRule(keyword, dataType, definition) {
- var ruleGroup;
- for (var i=0; i<RULES.length; i++) {
- var rg = RULES[i];
- if (rg.type == dataType) {
- ruleGroup = rg;
- break;
- }
- }
-
- if (!ruleGroup) {
- ruleGroup = { type: dataType, rules: [] };
- RULES.push(ruleGroup);
- }
-
- var rule = {
- keyword: keyword,
- definition: definition,
- custom: true,
- code: customRuleCode
- };
- ruleGroup.rules.push(rule);
- RULES.custom[keyword] = rule;
- }
-
-
- function checkDataType(dataType) {
- if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
- }
-}
-
-
-/**
- * Get keyword
- * @this Ajv
- * @param {String} keyword pre-defined or custom keyword.
- * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
- */
-function getKeyword(keyword) {
- /* jshint validthis: true */
- var rule = this.RULES.custom[keyword];
- return rule ? rule.definition : this.RULES.keywords[keyword] || false;
-}
-
-
-/**
- * Remove keyword
- * @this Ajv
- * @param {String} keyword pre-defined or custom keyword.
- */
-function removeKeyword(keyword) {
- /* jshint validthis: true */
- var RULES = this.RULES;
- delete RULES.keywords[keyword];
- delete RULES.all[keyword];
- delete RULES.custom[keyword];
- for (var i=0; i<RULES.length; i++) {
- var rules = RULES[i].rules;
- for (var j=0; j<rules.length; j++) {
- if (rules[j].keyword == keyword) {
- rules.splice(j, 1);
- break;
- }
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-draft-04.json b/node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-draft-04.json
deleted file mode 100644
index 85eb502a6..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-draft-04.json
+++ /dev/null
@@ -1,150 +0,0 @@
-{
- "id": "http://json-schema.org/draft-04/schema#",
- "$schema": "http://json-schema.org/draft-04/schema#",
- "description": "Core schema meta-schema",
- "definitions": {
- "schemaArray": {
- "type": "array",
- "minItems": 1,
- "items": { "$ref": "#" }
- },
- "positiveInteger": {
- "type": "integer",
- "minimum": 0
- },
- "positiveIntegerDefault0": {
- "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
- },
- "simpleTypes": {
- "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
- },
- "stringArray": {
- "type": "array",
- "items": { "type": "string" },
- "minItems": 1,
- "uniqueItems": true
- }
- },
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uri"
- },
- "$schema": {
- "type": "string",
- "format": "uri"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "default": {},
- "multipleOf": {
- "type": "number",
- "minimum": 0,
- "exclusiveMinimum": true
- },
- "maximum": {
- "type": "number"
- },
- "exclusiveMaximum": {
- "type": "boolean",
- "default": false
- },
- "minimum": {
- "type": "number"
- },
- "exclusiveMinimum": {
- "type": "boolean",
- "default": false
- },
- "maxLength": { "$ref": "#/definitions/positiveInteger" },
- "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "pattern": {
- "type": "string",
- "format": "regex"
- },
- "additionalItems": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ],
- "default": {}
- },
- "items": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/schemaArray" }
- ],
- "default": {}
- },
- "maxItems": { "$ref": "#/definitions/positiveInteger" },
- "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "uniqueItems": {
- "type": "boolean",
- "default": false
- },
- "maxProperties": { "$ref": "#/definitions/positiveInteger" },
- "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "required": { "$ref": "#/definitions/stringArray" },
- "additionalProperties": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ],
- "default": {}
- },
- "definitions": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "properties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "patternProperties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "dependencies": {
- "type": "object",
- "additionalProperties": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/stringArray" }
- ]
- }
- },
- "enum": {
- "type": "array",
- "minItems": 1,
- "uniqueItems": true
- },
- "type": {
- "anyOf": [
- { "$ref": "#/definitions/simpleTypes" },
- {
- "type": "array",
- "items": { "$ref": "#/definitions/simpleTypes" },
- "minItems": 1,
- "uniqueItems": true
- }
- ]
- },
- "allOf": { "$ref": "#/definitions/schemaArray" },
- "anyOf": { "$ref": "#/definitions/schemaArray" },
- "oneOf": { "$ref": "#/definitions/schemaArray" },
- "not": { "$ref": "#" }
- },
- "dependencies": {
- "exclusiveMaximum": [ "maximum" ],
- "exclusiveMinimum": [ "minimum" ]
- },
- "default": {}
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-v5.json b/node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-v5.json
deleted file mode 100644
index 5964042bb..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/refs/json-schema-v5.json
+++ /dev/null
@@ -1,328 +0,0 @@
-{
- "id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",
- "$schema": "http://json-schema.org/draft-04/schema#",
- "description": "Core schema meta-schema (v5 proposals)",
- "definitions": {
- "schemaArray": {
- "type": "array",
- "minItems": 1,
- "items": { "$ref": "#" }
- },
- "positiveInteger": {
- "type": "integer",
- "minimum": 0
- },
- "positiveIntegerDefault0": {
- "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
- },
- "simpleTypes": {
- "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
- },
- "stringArray": {
- "type": "array",
- "items": { "type": "string" },
- "minItems": 1,
- "uniqueItems": true
- },
- "$data": {
- "type": "object",
- "required": [ "$data" ],
- "properties": {
- "$data": {
- "type": "string",
- "anyOf": [
- { "format": "relative-json-pointer" },
- { "format": "json-pointer" }
- ]
- }
- },
- "additionalProperties": false
- }
- },
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uri"
- },
- "$schema": {
- "type": "string",
- "format": "uri"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "default": {},
- "multipleOf": {
- "anyOf": [
- {
- "type": "number",
- "minimum": 0,
- "exclusiveMinimum": true
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "maximum": {
- "anyOf": [
- { "type": "number" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "exclusiveMaximum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minimum": {
- "anyOf": [
- { "type": "number" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "exclusiveMinimum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "maxLength": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minLength": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "pattern": {
- "anyOf": [
- {
- "type": "string",
- "format": "regex"
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "additionalItems": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" },
- { "$ref": "#/definitions/$data" }
- ],
- "default": {}
- },
- "items": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/schemaArray" }
- ],
- "default": {}
- },
- "maxItems": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minItems": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "uniqueItems": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "maxProperties": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minProperties": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "required": {
- "anyOf": [
- { "$ref": "#/definitions/stringArray" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "additionalProperties": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" },
- { "$ref": "#/definitions/$data" }
- ],
- "default": {}
- },
- "definitions": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "properties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "patternProperties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "dependencies": {
- "type": "object",
- "additionalProperties": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/stringArray" }
- ]
- }
- },
- "enum": {
- "anyOf": [
- {
- "type": "array",
- "minItems": 1,
- "uniqueItems": true
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "type": {
- "anyOf": [
- { "$ref": "#/definitions/simpleTypes" },
- {
- "type": "array",
- "items": { "$ref": "#/definitions/simpleTypes" },
- "minItems": 1,
- "uniqueItems": true
- }
- ]
- },
- "allOf": { "$ref": "#/definitions/schemaArray" },
- "anyOf": { "$ref": "#/definitions/schemaArray" },
- "oneOf": { "$ref": "#/definitions/schemaArray" },
- "not": { "$ref": "#" },
- "format": {
- "anyOf": [
- { "type": "string" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatMaximum": {
- "anyOf": [
- { "type": "string" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatMinimum": {
- "anyOf": [
- { "type": "string" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatExclusiveMaximum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "formatExclusiveMinimum": {
- "anyOf": [
- {
- "type": "boolean",
- "default": false
- },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "constant": {
- "anyOf": [
- {},
- { "$ref": "#/definitions/$data" }
- ]
- },
- "contains": { "$ref": "#" },
- "patternGroups": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "required": [ "schema" ],
- "properties": {
- "maximum": {
- "anyOf": [
- { "$ref": "#/definitions/positiveInteger" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "minimum": {
- "anyOf": [
- { "$ref": "#/definitions/positiveIntegerDefault0" },
- { "$ref": "#/definitions/$data" }
- ]
- },
- "schema": { "$ref": "#" }
- },
- "additionalProperties": false
- },
- "default": {}
- },
- "switch": {
- "type": "array",
- "items": {
- "required": [ "then" ],
- "properties": {
- "if": { "$ref": "#" },
- "then": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ]
- },
- "continue": { "type": "boolean" }
- },
- "additionalProperties": false,
- "dependencies": {
- "continue": [ "if" ]
- }
- }
- }
- },
- "dependencies": {
- "exclusiveMaximum": [ "maximum" ],
- "exclusiveMinimum": [ "minimum" ],
- "formatMaximum": [ "format" ],
- "formatMinimum": [ "format" ],
- "formatExclusiveMaximum": [ "formatMaximum" ],
- "formatExclusiveMinimum": [ "formatMinimum" ]
- },
- "default": {}
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/lib/v5.js b/node_modules/node-gyp/node_modules/ajv/lib/v5.js
deleted file mode 100644
index 8f6e53f0f..000000000
--- a/node_modules/node-gyp/node_modules/ajv/lib/v5.js
+++ /dev/null
@@ -1,52 +0,0 @@
-'use strict';
-
-var META_SCHEMA_ID = 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json';
-
-module.exports = {
- enable: enableV5,
- META_SCHEMA_ID: META_SCHEMA_ID
-};
-
-
-function enableV5(ajv) {
- var inlineFunctions = {
- 'switch': require('./dotjs/switch'),
- 'constant': require('./dotjs/constant'),
- '_formatLimit': require('./dotjs/_formatLimit'),
- 'patternRequired': require('./dotjs/patternRequired')
- };
-
- if (ajv._opts.meta !== false) {
- var metaSchema = require('./refs/json-schema-v5.json');
- ajv.addMetaSchema(metaSchema, META_SCHEMA_ID);
- }
- _addKeyword('constant');
- ajv.addKeyword('contains', { type: 'array', macro: containsMacro });
-
- _addKeyword('formatMaximum', 'string', inlineFunctions._formatLimit);
- _addKeyword('formatMinimum', 'string', inlineFunctions._formatLimit);
- ajv.addKeyword('formatExclusiveMaximum');
- ajv.addKeyword('formatExclusiveMinimum');
-
- ajv.addKeyword('patternGroups'); // implemented in properties.jst
- _addKeyword('patternRequired', 'object');
- _addKeyword('switch');
-
-
- function _addKeyword(keyword, types, inlineFunc) {
- var definition = {
- inline: inlineFunc || inlineFunctions[keyword],
- statements: true,
- errors: 'full'
- };
- if (types) definition.type = types;
- ajv.addKeyword(keyword, definition);
- }
-}
-
-
-function containsMacro(schema) {
- return {
- not: { items: { not: schema } }
- };
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/package.json b/node_modules/node-gyp/node_modules/ajv/package.json
deleted file mode 100644
index 67740d326..000000000
--- a/node_modules/node-gyp/node_modules/ajv/package.json
+++ /dev/null
@@ -1,131 +0,0 @@
-{
- "_from": "ajv@^4.9.1",
- "_id": "ajv@4.11.8",
- "_inBundle": false,
- "_integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
- "_location": "/node-gyp/ajv",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ajv@^4.9.1",
- "name": "ajv",
- "escapedName": "ajv",
- "rawSpec": "^4.9.1",
- "saveSpec": null,
- "fetchSpec": "^4.9.1"
- },
- "_requiredBy": [
- "/node-gyp/har-validator"
- ],
- "_resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
- "_shasum": "82ffb02b29e662ae53bdc20af15947706739c536",
- "_spec": "ajv@^4.9.1",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/har-validator",
- "author": {
- "name": "Evgeny Poberezkin"
- },
- "bugs": {
- "url": "https://github.com/epoberezkin/ajv/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "co": "^4.6.0",
- "json-stable-stringify": "^1.0.1"
- },
- "deprecated": false,
- "description": "Another JSON Schema Validator",
- "devDependencies": {
- "bluebird": "^3.1.5",
- "brfs": "^1.4.3",
- "browserify": "^14.1.0",
- "chai": "^3.5.0",
- "coveralls": "^2.11.4",
- "del-cli": "^0.2.1",
- "dot": "^1.0.3",
- "eslint": "^3.2.2",
- "gh-pages-generator": "^0.2.0",
- "glob": "^7.0.0",
- "if-node-version": "^1.0.0",
- "js-beautify": "^1.5.6",
- "jshint": "^2.8.0",
- "json-schema-test": "^1.1.1",
- "karma": "^1.0.0",
- "karma-chrome-launcher": "^2.0.0",
- "karma-mocha": "^1.1.1",
- "karma-phantomjs-launcher": "^1.0.0",
- "karma-sauce-launcher": "^1.1.0",
- "mocha": "^3.0.0",
- "nodent": "^3.0.17",
- "nyc": "^10.0.0",
- "phantomjs-prebuilt": "^2.1.4",
- "pre-commit": "^1.1.1",
- "regenerator": "0.9.7",
- "require-globify": "^1.3.0",
- "typescript": "^2.0.3",
- "uglify-js": "^2.6.1",
- "watch": "^1.0.0"
- },
- "files": [
- "lib/",
- "dist/",
- "scripts/",
- "LICENSE",
- ".tonic_example.js"
- ],
- "homepage": "https://github.com/epoberezkin/ajv",
- "keywords": [
- "JSON",
- "schema",
- "validator",
- "validation",
- "jsonschema",
- "json-schema",
- "json-schema-validator",
- "json-schema-validation"
- ],
- "license": "MIT",
- "main": "lib/ajv.js",
- "name": "ajv",
- "nyc": {
- "exclude": [
- "**/spec/**",
- "node_modules"
- ],
- "reporter": [
- "lcov",
- "text-summary"
- ]
- },
- "publishConfig": {
- "tag": "4.x"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/epoberezkin/ajv.git"
- },
- "scripts": {
- "build": "del-cli lib/dotjs/*.js && node scripts/compile-dots.js",
- "bundle": "node ./scripts/bundle.js . Ajv pure_getters",
- "bundle-all": "del-cli dist && npm run bundle && npm run bundle-regenerator && npm run bundle-nodent",
- "bundle-beautify": "node ./scripts/bundle.js js-beautify",
- "bundle-nodent": "node ./scripts/bundle.js nodent",
- "bundle-regenerator": "node ./scripts/bundle.js regenerator",
- "eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec scripts",
- "jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*",
- "prepublish": "npm run build && npm run bundle-all",
- "test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 4 npm run test-browser",
- "test-browser": "del-cli .browser && npm run bundle-all && scripts/prepare-tests && npm run test-karma",
- "test-cov": "nyc npm run test-spec",
- "test-debug": "mocha spec/*.spec.js --debug-brk -R spec",
- "test-fast": "AJV_FAST_TEST=true npm run test-spec",
- "test-karma": "karma start --single-run --browsers PhantomJS",
- "test-spec": "mocha spec/*.spec.js -R spec",
- "test-ts": "tsc --target ES5 --noImplicitAny lib/ajv.d.ts",
- "watch": "watch 'npm run build' ./lib/dot"
- },
- "tonicExampleFilename": ".tonic_example.js",
- "typings": "lib/ajv.d.ts",
- "version": "4.11.8",
- "webpack": "dist/ajv.bundle.js"
-}
diff --git a/node_modules/node-gyp/node_modules/ajv/scripts/.eslintrc.yml b/node_modules/node-gyp/node_modules/ajv/scripts/.eslintrc.yml
deleted file mode 100644
index 493d7d312..000000000
--- a/node_modules/node-gyp/node_modules/ajv/scripts/.eslintrc.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-rules:
- no-console: 0
- no-empty: [2, allowEmptyCatch: true]
diff --git a/node_modules/node-gyp/node_modules/ajv/scripts/bundle.js b/node_modules/node-gyp/node_modules/ajv/scripts/bundle.js
deleted file mode 100644
index b3a9890c5..000000000
--- a/node_modules/node-gyp/node_modules/ajv/scripts/bundle.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-var fs = require('fs')
- , path = require('path')
- , browserify = require('browserify')
- , uglify = require('uglify-js');
-
-var pkg = process.argv[2]
- , standalone = process.argv[3]
- , compress = process.argv[4];
-
-var packageDir = path.join(__dirname, '..');
-if (pkg != '.') packageDir = path.join(packageDir, 'node_modules', pkg);
-
-var json = require(path.join(packageDir, 'package.json'));
-
-var distDir = path.join(__dirname, '..', 'dist');
-if (!fs.existsSync(distDir)) fs.mkdirSync(distDir);
-
-var bOpts = {};
-if (standalone) bOpts.standalone = standalone;
-
-browserify(bOpts)
-.require(path.join(packageDir, json.main), {expose: json.name})
-.bundle(function (err, buf) {
- if (err) {
- console.error('browserify error:', err);
- process.exit(1);
- }
-
- var outputFile = path.join(distDir, json.name);
- var outputBundle = outputFile + '.bundle.js';
- fs.writeFileSync(outputBundle, buf);
- var uglifyOpts = {
- warnings: true,
- compress: {},
- output: {
- preamble: '/* ' + json.name + ' ' + json.version + ': ' + json.description + ' */'
- }
- };
- if (compress) {
- var compressOpts = compress.split(',');
- for (var i=0; i<compressOpts.length; ++i) {
- var pair = compressOpts[i].split('=');
- uglifyOpts.compress[pair[0]] = pair.length < 1 || pair[1] != 'false';
- }
- }
- if (standalone) uglifyOpts.outSourceMap = json.name + '.min.js.map';
-
- var result = uglify.minify(outputBundle, uglifyOpts);
- fs.writeFileSync(outputFile + '.min.js', result.code);
- if (result.map) fs.writeFileSync(outputFile + '.min.js.map', result.map);
- if (!standalone) fs.unlinkSync(outputBundle);
-});
diff --git a/node_modules/node-gyp/node_modules/ajv/scripts/compile-dots.js b/node_modules/node-gyp/node_modules/ajv/scripts/compile-dots.js
deleted file mode 100644
index e6a27dc39..000000000
--- a/node_modules/node-gyp/node_modules/ajv/scripts/compile-dots.js
+++ /dev/null
@@ -1,73 +0,0 @@
-//compile doT templates to js functions
-'use strict';
-
-var glob = require('glob')
- , fs = require('fs')
- , path = require('path')
- , doT = require('dot')
- , beautify = require('js-beautify').js_beautify;
-
-var defsRootPath = process.argv[2] || path.join(__dirname, '../lib');
-
-var defs = {};
-var defFiles = glob.sync('./dot/**/*.def', { cwd: defsRootPath });
-defFiles.forEach(function (f) {
- var name = path.basename(f, '.def');
- defs[name] = fs.readFileSync(path.join(defsRootPath, f));
-});
-
-var filesRootPath = process.argv[3] || path.join(__dirname, '../lib');
-var files = glob.sync('./dot/**/*.jst', { cwd: filesRootPath });
-
-var dotjsPath = path.join(filesRootPath, './dotjs');
-try { fs.mkdirSync(dotjsPath); } catch(e) {}
-
-console.log('\n\nCompiling:');
-
-var FUNCTION_NAME = /function\s+anonymous\s*\(it[^)]*\)\s*{/;
-var OUT_EMPTY_STRING = /out\s*\+=\s*'\s*';/g;
-var ISTANBUL = /\'(istanbul[^']+)\';/g;
-var ERROR_KEYWORD = /\$errorKeyword/g;
-var ERROR_KEYWORD_OR = /\$errorKeyword\s+\|\|/g;
-var VARS = [
- '$errs', '$valid', '$lvl', '$data', '$dataLvl',
- '$errorKeyword', '$closingBraces', '$schemaPath',
- '$validate'
-];
-
-files.forEach(function (f) {
- var keyword = path.basename(f, '.jst');
- var targetPath = path.join(dotjsPath, keyword + '.js');
- var template = fs.readFileSync(path.join(filesRootPath, f));
- var code = doT.compile(template, defs);
- code = code.toString()
- .replace(OUT_EMPTY_STRING, '')
- .replace(FUNCTION_NAME, 'function generate_' + keyword + '(it, $keyword) {')
- .replace(ISTANBUL, '/* $1 */');
- removeAlwaysFalsyInOr();
- VARS.forEach(removeUnusedVar);
- code = "'use strict';\nmodule.exports = " + code;
- code = beautify(code, { indent_size: 2 }) + '\n';
- fs.writeFileSync(targetPath, code);
- console.log('compiled', keyword);
-
- function removeUnusedVar(v) {
- v = v.replace(/\$/g, '\\$$');
- var regexp = new RegExp(v + '[^A-Za-z0-9_$]', 'g');
- var count = occurrences(regexp);
- if (count == 1) {
- regexp = new RegExp('var\\s+' + v + '\\s*=[^;]+;|var\\s+' + v + ';');
- code = code.replace(regexp, '');
- }
- }
-
- function removeAlwaysFalsyInOr() {
- var countUsed = occurrences(ERROR_KEYWORD);
- var countOr = occurrences(ERROR_KEYWORD_OR);
- if (countUsed == countOr + 1) code = code.replace(ERROR_KEYWORD_OR, '');
- }
-
- function occurrences(regexp) {
- return (code.match(regexp) || []).length;
- }
-});
diff --git a/node_modules/node-gyp/node_modules/ajv/scripts/info b/node_modules/node-gyp/node_modules/ajv/scripts/info
deleted file mode 100755
index 77269ab5f..000000000
--- a/node_modules/node-gyp/node_modules/ajv/scripts/info
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-
-'use strict';
-
-var fs = require('fs');
-var name = process.argv[2] || '.';
-var property = process.argv[3] || 'version';
-if (name != '.') name = 'node_modules/' + name;
-var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8'));
-console.log(json[property]);
diff --git a/node_modules/node-gyp/node_modules/ajv/scripts/prepare-tests b/node_modules/node-gyp/node_modules/ajv/scripts/prepare-tests
deleted file mode 100755
index 6f62634e2..000000000
--- a/node_modules/node-gyp/node_modules/ajv/scripts/prepare-tests
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env sh
-
-set -e
-
-mkdir -p .browser
-
-find spec -type f -name '*.spec.js' | \
-xargs -I {} sh -c \
-'export f="{}"; browserify $f -t require-globify -t brfs -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/");'
diff --git a/node_modules/node-gyp/node_modules/ajv/scripts/travis-gh-pages b/node_modules/node-gyp/node_modules/ajv/scripts/travis-gh-pages
deleted file mode 100755
index 46ded1611..000000000
--- a/node_modules/node-gyp/node_modules/ajv/scripts/travis-gh-pages
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then
- git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && {
- rm -rf ../gh-pages
- git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages
- mkdir -p ../gh-pages/_source
- cp *.md ../gh-pages/_source
- cp LICENSE ../gh-pages/_source
- currentDir=$(pwd)
- cd ../gh-pages
- $currentDir/node_modules/.bin/gh-pages-generator
- # remove logo from README
- sed -i -E "s/<img[^>]+ajv_logo[^>]+>//" index.md
- git config user.email "$GIT_USER_EMAIL"
- git config user.name "$GIT_USER_NAME"
- git add .
- git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER"
- git push --quiet origin gh-pages > /dev/null 2>&1
- }
-fi
diff --git a/node_modules/node-gyp/node_modules/assert-plus/AUTHORS b/node_modules/node-gyp/node_modules/assert-plus/AUTHORS
deleted file mode 100644
index 1923524fe..000000000
--- a/node_modules/node-gyp/node_modules/assert-plus/AUTHORS
+++ /dev/null
@@ -1,6 +0,0 @@
-Dave Eddy <dave@daveeddy.com>
-Fred Kuo <fred.kuo@joyent.com>
-Lars-Magnus Skog <ralphtheninja@riseup.net>
-Mark Cavage <mcavage@gmail.com>
-Patrick Mooney <pmooney@pfmooney.com>
-Rob Gulewich <robert.gulewich@joyent.com>
diff --git a/node_modules/node-gyp/node_modules/assert-plus/CHANGES.md b/node_modules/node-gyp/node_modules/assert-plus/CHANGES.md
deleted file mode 100644
index d249d9b2a..000000000
--- a/node_modules/node-gyp/node_modules/assert-plus/CHANGES.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# assert-plus Changelog
-
-## 0.2.0
-
-- Fix `assert.object(null)` so it throws
-- Fix optional/arrayOf exports for non-type-of asserts
-- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
-- Add basic unit test coverage
diff --git a/node_modules/node-gyp/node_modules/assert-plus/README.md b/node_modules/node-gyp/node_modules/assert-plus/README.md
deleted file mode 100644
index 0b39593ce..000000000
--- a/node_modules/node-gyp/node_modules/assert-plus/README.md
+++ /dev/null
@@ -1,155 +0,0 @@
-# assert-plus
-
-This library is a super small wrapper over node's assert module that has two
-things: (1) the ability to disable assertions with the environment variable
-NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
-`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
-like this:
-
-```javascript
- var assert = require('assert-plus');
-
- function fooAccount(options, callback) {
- assert.object(options, 'options');
- assert.number(options.id, 'options.id');
- assert.bool(options.isManager, 'options.isManager');
- assert.string(options.name, 'options.name');
- assert.arrayOfString(options.email, 'options.email');
- assert.func(callback, 'callback');
-
- // Do stuff
- callback(null, {});
- }
-```
-
-# API
-
-All methods that *aren't* part of node's core assert API are simply assumed to
-take an argument, and then a string 'name' that's not a message; `AssertionError`
-will be thrown if the assertion fails with a message like:
-
- AssertionError: foo (string) is required
- at test (/home/mark/work/foo/foo.js:3:9)
- at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
- at Module._compile (module.js:446:26)
- at Object..js (module.js:464:10)
- at Module.load (module.js:353:31)
- at Function._load (module.js:311:12)
- at Array.0 (module.js:484:10)
- at EventEmitter._tickCallback (node.js:190:38)
-
-from:
-
-```javascript
- function test(foo) {
- assert.string(foo, 'foo');
- }
-```
-
-There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
-
-```javascript
- function test(foo) {
- assert.arrayOfString(foo, 'foo');
- }
-```
-
-You can assert IFF an argument is not `undefined` (i.e., an optional arg):
-
-```javascript
- assert.optionalString(foo, 'foo');
-```
-
-Lastly, you can opt-out of assertion checking altogether by setting the
-environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
-lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
-production. Be advised: The standard functions re-exported from `assert` are
-also disabled in assert-plus if NDEBUG is specified. Using them directly from
-the `assert` module avoids this behavior.
-
-The complete list of APIs is:
-
-* assert.array
-* assert.bool
-* assert.buffer
-* assert.func
-* assert.number
-* assert.object
-* assert.string
-* assert.stream
-* assert.date
-* assert.regex
-* assert.uuid
-* assert.arrayOfArray
-* assert.arrayOfBool
-* assert.arrayOfBuffer
-* assert.arrayOfFunc
-* assert.arrayOfNumber
-* assert.arrayOfObject
-* assert.arrayOfString
-* assert.arrayOfStream
-* assert.arrayOfDate
-* assert.arrayOfUuid
-* assert.optionalArray
-* assert.optionalBool
-* assert.optionalBuffer
-* assert.optionalFunc
-* assert.optionalNumber
-* assert.optionalObject
-* assert.optionalString
-* assert.optionalStream
-* assert.optionalDate
-* assert.optionalUuid
-* assert.optionalArrayOfArray
-* assert.optionalArrayOfBool
-* assert.optionalArrayOfBuffer
-* assert.optionalArrayOfFunc
-* assert.optionalArrayOfNumber
-* assert.optionalArrayOfObject
-* assert.optionalArrayOfString
-* assert.optionalArrayOfStream
-* assert.optionalArrayOfDate
-* assert.optionalArrayOfUuid
-* assert.AssertionError
-* assert.fail
-* assert.ok
-* assert.equal
-* assert.notEqual
-* assert.deepEqual
-* assert.notDeepEqual
-* assert.strictEqual
-* assert.notStrictEqual
-* assert.throws
-* assert.doesNotThrow
-* assert.ifError
-
-# Installation
-
- npm install assert-plus
-
-## License
-
-The MIT License (MIT)
-Copyright (c) 2012 Mark Cavage
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-## Bugs
-
-See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/node_modules/node-gyp/node_modules/assert-plus/assert.js b/node_modules/node-gyp/node_modules/assert-plus/assert.js
deleted file mode 100644
index 6bce4d8c6..000000000
--- a/node_modules/node-gyp/node_modules/assert-plus/assert.js
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) 2012, Mark Cavage. All rights reserved.
-// Copyright 2015 Joyent, Inc.
-
-var assert = require('assert');
-var Stream = require('stream').Stream;
-var util = require('util');
-
-
-///--- Globals
-
-/* JSSTYLED */
-var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
-
-
-///--- Internal
-
-function _capitalize(str) {
- return (str.charAt(0).toUpperCase() + str.slice(1));
-}
-
-function _toss(name, expected, oper, arg, actual) {
- throw new assert.AssertionError({
- message: util.format('%s (%s) is required', name, expected),
- actual: (actual === undefined) ? typeof (arg) : actual(arg),
- expected: expected,
- operator: oper || '===',
- stackStartFunction: _toss.caller
- });
-}
-
-function _getClass(arg) {
- return (Object.prototype.toString.call(arg).slice(8, -1));
-}
-
-function noop() {
- // Why even bother with asserts?
-}
-
-
-///--- Exports
-
-var types = {
- bool: {
- check: function (arg) { return typeof (arg) === 'boolean'; }
- },
- func: {
- check: function (arg) { return typeof (arg) === 'function'; }
- },
- string: {
- check: function (arg) { return typeof (arg) === 'string'; }
- },
- object: {
- check: function (arg) {
- return typeof (arg) === 'object' && arg !== null;
- }
- },
- number: {
- check: function (arg) {
- return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
- }
- },
- buffer: {
- check: function (arg) { return Buffer.isBuffer(arg); },
- operator: 'Buffer.isBuffer'
- },
- array: {
- check: function (arg) { return Array.isArray(arg); },
- operator: 'Array.isArray'
- },
- stream: {
- check: function (arg) { return arg instanceof Stream; },
- operator: 'instanceof',
- actual: _getClass
- },
- date: {
- check: function (arg) { return arg instanceof Date; },
- operator: 'instanceof',
- actual: _getClass
- },
- regexp: {
- check: function (arg) { return arg instanceof RegExp; },
- operator: 'instanceof',
- actual: _getClass
- },
- uuid: {
- check: function (arg) {
- return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
- },
- operator: 'isUUID'
- }
-};
-
-function _setExports(ndebug) {
- var keys = Object.keys(types);
- var out;
-
- /* re-export standard assert */
- if (process.env.NODE_NDEBUG) {
- out = noop;
- } else {
- out = function (arg, msg) {
- if (!arg) {
- _toss(msg, 'true', arg);
- }
- };
- }
-
- /* standard checks */
- keys.forEach(function (k) {
- if (ndebug) {
- out[k] = noop;
- return;
- }
- var type = types[k];
- out[k] = function (arg, msg) {
- if (!type.check(arg)) {
- _toss(msg, k, type.operator, arg, type.actual);
- }
- };
- });
-
- /* optional checks */
- keys.forEach(function (k) {
- var name = 'optional' + _capitalize(k);
- if (ndebug) {
- out[name] = noop;
- return;
- }
- var type = types[k];
- out[name] = function (arg, msg) {
- if (arg === undefined || arg === null) {
- return;
- }
- if (!type.check(arg)) {
- _toss(msg, k, type.operator, arg, type.actual);
- }
- };
- });
-
- /* arrayOf checks */
- keys.forEach(function (k) {
- var name = 'arrayOf' + _capitalize(k);
- if (ndebug) {
- out[name] = noop;
- return;
- }
- var type = types[k];
- var expected = '[' + k + ']';
- out[name] = function (arg, msg) {
- if (!Array.isArray(arg)) {
- _toss(msg, expected, type.operator, arg, type.actual);
- }
- var i;
- for (i = 0; i < arg.length; i++) {
- if (!type.check(arg[i])) {
- _toss(msg, expected, type.operator, arg, type.actual);
- }
- }
- };
- });
-
- /* optionalArrayOf checks */
- keys.forEach(function (k) {
- var name = 'optionalArrayOf' + _capitalize(k);
- if (ndebug) {
- out[name] = noop;
- return;
- }
- var type = types[k];
- var expected = '[' + k + ']';
- out[name] = function (arg, msg) {
- if (arg === undefined || arg === null) {
- return;
- }
- if (!Array.isArray(arg)) {
- _toss(msg, expected, type.operator, arg, type.actual);
- }
- var i;
- for (i = 0; i < arg.length; i++) {
- if (!type.check(arg[i])) {
- _toss(msg, expected, type.operator, arg, type.actual);
- }
- }
- };
- });
-
- /* re-export built-in assertions */
- Object.keys(assert).forEach(function (k) {
- if (k === 'AssertionError') {
- out[k] = assert[k];
- return;
- }
- if (ndebug) {
- out[k] = noop;
- return;
- }
- out[k] = assert[k];
- });
-
- /* export ourselves (for unit tests _only_) */
- out._setExports = _setExports;
-
- return out;
-}
-
-module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/node_modules/node-gyp/node_modules/assert-plus/package.json b/node_modules/node-gyp/node_modules/assert-plus/package.json
deleted file mode 100644
index 6ad8957e4..000000000
--- a/node_modules/node-gyp/node_modules/assert-plus/package.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "_from": "assert-plus@^0.2.0",
- "_id": "assert-plus@0.2.0",
- "_inBundle": false,
- "_integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
- "_location": "/node-gyp/assert-plus",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "assert-plus@^0.2.0",
- "name": "assert-plus",
- "escapedName": "assert-plus",
- "rawSpec": "^0.2.0",
- "saveSpec": null,
- "fetchSpec": "^0.2.0"
- },
- "_requiredBy": [
- "/node-gyp/http-signature"
- ],
- "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
- "_shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234",
- "_spec": "assert-plus@^0.2.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/http-signature",
- "author": {
- "name": "Mark Cavage",
- "email": "mcavage@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/mcavage/node-assert-plus/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Dave Eddy",
- "email": "dave@daveeddy.com"
- },
- {
- "name": "Fred Kuo",
- "email": "fred.kuo@joyent.com"
- },
- {
- "name": "Lars-Magnus Skog",
- "email": "ralphtheninja@riseup.net"
- },
- {
- "name": "Mark Cavage",
- "email": "mcavage@gmail.com"
- },
- {
- "name": "Patrick Mooney",
- "email": "pmooney@pfmooney.com"
- },
- {
- "name": "Rob Gulewich",
- "email": "robert.gulewich@joyent.com"
- }
- ],
- "dependencies": {},
- "deprecated": false,
- "description": "Extra assertions on top of node's assert module",
- "devDependencies": {
- "faucet": "0.0.1",
- "tape": "4.2.2"
- },
- "engines": {
- "node": ">=0.8"
- },
- "homepage": "https://github.com/mcavage/node-assert-plus#readme",
- "license": "MIT",
- "main": "./assert.js",
- "name": "assert-plus",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mcavage/node-assert-plus.git"
- },
- "scripts": {
- "test": "tape tests/*.js | ./node_modules/.bin/faucet"
- },
- "version": "0.2.0"
-}
diff --git a/node_modules/node-gyp/node_modules/aws-sign2/LICENSE b/node_modules/node-gyp/node_modules/aws-sign2/LICENSE
deleted file mode 100644
index a4a9aee0c..000000000
--- a/node_modules/node-gyp/node_modules/aws-sign2/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/aws-sign2/README.md b/node_modules/node-gyp/node_modules/aws-sign2/README.md
deleted file mode 100644
index 763564e0a..000000000
--- a/node_modules/node-gyp/node_modules/aws-sign2/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-aws-sign
-========
-
-AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.
diff --git a/node_modules/node-gyp/node_modules/aws-sign2/index.js b/node_modules/node-gyp/node_modules/aws-sign2/index.js
deleted file mode 100644
index ac7209308..000000000
--- a/node_modules/node-gyp/node_modules/aws-sign2/index.js
+++ /dev/null
@@ -1,212 +0,0 @@
-
-/*!
- * Copyright 2010 LearnBoost <dev@learnboost.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Module dependencies.
- */
-
-var crypto = require('crypto')
- , parse = require('url').parse
- ;
-
-/**
- * Valid keys.
- */
-
-var keys =
- [ 'acl'
- , 'location'
- , 'logging'
- , 'notification'
- , 'partNumber'
- , 'policy'
- , 'requestPayment'
- , 'torrent'
- , 'uploadId'
- , 'uploads'
- , 'versionId'
- , 'versioning'
- , 'versions'
- , 'website'
- ]
-
-/**
- * Return an "Authorization" header value with the given `options`
- * in the form of "AWS <key>:<signature>"
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function authorization (options) {
- return 'AWS ' + options.key + ':' + sign(options)
-}
-
-module.exports = authorization
-module.exports.authorization = authorization
-
-/**
- * Simple HMAC-SHA1 Wrapper
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function hmacSha1 (options) {
- return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64')
-}
-
-module.exports.hmacSha1 = hmacSha1
-
-/**
- * Create a base64 sha1 HMAC for `options`.
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function sign (options) {
- options.message = stringToSign(options)
- return hmacSha1(options)
-}
-module.exports.sign = sign
-
-/**
- * Create a base64 sha1 HMAC for `options`.
- *
- * Specifically to be used with S3 presigned URLs
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function signQuery (options) {
- options.message = queryStringToSign(options)
- return hmacSha1(options)
-}
-module.exports.signQuery= signQuery
-
-/**
- * Return a string for sign() with the given `options`.
- *
- * Spec:
- *
- * <verb>\n
- * <md5>\n
- * <content-type>\n
- * <date>\n
- * [headers\n]
- * <resource>
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function stringToSign (options) {
- var headers = options.amazonHeaders || ''
- if (headers) headers += '\n'
- var r =
- [ options.verb
- , options.md5
- , options.contentType
- , options.date ? options.date.toUTCString() : ''
- , headers + options.resource
- ]
- return r.join('\n')
-}
-module.exports.queryStringToSign = stringToSign
-
-/**
- * Return a string for sign() with the given `options`, but is meant exclusively
- * for S3 presigned URLs
- *
- * Spec:
- *
- * <date>\n
- * <resource>
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function queryStringToSign (options){
- return 'GET\n\n\n' + options.date + '\n' + options.resource
-}
-module.exports.queryStringToSign = queryStringToSign
-
-/**
- * Perform the following:
- *
- * - ignore non-amazon headers
- * - lowercase fields
- * - sort lexicographically
- * - trim whitespace between ":"
- * - join with newline
- *
- * @param {Object} headers
- * @return {String}
- * @api private
- */
-
-function canonicalizeHeaders (headers) {
- var buf = []
- , fields = Object.keys(headers)
- ;
- for (var i = 0, len = fields.length; i < len; ++i) {
- var field = fields[i]
- , val = headers[field]
- , field = field.toLowerCase()
- ;
- if (0 !== field.indexOf('x-amz')) continue
- buf.push(field + ':' + val)
- }
- return buf.sort().join('\n')
-}
-module.exports.canonicalizeHeaders = canonicalizeHeaders
-
-/**
- * Perform the following:
- *
- * - ignore non sub-resources
- * - sort lexicographically
- *
- * @param {String} resource
- * @return {String}
- * @api private
- */
-
-function canonicalizeResource (resource) {
- var url = parse(resource, true)
- , path = url.pathname
- , buf = []
- ;
-
- Object.keys(url.query).forEach(function(key){
- if (!~keys.indexOf(key)) return
- var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key])
- buf.push(key + val)
- })
-
- return path + (buf.length ? '?' + buf.sort().join('&') : '')
-}
-module.exports.canonicalizeResource = canonicalizeResource
diff --git a/node_modules/node-gyp/node_modules/aws-sign2/package.json b/node_modules/node-gyp/node_modules/aws-sign2/package.json
deleted file mode 100644
index c56720d67..000000000
--- a/node_modules/node-gyp/node_modules/aws-sign2/package.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "_from": "aws-sign2@~0.6.0",
- "_id": "aws-sign2@0.6.0",
- "_inBundle": false,
- "_integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
- "_location": "/node-gyp/aws-sign2",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "aws-sign2@~0.6.0",
- "name": "aws-sign2",
- "escapedName": "aws-sign2",
- "rawSpec": "~0.6.0",
- "saveSpec": null,
- "fetchSpec": "~0.6.0"
- },
- "_requiredBy": [
- "/node-gyp/request"
- ],
- "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
- "_shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f",
- "_spec": "aws-sign2@~0.6.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/request",
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com",
- "url": "http://www.futurealoof.com"
- },
- "bugs": {
- "url": "https://github.com/mikeal/aws-sign/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.",
- "devDependencies": {},
- "engines": {
- "node": "*"
- },
- "homepage": "https://github.com/mikeal/aws-sign#readme",
- "license": "Apache-2.0",
- "main": "index.js",
- "name": "aws-sign2",
- "optionalDependencies": {},
- "repository": {
- "url": "git+https://github.com/mikeal/aws-sign.git"
- },
- "version": "0.6.0"
-}
diff --git a/node_modules/node-gyp/node_modules/form-data/License b/node_modules/node-gyp/node_modules/form-data/License
deleted file mode 100644
index c7ff12a2f..000000000
--- a/node_modules/node-gyp/node_modules/form-data/License
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/form-data/README.md b/node_modules/node-gyp/node_modules/form-data/README.md
deleted file mode 100644
index 78ef315ff..000000000
--- a/node_modules/node-gyp/node_modules/form-data/README.md
+++ /dev/null
@@ -1,217 +0,0 @@
-# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data)
-
-A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications.
-
-The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
-
-[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
-
-[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.1.4.svg?label=linux:0.12-6.x)](https://travis-ci.org/form-data/form-data)
-[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.1.4.svg?label=macos:0.12-6.x)](https://travis-ci.org/form-data/form-data)
-[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.1.4.svg?label=windows:0.12-6.x)](https://ci.appveyor.com/project/alexindigo/form-data)
-
-[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.1.4.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
-[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
-[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)
-
-## Install
-
-```
-npm install --save form-data
-```
-
-## Usage
-
-In this example we are constructing a form with 3 fields that contain a string,
-a buffer and a file stream.
-
-``` javascript
-var FormData = require('form-data');
-var fs = require('fs');
-
-var form = new FormData();
-form.append('my_field', 'my value');
-form.append('my_buffer', new Buffer(10));
-form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
-```
-
-Also you can use http-response stream:
-
-``` javascript
-var FormData = require('form-data');
-var http = require('http');
-
-var form = new FormData();
-
-http.request('http://nodejs.org/images/logo.png', function(response) {
- form.append('my_field', 'my value');
- form.append('my_buffer', new Buffer(10));
- form.append('my_logo', response);
-});
-```
-
-Or @mikeal's [request](https://github.com/request/request) stream:
-
-``` javascript
-var FormData = require('form-data');
-var request = require('request');
-
-var form = new FormData();
-
-form.append('my_field', 'my value');
-form.append('my_buffer', new Buffer(10));
-form.append('my_logo', request('http://nodejs.org/images/logo.png'));
-```
-
-In order to submit this form to a web application, call ```submit(url, [callback])``` method:
-
-``` javascript
-form.submit('http://example.org/', function(err, res) {
- // res – response object (http.IncomingMessage) //
- res.resume();
-});
-
-```
-
-For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
-
-### Alternative submission methods
-
-You can use node's http client interface:
-
-``` javascript
-var http = require('http');
-
-var request = http.request({
- method: 'post',
- host: 'example.org',
- path: '/upload',
- headers: form.getHeaders()
-});
-
-form.pipe(request);
-
-request.on('response', function(res) {
- console.log(res.statusCode);
-});
-```
-
-Or if you would prefer the `'Content-Length'` header to be set for you:
-
-``` javascript
-form.submit('example.org/upload', function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-To use custom headers and pre-known length in parts:
-
-``` javascript
-var CRLF = '\r\n';
-var form = new FormData();
-
-var options = {
- header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,
- knownLength: 1
-};
-
-form.append('my_buffer', buffer, options);
-
-form.submit('http://example.com/', function(err, res) {
- if (err) throw err;
- console.log('Done');
-});
-```
-
-Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually:
-
-``` javascript
-someModule.stream(function(err, stdout, stderr) {
- if (err) throw err;
-
- var form = new FormData();
-
- form.append('file', stdout, {
- filename: 'unicycle.jpg',
- contentType: 'image/jpg',
- knownLength: 19806
- });
-
- form.submit('http://example.com/', function(err, res) {
- if (err) throw err;
- console.log('Done');
- });
-});
-```
-
-For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:
-
-``` javascript
-form.submit({
- host: 'example.com',
- path: '/probably.php?extra=params',
- auth: 'username:password'
-}, function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:
-
-``` javascript
-form.submit({
- host: 'example.com',
- path: '/surelynot.php',
- headers: {'x-test-header': 'test-header-value'}
-}, function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-### Integration with other libraries
-
-#### Request
-
-Form submission using [request](https://github.com/request/request):
-
-```javascript
-var formData = {
- my_field: 'my_value',
- my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
-};
-
-request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {
- if (err) {
- return console.error('upload failed:', err);
- }
- console.log('Upload successful! Server responded with:', body);
-});
-```
-
-For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).
-
-#### node-fetch
-
-You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):
-
-```javascript
-var form = new FormData();
-
-form.append('a', 1);
-
-fetch('http://example.com', { method: 'POST', body: form })
- .then(function(res) {
- return res.json();
- }).then(function(json) {
- console.log(json);
- });
-```
-
-## Notes
-
-- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
-- Starting version `2.x` FormData has dropped support for `node@0.10.x`.
-
-## License
-
-Form-Data is released under the [MIT](License) license.
diff --git a/node_modules/node-gyp/node_modules/form-data/lib/browser.js b/node_modules/node-gyp/node_modules/form-data/lib/browser.js
deleted file mode 100644
index 09e7c70e6..000000000
--- a/node_modules/node-gyp/node_modules/form-data/lib/browser.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* eslint-env browser */
-module.exports = typeof self == 'object' ? self.FormData : window.FormData;
diff --git a/node_modules/node-gyp/node_modules/form-data/lib/form_data.js b/node_modules/node-gyp/node_modules/form-data/lib/form_data.js
deleted file mode 100644
index 79aa0f9f5..000000000
--- a/node_modules/node-gyp/node_modules/form-data/lib/form_data.js
+++ /dev/null
@@ -1,444 +0,0 @@
-var CombinedStream = require('combined-stream');
-var util = require('util');
-var path = require('path');
-var http = require('http');
-var https = require('https');
-var parseUrl = require('url').parse;
-var fs = require('fs');
-var mime = require('mime-types');
-var asynckit = require('asynckit');
-var populate = require('./populate.js');
-
-// Public API
-module.exports = FormData;
-
-// make it a Stream
-util.inherits(FormData, CombinedStream);
-
-/**
- * Create readable "multipart/form-data" streams.
- * Can be used to submit forms
- * and file uploads to other web applications.
- *
- * @constructor
- */
-function FormData() {
- if (!(this instanceof FormData)) {
- return new FormData();
- }
-
- this._overheadLength = 0;
- this._valueLength = 0;
- this._valuesToMeasure = [];
-
- CombinedStream.call(this);
-}
-
-FormData.LINE_BREAK = '\r\n';
-FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
-
-FormData.prototype.append = function(field, value, options) {
-
- options = options || {};
-
- // allow filename as single option
- if (typeof options == 'string') {
- options = {filename: options};
- }
-
- var append = CombinedStream.prototype.append.bind(this);
-
- // all that streamy business can't handle numbers
- if (typeof value == 'number') {
- value = '' + value;
- }
-
- // https://github.com/felixge/node-form-data/issues/38
- if (util.isArray(value)) {
- // Please convert your array into string
- // the way web server expects it
- this._error(new Error('Arrays are not supported.'));
- return;
- }
-
- var header = this._multiPartHeader(field, value, options);
- var footer = this._multiPartFooter();
-
- append(header);
- append(value);
- append(footer);
-
- // pass along options.knownLength
- this._trackLength(header, value, options);
-};
-
-FormData.prototype._trackLength = function(header, value, options) {
- var valueLength = 0;
-
- // used w/ getLengthSync(), when length is known.
- // e.g. for streaming directly from a remote server,
- // w/ a known file a size, and not wanting to wait for
- // incoming file to finish to get its size.
- if (options.knownLength != null) {
- valueLength += +options.knownLength;
- } else if (Buffer.isBuffer(value)) {
- valueLength = value.length;
- } else if (typeof value === 'string') {
- valueLength = Buffer.byteLength(value);
- }
-
- this._valueLength += valueLength;
-
- // @check why add CRLF? does this account for custom/multiple CRLFs?
- this._overheadLength +=
- Buffer.byteLength(header) +
- FormData.LINE_BREAK.length;
-
- // empty or either doesn't have path or not an http response
- if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
- return;
- }
-
- // no need to bother with the length
- if (!options.knownLength) {
- this._valuesToMeasure.push(value);
- }
-};
-
-FormData.prototype._lengthRetriever = function(value, callback) {
-
- if (value.hasOwnProperty('fd')) {
-
- // take read range into a account
- // `end` = Infinity –> read file till the end
- //
- // TODO: Looks like there is bug in Node fs.createReadStream
- // it doesn't respect `end` options without `start` options
- // Fix it when node fixes it.
- // https://github.com/joyent/node/issues/7819
- if (value.end != undefined && value.end != Infinity && value.start != undefined) {
-
- // when end specified
- // no need to calculate range
- // inclusive, starts with 0
- callback(null, value.end + 1 - (value.start ? value.start : 0));
-
- // not that fast snoopy
- } else {
- // still need to fetch file size from fs
- fs.stat(value.path, function(err, stat) {
-
- var fileSize;
-
- if (err) {
- callback(err);
- return;
- }
-
- // update final size based on the range options
- fileSize = stat.size - (value.start ? value.start : 0);
- callback(null, fileSize);
- });
- }
-
- // or http response
- } else if (value.hasOwnProperty('httpVersion')) {
- callback(null, +value.headers['content-length']);
-
- // or request stream http://github.com/mikeal/request
- } else if (value.hasOwnProperty('httpModule')) {
- // wait till response come back
- value.on('response', function(response) {
- value.pause();
- callback(null, +response.headers['content-length']);
- });
- value.resume();
-
- // something else
- } else {
- callback('Unknown stream');
- }
-};
-
-FormData.prototype._multiPartHeader = function(field, value, options) {
- // custom header specified (as string)?
- // it becomes responsible for boundary
- // (e.g. to handle extra CRLFs on .NET servers)
- if (typeof options.header == 'string') {
- return options.header;
- }
-
- var contentDisposition = this._getContentDisposition(value, options);
- var contentType = this._getContentType(value, options);
-
- var contents = '';
- var headers = {
- // add custom disposition as third element or keep it two elements if not
- 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
- // if no content type. allow it to be empty array
- 'Content-Type': [].concat(contentType || [])
- };
-
- // allow custom headers.
- if (typeof options.header == 'object') {
- populate(headers, options.header);
- }
-
- var header;
- for (var prop in headers) {
- header = headers[prop];
-
- // skip nullish headers.
- if (header == null) {
- continue;
- }
-
- // convert all headers to arrays.
- if (!Array.isArray(header)) {
- header = [header];
- }
-
- // add non-empty headers.
- if (header.length) {
- contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
- }
- }
-
- return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
-};
-
-FormData.prototype._getContentDisposition = function(value, options) {
-
- var contentDisposition;
-
- // custom filename takes precedence
- // fs- and request- streams have path property
- // formidable and the browser add a name property.
- var filename = options.filename || value.name || value.path;
-
- // or try http response
- if (!filename && value.readable && value.hasOwnProperty('httpVersion')) {
- filename = value.client._httpMessage.path;
- }
-
- if (filename) {
- contentDisposition = 'filename="' + path.basename(filename) + '"';
- }
-
- return contentDisposition;
-};
-
-FormData.prototype._getContentType = function(value, options) {
-
- // use custom content-type above all
- var contentType = options.contentType;
-
- // or try `name` from formidable, browser
- if (!contentType && value.name) {
- contentType = mime.lookup(value.name);
- }
-
- // or try `path` from fs-, request- streams
- if (!contentType && value.path) {
- contentType = mime.lookup(value.path);
- }
-
- // or if it's http-reponse
- if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
- contentType = value.headers['content-type'];
- }
-
- // or guess it from the filename
- if (!contentType && options.filename) {
- contentType = mime.lookup(options.filename);
- }
-
- // fallback to the default content type if `value` is not simple value
- if (!contentType && typeof value == 'object') {
- contentType = FormData.DEFAULT_CONTENT_TYPE;
- }
-
- return contentType;
-};
-
-FormData.prototype._multiPartFooter = function() {
- return function(next) {
- var footer = FormData.LINE_BREAK;
-
- var lastPart = (this._streams.length === 0);
- if (lastPart) {
- footer += this._lastBoundary();
- }
-
- next(footer);
- }.bind(this);
-};
-
-FormData.prototype._lastBoundary = function() {
- return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
-};
-
-FormData.prototype.getHeaders = function(userHeaders) {
- var header;
- var formHeaders = {
- 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
- };
-
- for (header in userHeaders) {
- if (userHeaders.hasOwnProperty(header)) {
- formHeaders[header.toLowerCase()] = userHeaders[header];
- }
- }
-
- return formHeaders;
-};
-
-FormData.prototype.getBoundary = function() {
- if (!this._boundary) {
- this._generateBoundary();
- }
-
- return this._boundary;
-};
-
-FormData.prototype._generateBoundary = function() {
- // This generates a 50 character boundary similar to those used by Firefox.
- // They are optimized for boyer-moore parsing.
- var boundary = '--------------------------';
- for (var i = 0; i < 24; i++) {
- boundary += Math.floor(Math.random() * 10).toString(16);
- }
-
- this._boundary = boundary;
-};
-
-// Note: getLengthSync DOESN'T calculate streams length
-// As workaround one can calculate file size manually
-// and add it as knownLength option
-FormData.prototype.getLengthSync = function() {
- var knownLength = this._overheadLength + this._valueLength;
-
- // Don't get confused, there are 3 "internal" streams for each keyval pair
- // so it basically checks if there is any value added to the form
- if (this._streams.length) {
- knownLength += this._lastBoundary().length;
- }
-
- // https://github.com/form-data/form-data/issues/40
- if (!this.hasKnownLength()) {
- // Some async length retrievers are present
- // therefore synchronous length calculation is false.
- // Please use getLength(callback) to get proper length
- this._error(new Error('Cannot calculate proper length in synchronous way.'));
- }
-
- return knownLength;
-};
-
-// Public API to check if length of added values is known
-// https://github.com/form-data/form-data/issues/196
-// https://github.com/form-data/form-data/issues/262
-FormData.prototype.hasKnownLength = function() {
- var hasKnownLength = true;
-
- if (this._valuesToMeasure.length) {
- hasKnownLength = false;
- }
-
- return hasKnownLength;
-};
-
-FormData.prototype.getLength = function(cb) {
- var knownLength = this._overheadLength + this._valueLength;
-
- if (this._streams.length) {
- knownLength += this._lastBoundary().length;
- }
-
- if (!this._valuesToMeasure.length) {
- process.nextTick(cb.bind(this, null, knownLength));
- return;
- }
-
- asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
- if (err) {
- cb(err);
- return;
- }
-
- values.forEach(function(length) {
- knownLength += length;
- });
-
- cb(null, knownLength);
- });
-};
-
-FormData.prototype.submit = function(params, cb) {
- var request
- , options
- , defaults = {method: 'post'}
- ;
-
- // parse provided url if it's string
- // or treat it as options object
- if (typeof params == 'string') {
-
- params = parseUrl(params);
- options = populate({
- port: params.port,
- path: params.pathname,
- host: params.hostname
- }, defaults);
-
- // use custom params
- } else {
-
- options = populate(params, defaults);
- // if no port provided use default one
- if (!options.port) {
- options.port = options.protocol == 'https:' ? 443 : 80;
- }
- }
-
- // put that good code in getHeaders to some use
- options.headers = this.getHeaders(params.headers);
-
- // https if specified, fallback to http in any other case
- if (options.protocol == 'https:') {
- request = https.request(options);
- } else {
- request = http.request(options);
- }
-
- // get content length and fire away
- this.getLength(function(err, length) {
- if (err) {
- this._error(err);
- return;
- }
-
- // add content length
- request.setHeader('Content-Length', length);
-
- this.pipe(request);
- if (cb) {
- request.on('error', cb);
- request.on('response', cb.bind(this, null));
- }
- }.bind(this));
-
- return request;
-};
-
-FormData.prototype._error = function(err) {
- if (!this.error) {
- this.error = err;
- this.pause();
- this.emit('error', err);
- }
-};
-
-FormData.prototype.toString = function () {
- return '[object FormData]';
-};
diff --git a/node_modules/node-gyp/node_modules/form-data/lib/populate.js b/node_modules/node-gyp/node_modules/form-data/lib/populate.js
deleted file mode 100644
index 4d35738dd..000000000
--- a/node_modules/node-gyp/node_modules/form-data/lib/populate.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// populates missing values
-module.exports = function(dst, src) {
-
- Object.keys(src).forEach(function(prop)
- {
- dst[prop] = dst[prop] || src[prop];
- });
-
- return dst;
-};
diff --git a/node_modules/node-gyp/node_modules/form-data/package.json b/node_modules/node-gyp/node_modules/form-data/package.json
deleted file mode 100644
index 03dc97149..000000000
--- a/node_modules/node-gyp/node_modules/form-data/package.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "_from": "form-data@~2.1.1",
- "_id": "form-data@2.1.4",
- "_inBundle": false,
- "_integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
- "_location": "/node-gyp/form-data",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "form-data@~2.1.1",
- "name": "form-data",
- "escapedName": "form-data",
- "rawSpec": "~2.1.1",
- "saveSpec": null,
- "fetchSpec": "~2.1.1"
- },
- "_requiredBy": [
- "/node-gyp/request"
- ],
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
- "_shasum": "33c183acf193276ecaa98143a69e94bfee1750d1",
- "_spec": "form-data@~2.1.1",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/request",
- "author": {
- "name": "Felix Geisendörfer",
- "email": "felix@debuggable.com",
- "url": "http://debuggable.com/"
- },
- "browser": "./lib/browser",
- "bugs": {
- "url": "https://github.com/form-data/form-data/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.5",
- "mime-types": "^2.1.12"
- },
- "deprecated": false,
- "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
- "devDependencies": {
- "browserify": "^13.1.1",
- "browserify-istanbul": "^2.0.0",
- "coveralls": "^2.11.14",
- "cross-spawn": "^4.0.2",
- "eslint": "^3.9.1",
- "fake": "^0.2.2",
- "far": "^0.0.7",
- "formidable": "^1.0.17",
- "in-publish": "^2.0.0",
- "is-node-modern": "^1.0.0",
- "istanbul": "^0.4.5",
- "obake": "^0.1.2",
- "phantomjs-prebuilt": "^2.1.13",
- "pkgfiles": "^2.3.0",
- "pre-commit": "^1.1.3",
- "request": "2.76.0",
- "rimraf": "^2.5.4",
- "tape": "^4.6.2"
- },
- "engines": {
- "node": ">= 0.12"
- },
- "homepage": "https://github.com/form-data/form-data#readme",
- "license": "MIT",
- "main": "./lib/form_data",
- "name": "form-data",
- "pre-commit": [
- "lint",
- "ci-test",
- "check"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/form-data/form-data.git"
- },
- "scripts": {
- "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",
- "check": "istanbul check-coverage coverage/coverage*.json",
- "ci-lint": "is-node-modern 6 && npm run lint || is-node-not-modern 6",
- "ci-test": "npm run test && npm run browser && npm run report",
- "debug": "verbose=1 ./test/run.js",
- "files": "pkgfiles --sort=name",
- "get-version": "node -e \"console.log(require('./package.json').version)\"",
- "lint": "eslint lib/*.js test/*.js test/integration/*.js",
- "postpublish": "npm run restore-readme",
- "posttest": "istanbul report lcov text",
- "predebug": "rimraf coverage test/tmp",
- "prepublish": "in-publish && npm run update-readme || not-in-publish",
- "pretest": "rimraf coverage test/tmp",
- "report": "istanbul report lcov text",
- "restore-readme": "mv README.md.bak README.md",
- "test": "istanbul cover test/run.js",
- "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md"
- },
- "version": "2.1.4"
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/LICENSE b/node_modules/node-gyp/node_modules/har-schema/LICENSE
deleted file mode 100644
index ca55c91af..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2015, Ahmad Nassri <ahmad@ahmadnassri.com>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/har-schema/README.md b/node_modules/node-gyp/node_modules/har-schema/README.md
deleted file mode 100644
index cd0a28e1a..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# HAR Schema [![version][npm-version]][npm-url] [![License][npm-license]][license-url]
-
-> JSON Schema for HTTP Archive ([HAR][spec]).
-
-[![Build Status][travis-image]][travis-url]
-[![Downloads][npm-downloads]][npm-url]
-[![Code Climate][codeclimate-quality]][codeclimate-url]
-[![Coverage Status][codeclimate-coverage]][codeclimate-url]
-[![Dependency Status][dependencyci-image]][dependencyci-url]
-[![Dependencies][david-image]][david-url]
-
-## Install
-
-```bash
-npm install --only=production --save har-schema
-```
-
-## Usage
-
-Compatible with any [JSON Schema validation tool][validator].
-
-----
-> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/) &nbsp;&middot;&nbsp;
-> License: [ISC][license-url] &nbsp;&middot;&nbsp;
-> Github: [@ahmadnassri](https://github.com/ahmadnassri) &nbsp;&middot;&nbsp;
-> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
-
-[license-url]: http://choosealicense.com/licenses/isc/
-
-[travis-url]: https://travis-ci.org/ahmadnassri/har-schema
-[travis-image]: https://img.shields.io/travis/ahmadnassri/har-schema.svg?style=flat-square
-
-[npm-url]: https://www.npmjs.com/package/har-schema
-[npm-license]: https://img.shields.io/npm/l/har-schema.svg?style=flat-square
-[npm-version]: https://img.shields.io/npm/v/har-schema.svg?style=flat-square
-[npm-downloads]: https://img.shields.io/npm/dm/har-schema.svg?style=flat-square
-
-[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-schema
-[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-schema.svg?style=flat-square
-[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-schema.svg?style=flat-square
-
-[david-url]: https://david-dm.org/ahmadnassri/har-schema
-[david-image]: https://img.shields.io/david/ahmadnassri/har-schema.svg?style=flat-square
-
-[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-schema
-[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-schema/badge?style=flat-square
-
-[spec]: https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md
-[validator]: https://github.com/ahmadnassri/har-validator
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/afterRequest.json b/node_modules/node-gyp/node_modules/har-schema/lib/afterRequest.json
deleted file mode 100644
index 0ae5a69d9..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/afterRequest.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "id": "afterRequest.json#",
- "type": "object",
- "optional": true,
- "required": [
- "lastAccess",
- "eTag",
- "hitCount"
- ],
- "properties": {
- "expires": {
- "type": "string",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
- },
- "lastAccess": {
- "type": "string",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
- },
- "eTag": {
- "type": "string"
- },
- "hitCount": {
- "type": "integer"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/beforeRequest.json b/node_modules/node-gyp/node_modules/har-schema/lib/beforeRequest.json
deleted file mode 100644
index 20f2ca117..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/beforeRequest.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "id": "beforeRequest.json#",
- "type": "object",
- "optional": true,
- "required": [
- "lastAccess",
- "eTag",
- "hitCount"
- ],
- "properties": {
- "expires": {
- "type": "string",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
- },
- "lastAccess": {
- "type": "string",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
- },
- "eTag": {
- "type": "string"
- },
- "hitCount": {
- "type": "integer"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/browser.json b/node_modules/node-gyp/node_modules/har-schema/lib/browser.json
deleted file mode 100644
index dd8bff4f4..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/browser.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "id": "browser.json#",
- "type": "object",
- "required": [
- "name",
- "version"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "version": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/cache.json b/node_modules/node-gyp/node_modules/har-schema/lib/cache.json
deleted file mode 100644
index d95e46145..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/cache.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "id": "cache.json#",
- "properties": {
- "beforeRequest": {
- "oneOf": [
- { "type": "null" },
- { "$ref": "beforeRequest.json#" }
- ]
- },
- "afterRequest": {
- "oneOf": [
- { "type": "null" },
- { "$ref": "afterRequest.json#" }
- ]
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/content.json b/node_modules/node-gyp/node_modules/har-schema/lib/content.json
deleted file mode 100644
index 7aece620d..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/content.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "id": "content.json#",
- "type": "object",
- "required": [
- "size",
- "mimeType"
- ],
- "properties": {
- "size": {
- "type": "integer"
- },
- "compression": {
- "type": "integer"
- },
- "mimeType": {
- "type": "string"
- },
- "text": {
- "type": "string"
- },
- "encoding": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/cookie.json b/node_modules/node-gyp/node_modules/har-schema/lib/cookie.json
deleted file mode 100644
index ec1dcf175..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/cookie.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "id": "cookie.json#",
- "type": "object",
- "required": [
- "name",
- "value"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "domain": {
- "type": "string"
- },
- "expires": {
- "type": ["string", "null"],
- "format": "date-time"
- },
- "httpOnly": {
- "type": "boolean"
- },
- "secure": {
- "type": "boolean"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/creator.json b/node_modules/node-gyp/node_modules/har-schema/lib/creator.json
deleted file mode 100644
index 003a06aee..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/creator.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "id": "creator.json#",
- "type": "object",
- "required": [
- "name",
- "version"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "version": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/entry.json b/node_modules/node-gyp/node_modules/har-schema/lib/entry.json
deleted file mode 100644
index d97a8f224..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/entry.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "id": "entry.json#",
- "type": "object",
- "optional": true,
- "required": [
- "startedDateTime",
- "time",
- "request",
- "response",
- "cache",
- "timings"
- ],
- "properties": {
- "pageref": {
- "type": "string"
- },
- "startedDateTime": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
- },
- "time": {
- "type": "number",
- "min": 0
- },
- "request": {
- "$ref": "request.json#"
- },
- "response": {
- "$ref": "response.json#"
- },
- "cache": {
- "$ref": "cache.json#"
- },
- "timings": {
- "$ref": "timings.json#"
- },
- "serverIPAddress": {
- "type": "string",
- "oneOf": [
- { "format": "ipv4" },
- { "format": "ipv6" }
- ]
- },
- "connection": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/har.json b/node_modules/node-gyp/node_modules/har-schema/lib/har.json
deleted file mode 100644
index faeadede2..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/har.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "har.json#",
- "type": "object",
- "required": [
- "log"
- ],
- "properties": {
- "log": {
- "$ref": "log.json#"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/header.json b/node_modules/node-gyp/node_modules/har-schema/lib/header.json
deleted file mode 100644
index 2b1704075..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/header.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "id": "header.json#",
- "type": "object",
- "required": [
- "name",
- "value"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/index.js b/node_modules/node-gyp/node_modules/har-schema/lib/index.js
deleted file mode 100644
index 244c08e04..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict'
-
-module.exports = {
- afterRequest: require('./afterRequest.json'),
- beforeRequest: require('./beforeRequest.json'),
- browser: require('./browser.json'),
- cache: require('./cache.json'),
- content: require('./content.json'),
- cookie: require('./cookie.json'),
- creator: require('./creator.json'),
- entry: require('./entry.json'),
- har: require('./har.json'),
- header: require('./header.json'),
- log: require('./log.json'),
- page: require('./page.json'),
- pageTimings: require('./pageTimings.json'),
- postData: require('./postData.json'),
- query: require('./query.json'),
- request: require('./request.json'),
- response: require('./response.json'),
- timings: require('./timings.json')
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/log.json b/node_modules/node-gyp/node_modules/har-schema/lib/log.json
deleted file mode 100644
index 402e9b459..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/log.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "id": "log.json#",
- "type": "object",
- "required": [
- "version",
- "creator",
- "entries"
- ],
- "properties": {
- "version": {
- "type": "string"
- },
- "creator": {
- "$ref": "creator.json#"
- },
- "browser": {
- "$ref": "browser.json#"
- },
- "pages": {
- "type": "array",
- "items": {
- "$ref": "page.json#"
- }
- },
- "entries": {
- "type": "array",
- "items": {
- "$ref": "entry.json#"
- }
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/page.json b/node_modules/node-gyp/node_modules/har-schema/lib/page.json
deleted file mode 100644
index 0a9ddb0c1..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/page.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "id": "page.json#",
- "type": "object",
- "optional": true,
- "required": [
- "startedDateTime",
- "id",
- "title",
- "pageTimings"
- ],
- "properties": {
- "startedDateTime": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
- },
- "id": {
- "type": "string",
- "unique": true
- },
- "title": {
- "type": "string"
- },
- "pageTimings": {
- "$ref": "pageTimings.json#"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/pageTimings.json b/node_modules/node-gyp/node_modules/har-schema/lib/pageTimings.json
deleted file mode 100644
index 5fd6cb39e..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/pageTimings.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "id": "pageTimings.json#",
- "type": "object",
- "properties": {
- "onContentLoad": {
- "type": "number",
- "min": -1
- },
- "onLoad": {
- "type": "number",
- "min": -1
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/postData.json b/node_modules/node-gyp/node_modules/har-schema/lib/postData.json
deleted file mode 100644
index 9f86a7210..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/postData.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "id": "postData.json#",
- "type": "object",
- "optional": true,
- "required": [
- "mimeType"
- ],
- "properties": {
- "mimeType": {
- "type": "string"
- },
- "text": {
- "type": "string"
- },
- "params": {
- "type": "array",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "fileName": {
- "type": "string"
- },
- "contentType": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- }
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/query.json b/node_modules/node-gyp/node_modules/har-schema/lib/query.json
deleted file mode 100644
index fa1b8af4b..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/query.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "id": "query.json#",
- "type": "object",
- "required": [
- "name",
- "value"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/request.json b/node_modules/node-gyp/node_modules/har-schema/lib/request.json
deleted file mode 100644
index 06435d380..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/request.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "id": "request.json#",
- "type": "object",
- "required": [
- "method",
- "url",
- "httpVersion",
- "cookies",
- "headers",
- "queryString",
- "headersSize",
- "bodySize"
- ],
- "properties": {
- "method": {
- "type": "string"
- },
- "url": {
- "type": "string",
- "format": "uri"
- },
- "httpVersion": {
- "type": "string"
- },
- "cookies": {
- "type": "array",
- "items": {
- "$ref": "cookie.json#"
- }
- },
- "headers": {
- "type": "array",
- "items": {
- "$ref": "header.json#"
- }
- },
- "queryString": {
- "type": "array",
- "items": {
- "$ref": "query.json#"
- }
- },
- "postData": {
- "$ref": "postData.json#"
- },
- "headersSize": {
- "type": "integer"
- },
- "bodySize": {
- "type": "integer"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/response.json b/node_modules/node-gyp/node_modules/har-schema/lib/response.json
deleted file mode 100644
index f27c397d7..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/response.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "id": "response.json#",
- "type": "object",
- "required": [
- "status",
- "statusText",
- "httpVersion",
- "cookies",
- "headers",
- "content",
- "redirectURL",
- "headersSize",
- "bodySize"
- ],
- "properties": {
- "status": {
- "type": "integer"
- },
- "statusText": {
- "type": "string"
- },
- "httpVersion": {
- "type": "string"
- },
- "cookies": {
- "type": "array",
- "items": {
- "$ref": "cookie.json#"
- }
- },
- "headers": {
- "type": "array",
- "items": {
- "$ref": "header.json#"
- }
- },
- "content": {
- "$ref": "content.json#"
- },
- "redirectURL": {
- "type": "string"
- },
- "headersSize": {
- "type": "integer"
- },
- "bodySize": {
- "type": "integer"
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/lib/timings.json b/node_modules/node-gyp/node_modules/har-schema/lib/timings.json
deleted file mode 100644
index 2055d09e8..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/lib/timings.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "id": "timings.json#",
- "required": [
- "send",
- "wait",
- "receive"
- ],
- "properties": {
- "dns": {
- "type": "number",
- "min": -1
- },
- "connect": {
- "type": "number",
- "min": -1
- },
- "blocked": {
- "type": "number",
- "min": -1
- },
- "send": {
- "type": "number",
- "min": -1
- },
- "wait": {
- "type": "number",
- "min": -1
- },
- "receive": {
- "type": "number",
- "min": -1
- },
- "ssl": {
- "type": "number",
- "min": -1
- },
- "comment": {
- "type": "string"
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/har-schema/package.json b/node_modules/node-gyp/node_modules/har-schema/package.json
deleted file mode 100644
index 806f05bc5..000000000
--- a/node_modules/node-gyp/node_modules/har-schema/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "_from": "har-schema@^1.0.5",
- "_id": "har-schema@1.0.5",
- "_inBundle": false,
- "_integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
- "_location": "/node-gyp/har-schema",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "har-schema@^1.0.5",
- "name": "har-schema",
- "escapedName": "har-schema",
- "rawSpec": "^1.0.5",
- "saveSpec": null,
- "fetchSpec": "^1.0.5"
- },
- "_requiredBy": [
- "/node-gyp/har-validator"
- ],
- "_resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
- "_shasum": "d263135f43307c02c602afc8fe95970c0151369e",
- "_spec": "har-schema@^1.0.5",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/har-validator",
- "author": {
- "name": "Ahmad Nassri",
- "email": "ahmad@ahmadnassri.com",
- "url": "https://www.ahmadnassri.com/"
- },
- "bugs": {
- "url": "https://github.com/ahmadnassri/har-schema/issues"
- },
- "bundleDependencies": false,
- "config": {
- "commitizen": {
- "path": "./node_modules/cz-conventional-changelog"
- }
- },
- "contributors": [
- {
- "name": "Evgeny Poberezkin",
- "email": "e.poberezkin@me.com"
- }
- ],
- "deprecated": false,
- "description": "JSON Schema for HTTP Archive (HAR)",
- "devDependencies": {
- "ajv": "^4.9.1",
- "codeclimate-test-reporter": "^0.4.0",
- "cz-conventional-changelog": "^1.2.0",
- "echint": "^2.1.0",
- "semantic-release": "^6.3.2",
- "snazzy": "^5.0.0",
- "tap": "^8.0.1"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "lib"
- ],
- "homepage": "https://github.com/ahmadnassri/har-schema",
- "keywords": [
- "har",
- "http",
- "archive",
- "JSON",
- "schema",
- "JSON-schema"
- ],
- "license": "ISC",
- "main": "lib/index.js",
- "name": "har-schema",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/ahmadnassri/har-schema.git"
- },
- "scripts": {
- "codeclimate": "tap --coverage-report=text-lcov | codeclimate-test-reporter",
- "coverage": "tap test --reporter silent --coverage",
- "pretest": "snazzy && echint",
- "semantic-release": "semantic-release pre && npm publish && semantic-release post",
- "test": "tap test --reporter spec"
- },
- "version": "1.0.5"
-}
diff --git a/node_modules/node-gyp/node_modules/har-validator/LICENSE b/node_modules/node-gyp/node_modules/har-validator/LICENSE
deleted file mode 100644
index ca55c91af..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2015, Ahmad Nassri <ahmad@ahmadnassri.com>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/har-validator/README.md b/node_modules/node-gyp/node_modules/har-validator/README.md
deleted file mode 100644
index 77ff93501..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# HAR Validator [![version][npm-version]][npm-url] [![License][npm-license]][license-url]
-
-> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
-
-[![Build Status][travis-image]][travis-url]
-[![Downloads][npm-downloads]][npm-url]
-[![Code Climate][codeclimate-quality]][codeclimate-url]
-[![Coverage Status][codeclimate-coverage]][codeclimate-url]
-[![Dependency Status][dependencyci-image]][dependencyci-url]
-[![Dependencies][david-image]][david-url]
-
-## Install
-
-```bash
-npm install --only=production --save har-validator
-```
-
-## Usage
-
-I recommend using an optimized build matching your Node.js environment version, otherwise, the standard `require` would work just fine with any version of Node `>= v4.0` .
-
-```js
-/*
- * Node 7
- */
-const validate = require('har-validator/lib/node7')
-
-/*
- * Node 6
- */
-const validate = require('har-validator/lib/node6')
-
-/*
- * Node 4 (Default)
- */
-var validate = require('har-validator')
-```
-
-## CLI Usage
-
-Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info.
-
-## API
-
-**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward comptability with `v1.x` an [async/callback API](docs/async.md) is also provided*
-
-- [async API](docs/async.md)
-- [callback API](docs/async.md)
-- [Promise API](docs/promise.md) *(default)*
-
-----
-> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/) &nbsp;&middot;&nbsp;
-> License: [ISC][license-url] &nbsp;&middot;&nbsp;
-> Github: [@ahmadnassri](https://github.com/ahmadnassri) &nbsp;&middot;&nbsp;
-> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
-
-[license-url]: http://choosealicense.com/licenses/isc/
-
-[travis-url]: https://travis-ci.org/ahmadnassri/har-validator
-[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square
-
-[npm-url]: https://www.npmjs.com/package/har-validator
-[npm-license]: https://img.shields.io/npm/l/har-validator.svg?style=flat-square
-[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square
-[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square
-
-[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator
-[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square
-[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square
-
-[david-url]: https://david-dm.org/ahmadnassri/har-validator
-[david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square
-
-[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-validator
-[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-validator/badge?style=flat-square
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/browser/async.js b/node_modules/node-gyp/node_modules/har-validator/lib/browser/async.js
deleted file mode 100644
index 676356aaf..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/browser/async.js
+++ /dev/null
@@ -1,96 +0,0 @@
-import * as schemas from 'har-schema';
-import Ajv from 'ajv';
-import HARError from './error';
-
-let ajv;
-
-export function validate(name, data = {}, next) {
- // validator config
- ajv = ajv || new Ajv({
- allErrors: true,
- schemas: schemas
- });
-
- let validate = ajv.getSchema(name + '.json');
-
- let valid = validate(data);
-
- // callback?
- if (typeof next === 'function') {
- return next(!valid ? new HARError(validate.errors) : null, valid);
- }
-
- return valid;
-}
-
-export function afterRequest(data, next) {
- return validate('afterRequest', data, next);
-}
-
-export function beforeRequest(data, next) {
- return validate('beforeRequest', data, next);
-}
-
-export function browser(data, next) {
- return validate('browser', data, next);
-}
-
-export function cache(data, next) {
- return validate('cache', data, next);
-}
-
-export function content(data, next) {
- return validate('content', data, next);
-}
-
-export function cookie(data, next) {
- return validate('cookie', data, next);
-}
-
-export function creator(data, next) {
- return validate('creator', data, next);
-}
-
-export function entry(data, next) {
- return validate('entry', data, next);
-}
-
-export function har(data, next) {
- return validate('har', data, next);
-}
-
-export function header(data, next) {
- return validate('header', data, next);
-}
-
-export function log(data, next) {
- return validate('log', data, next);
-}
-
-export function page(data, next) {
- return validate('page', data, next);
-}
-
-export function pageTimings(data, next) {
- return validate('pageTimings', data, next);
-}
-
-export function postData(data, next) {
- return validate('postData', data, next);
-}
-
-export function query(data, next) {
- return validate('query', data, next);
-}
-
-export function request(data, next) {
- return validate('request', data, next);
-}
-
-export function response(data, next) {
- return validate('response', data, next);
-}
-
-export function timings(data, next) {
- return validate('timings', data, next);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/browser/error.js b/node_modules/node-gyp/node_modules/har-validator/lib/browser/error.js
deleted file mode 100644
index f49fcf231..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/browser/error.js
+++ /dev/null
@@ -1,15 +0,0 @@
-export default function HARError(errors) {
- let message = 'validation failed';
-
- this.name = 'HARError';
- this.message = message;
- this.errors = errors;
-
- if (typeof Error.captureStackTrace === 'function') {
- Error.captureStackTrace(this, this.constructor);
- } else {
- this.stack = new Error(message).stack;
- }
-}
-
-HARError.prototype = Error.prototype; \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/browser/promise.js b/node_modules/node-gyp/node_modules/har-validator/lib/browser/promise.js
deleted file mode 100644
index bc1b18c3f..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/browser/promise.js
+++ /dev/null
@@ -1,93 +0,0 @@
-import * as schemas from 'har-schema';
-import Ajv from 'ajv';
-import HARError from './error';
-
-let ajv;
-
-export function validate(name, data = {}) {
- // validator config
- ajv = ajv || new Ajv({
- allErrors: true,
- schemas: schemas
- });
-
- let validate = ajv.getSchema(name + '.json');
-
- return new Promise((resolve, reject) => {
- let valid = validate(data);
-
- !valid ? reject(new HARError(validate.errors)) : resolve(data);
- });
-}
-
-export function afterRequest(data) {
- return validate('afterRequest', data);
-}
-
-export function beforeRequest(data) {
- return validate('beforeRequest', data);
-}
-
-export function browser(data) {
- return validate('browser', data);
-}
-
-export function cache(data) {
- return validate('cache', data);
-}
-
-export function content(data) {
- return validate('content', data);
-}
-
-export function cookie(data) {
- return validate('cookie', data);
-}
-
-export function creator(data) {
- return validate('creator', data);
-}
-
-export function entry(data) {
- return validate('entry', data);
-}
-
-export function har(data) {
- return validate('har', data);
-}
-
-export function header(data) {
- return validate('header', data);
-}
-
-export function log(data) {
- return validate('log', data);
-}
-
-export function page(data) {
- return validate('page', data);
-}
-
-export function pageTimings(data) {
- return validate('pageTimings', data);
-}
-
-export function postData(data) {
- return validate('postData', data);
-}
-
-export function query(data) {
- return validate('query', data);
-}
-
-export function request(data) {
- return validate('request', data);
-}
-
-export function response(data) {
- return validate('response', data);
-}
-
-export function timings(data) {
- return validate('timings', data);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node4/async.js b/node_modules/node-gyp/node_modules/har-validator/lib/node4/async.js
deleted file mode 100644
index e9c485430..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node4/async.js
+++ /dev/null
@@ -1,136 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.validate = validate;
-exports.afterRequest = afterRequest;
-exports.beforeRequest = beforeRequest;
-exports.browser = browser;
-exports.cache = cache;
-exports.content = content;
-exports.cookie = cookie;
-exports.creator = creator;
-exports.entry = entry;
-exports.har = har;
-exports.header = header;
-exports.log = log;
-exports.page = page;
-exports.pageTimings = pageTimings;
-exports.postData = postData;
-exports.query = query;
-exports.request = request;
-exports.response = response;
-exports.timings = timings;
-
-var _harSchema = require('har-schema');
-
-var schemas = _interopRequireWildcard(_harSchema);
-
-var _ajv = require('ajv');
-
-var _ajv2 = _interopRequireDefault(_ajv);
-
-var _error = require('./error');
-
-var _error2 = _interopRequireDefault(_error);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-var ajv = void 0;
-
-function validate(name) {
- var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var next = arguments[2];
-
- // validator config
- ajv = ajv || new _ajv2.default({
- allErrors: true,
- schemas: schemas
- });
-
- var validate = ajv.getSchema(name + '.json');
-
- var valid = validate(data);
-
- // callback?
- if (typeof next === 'function') {
- return next(!valid ? new _error2.default(validate.errors) : null, valid);
- }
-
- return valid;
-}
-
-function afterRequest(data, next) {
- return validate('afterRequest', data, next);
-}
-
-function beforeRequest(data, next) {
- return validate('beforeRequest', data, next);
-}
-
-function browser(data, next) {
- return validate('browser', data, next);
-}
-
-function cache(data, next) {
- return validate('cache', data, next);
-}
-
-function content(data, next) {
- return validate('content', data, next);
-}
-
-function cookie(data, next) {
- return validate('cookie', data, next);
-}
-
-function creator(data, next) {
- return validate('creator', data, next);
-}
-
-function entry(data, next) {
- return validate('entry', data, next);
-}
-
-function har(data, next) {
- return validate('har', data, next);
-}
-
-function header(data, next) {
- return validate('header', data, next);
-}
-
-function log(data, next) {
- return validate('log', data, next);
-}
-
-function page(data, next) {
- return validate('page', data, next);
-}
-
-function pageTimings(data, next) {
- return validate('pageTimings', data, next);
-}
-
-function postData(data, next) {
- return validate('postData', data, next);
-}
-
-function query(data, next) {
- return validate('query', data, next);
-}
-
-function request(data, next) {
- return validate('request', data, next);
-}
-
-function response(data, next) {
- return validate('response', data, next);
-}
-
-function timings(data, next) {
- return validate('timings', data, next);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node4/error.js b/node_modules/node-gyp/node_modules/har-validator/lib/node4/error.js
deleted file mode 100644
index 0ae01bd18..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node4/error.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = HARError;
-function HARError(errors) {
- var message = 'validation failed';
-
- this.name = 'HARError';
- this.message = message;
- this.errors = errors;
-
- if (typeof Error.captureStackTrace === 'function') {
- Error.captureStackTrace(this, this.constructor);
- } else {
- this.stack = new Error(message).stack;
- }
-}
-
-HARError.prototype = Error.prototype;
-module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node4/promise.js b/node_modules/node-gyp/node_modules/har-validator/lib/node4/promise.js
deleted file mode 100644
index d37ca52ad..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node4/promise.js
+++ /dev/null
@@ -1,132 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.validate = validate;
-exports.afterRequest = afterRequest;
-exports.beforeRequest = beforeRequest;
-exports.browser = browser;
-exports.cache = cache;
-exports.content = content;
-exports.cookie = cookie;
-exports.creator = creator;
-exports.entry = entry;
-exports.har = har;
-exports.header = header;
-exports.log = log;
-exports.page = page;
-exports.pageTimings = pageTimings;
-exports.postData = postData;
-exports.query = query;
-exports.request = request;
-exports.response = response;
-exports.timings = timings;
-
-var _harSchema = require('har-schema');
-
-var schemas = _interopRequireWildcard(_harSchema);
-
-var _ajv = require('ajv');
-
-var _ajv2 = _interopRequireDefault(_ajv);
-
-var _error = require('./error');
-
-var _error2 = _interopRequireDefault(_error);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-var ajv = void 0;
-
-function validate(name) {
- var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- // validator config
- ajv = ajv || new _ajv2.default({
- allErrors: true,
- schemas: schemas
- });
-
- var validate = ajv.getSchema(name + '.json');
-
- return new Promise(function (resolve, reject) {
- var valid = validate(data);
-
- !valid ? reject(new _error2.default(validate.errors)) : resolve(data);
- });
-}
-
-function afterRequest(data) {
- return validate('afterRequest', data);
-}
-
-function beforeRequest(data) {
- return validate('beforeRequest', data);
-}
-
-function browser(data) {
- return validate('browser', data);
-}
-
-function cache(data) {
- return validate('cache', data);
-}
-
-function content(data) {
- return validate('content', data);
-}
-
-function cookie(data) {
- return validate('cookie', data);
-}
-
-function creator(data) {
- return validate('creator', data);
-}
-
-function entry(data) {
- return validate('entry', data);
-}
-
-function har(data) {
- return validate('har', data);
-}
-
-function header(data) {
- return validate('header', data);
-}
-
-function log(data) {
- return validate('log', data);
-}
-
-function page(data) {
- return validate('page', data);
-}
-
-function pageTimings(data) {
- return validate('pageTimings', data);
-}
-
-function postData(data) {
- return validate('postData', data);
-}
-
-function query(data) {
- return validate('query', data);
-}
-
-function request(data) {
- return validate('request', data);
-}
-
-function response(data) {
- return validate('response', data);
-}
-
-function timings(data) {
- return validate('timings', data);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node6/async.js b/node_modules/node-gyp/node_modules/har-validator/lib/node6/async.js
deleted file mode 100644
index e707043ad..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node6/async.js
+++ /dev/null
@@ -1,133 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.validate = validate;
-exports.afterRequest = afterRequest;
-exports.beforeRequest = beforeRequest;
-exports.browser = browser;
-exports.cache = cache;
-exports.content = content;
-exports.cookie = cookie;
-exports.creator = creator;
-exports.entry = entry;
-exports.har = har;
-exports.header = header;
-exports.log = log;
-exports.page = page;
-exports.pageTimings = pageTimings;
-exports.postData = postData;
-exports.query = query;
-exports.request = request;
-exports.response = response;
-exports.timings = timings;
-
-var _harSchema = require('har-schema');
-
-var schemas = _interopRequireWildcard(_harSchema);
-
-var _ajv = require('ajv');
-
-var _ajv2 = _interopRequireDefault(_ajv);
-
-var _error = require('./error');
-
-var _error2 = _interopRequireDefault(_error);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-let ajv;
-
-function validate(name, data = {}, next) {
- // validator config
- ajv = ajv || new _ajv2.default({
- allErrors: true,
- schemas: schemas
- });
-
- let validate = ajv.getSchema(name + '.json');
-
- let valid = validate(data);
-
- // callback?
- if (typeof next === 'function') {
- return next(!valid ? new _error2.default(validate.errors) : null, valid);
- }
-
- return valid;
-}
-
-function afterRequest(data, next) {
- return validate('afterRequest', data, next);
-}
-
-function beforeRequest(data, next) {
- return validate('beforeRequest', data, next);
-}
-
-function browser(data, next) {
- return validate('browser', data, next);
-}
-
-function cache(data, next) {
- return validate('cache', data, next);
-}
-
-function content(data, next) {
- return validate('content', data, next);
-}
-
-function cookie(data, next) {
- return validate('cookie', data, next);
-}
-
-function creator(data, next) {
- return validate('creator', data, next);
-}
-
-function entry(data, next) {
- return validate('entry', data, next);
-}
-
-function har(data, next) {
- return validate('har', data, next);
-}
-
-function header(data, next) {
- return validate('header', data, next);
-}
-
-function log(data, next) {
- return validate('log', data, next);
-}
-
-function page(data, next) {
- return validate('page', data, next);
-}
-
-function pageTimings(data, next) {
- return validate('pageTimings', data, next);
-}
-
-function postData(data, next) {
- return validate('postData', data, next);
-}
-
-function query(data, next) {
- return validate('query', data, next);
-}
-
-function request(data, next) {
- return validate('request', data, next);
-}
-
-function response(data, next) {
- return validate('response', data, next);
-}
-
-function timings(data, next) {
- return validate('timings', data, next);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node6/error.js b/node_modules/node-gyp/node_modules/har-validator/lib/node6/error.js
deleted file mode 100644
index 4149ed737..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node6/error.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = HARError;
-function HARError(errors) {
- let message = 'validation failed';
-
- this.name = 'HARError';
- this.message = message;
- this.errors = errors;
-
- if (typeof Error.captureStackTrace === 'function') {
- Error.captureStackTrace(this, this.constructor);
- } else {
- this.stack = new Error(message).stack;
- }
-}
-
-HARError.prototype = Error.prototype;
-module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node6/promise.js b/node_modules/node-gyp/node_modules/har-validator/lib/node6/promise.js
deleted file mode 100644
index be7017ae0..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node6/promise.js
+++ /dev/null
@@ -1,130 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.validate = validate;
-exports.afterRequest = afterRequest;
-exports.beforeRequest = beforeRequest;
-exports.browser = browser;
-exports.cache = cache;
-exports.content = content;
-exports.cookie = cookie;
-exports.creator = creator;
-exports.entry = entry;
-exports.har = har;
-exports.header = header;
-exports.log = log;
-exports.page = page;
-exports.pageTimings = pageTimings;
-exports.postData = postData;
-exports.query = query;
-exports.request = request;
-exports.response = response;
-exports.timings = timings;
-
-var _harSchema = require('har-schema');
-
-var schemas = _interopRequireWildcard(_harSchema);
-
-var _ajv = require('ajv');
-
-var _ajv2 = _interopRequireDefault(_ajv);
-
-var _error = require('./error');
-
-var _error2 = _interopRequireDefault(_error);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-let ajv;
-
-function validate(name, data = {}) {
- // validator config
- ajv = ajv || new _ajv2.default({
- allErrors: true,
- schemas: schemas
- });
-
- let validate = ajv.getSchema(name + '.json');
-
- return new Promise((resolve, reject) => {
- let valid = validate(data);
-
- !valid ? reject(new _error2.default(validate.errors)) : resolve(data);
- });
-}
-
-function afterRequest(data) {
- return validate('afterRequest', data);
-}
-
-function beforeRequest(data) {
- return validate('beforeRequest', data);
-}
-
-function browser(data) {
- return validate('browser', data);
-}
-
-function cache(data) {
- return validate('cache', data);
-}
-
-function content(data) {
- return validate('content', data);
-}
-
-function cookie(data) {
- return validate('cookie', data);
-}
-
-function creator(data) {
- return validate('creator', data);
-}
-
-function entry(data) {
- return validate('entry', data);
-}
-
-function har(data) {
- return validate('har', data);
-}
-
-function header(data) {
- return validate('header', data);
-}
-
-function log(data) {
- return validate('log', data);
-}
-
-function page(data) {
- return validate('page', data);
-}
-
-function pageTimings(data) {
- return validate('pageTimings', data);
-}
-
-function postData(data) {
- return validate('postData', data);
-}
-
-function query(data) {
- return validate('query', data);
-}
-
-function request(data) {
- return validate('request', data);
-}
-
-function response(data) {
- return validate('response', data);
-}
-
-function timings(data) {
- return validate('timings', data);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node7/async.js b/node_modules/node-gyp/node_modules/har-validator/lib/node7/async.js
deleted file mode 100644
index e707043ad..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node7/async.js
+++ /dev/null
@@ -1,133 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.validate = validate;
-exports.afterRequest = afterRequest;
-exports.beforeRequest = beforeRequest;
-exports.browser = browser;
-exports.cache = cache;
-exports.content = content;
-exports.cookie = cookie;
-exports.creator = creator;
-exports.entry = entry;
-exports.har = har;
-exports.header = header;
-exports.log = log;
-exports.page = page;
-exports.pageTimings = pageTimings;
-exports.postData = postData;
-exports.query = query;
-exports.request = request;
-exports.response = response;
-exports.timings = timings;
-
-var _harSchema = require('har-schema');
-
-var schemas = _interopRequireWildcard(_harSchema);
-
-var _ajv = require('ajv');
-
-var _ajv2 = _interopRequireDefault(_ajv);
-
-var _error = require('./error');
-
-var _error2 = _interopRequireDefault(_error);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-let ajv;
-
-function validate(name, data = {}, next) {
- // validator config
- ajv = ajv || new _ajv2.default({
- allErrors: true,
- schemas: schemas
- });
-
- let validate = ajv.getSchema(name + '.json');
-
- let valid = validate(data);
-
- // callback?
- if (typeof next === 'function') {
- return next(!valid ? new _error2.default(validate.errors) : null, valid);
- }
-
- return valid;
-}
-
-function afterRequest(data, next) {
- return validate('afterRequest', data, next);
-}
-
-function beforeRequest(data, next) {
- return validate('beforeRequest', data, next);
-}
-
-function browser(data, next) {
- return validate('browser', data, next);
-}
-
-function cache(data, next) {
- return validate('cache', data, next);
-}
-
-function content(data, next) {
- return validate('content', data, next);
-}
-
-function cookie(data, next) {
- return validate('cookie', data, next);
-}
-
-function creator(data, next) {
- return validate('creator', data, next);
-}
-
-function entry(data, next) {
- return validate('entry', data, next);
-}
-
-function har(data, next) {
- return validate('har', data, next);
-}
-
-function header(data, next) {
- return validate('header', data, next);
-}
-
-function log(data, next) {
- return validate('log', data, next);
-}
-
-function page(data, next) {
- return validate('page', data, next);
-}
-
-function pageTimings(data, next) {
- return validate('pageTimings', data, next);
-}
-
-function postData(data, next) {
- return validate('postData', data, next);
-}
-
-function query(data, next) {
- return validate('query', data, next);
-}
-
-function request(data, next) {
- return validate('request', data, next);
-}
-
-function response(data, next) {
- return validate('response', data, next);
-}
-
-function timings(data, next) {
- return validate('timings', data, next);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node7/error.js b/node_modules/node-gyp/node_modules/har-validator/lib/node7/error.js
deleted file mode 100644
index 4149ed737..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node7/error.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = HARError;
-function HARError(errors) {
- let message = 'validation failed';
-
- this.name = 'HARError';
- this.message = message;
- this.errors = errors;
-
- if (typeof Error.captureStackTrace === 'function') {
- Error.captureStackTrace(this, this.constructor);
- } else {
- this.stack = new Error(message).stack;
- }
-}
-
-HARError.prototype = Error.prototype;
-module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/lib/node7/promise.js b/node_modules/node-gyp/node_modules/har-validator/lib/node7/promise.js
deleted file mode 100644
index be7017ae0..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/lib/node7/promise.js
+++ /dev/null
@@ -1,130 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.validate = validate;
-exports.afterRequest = afterRequest;
-exports.beforeRequest = beforeRequest;
-exports.browser = browser;
-exports.cache = cache;
-exports.content = content;
-exports.cookie = cookie;
-exports.creator = creator;
-exports.entry = entry;
-exports.har = har;
-exports.header = header;
-exports.log = log;
-exports.page = page;
-exports.pageTimings = pageTimings;
-exports.postData = postData;
-exports.query = query;
-exports.request = request;
-exports.response = response;
-exports.timings = timings;
-
-var _harSchema = require('har-schema');
-
-var schemas = _interopRequireWildcard(_harSchema);
-
-var _ajv = require('ajv');
-
-var _ajv2 = _interopRequireDefault(_ajv);
-
-var _error = require('./error');
-
-var _error2 = _interopRequireDefault(_error);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-let ajv;
-
-function validate(name, data = {}) {
- // validator config
- ajv = ajv || new _ajv2.default({
- allErrors: true,
- schemas: schemas
- });
-
- let validate = ajv.getSchema(name + '.json');
-
- return new Promise((resolve, reject) => {
- let valid = validate(data);
-
- !valid ? reject(new _error2.default(validate.errors)) : resolve(data);
- });
-}
-
-function afterRequest(data) {
- return validate('afterRequest', data);
-}
-
-function beforeRequest(data) {
- return validate('beforeRequest', data);
-}
-
-function browser(data) {
- return validate('browser', data);
-}
-
-function cache(data) {
- return validate('cache', data);
-}
-
-function content(data) {
- return validate('content', data);
-}
-
-function cookie(data) {
- return validate('cookie', data);
-}
-
-function creator(data) {
- return validate('creator', data);
-}
-
-function entry(data) {
- return validate('entry', data);
-}
-
-function har(data) {
- return validate('har', data);
-}
-
-function header(data) {
- return validate('header', data);
-}
-
-function log(data) {
- return validate('log', data);
-}
-
-function page(data) {
- return validate('page', data);
-}
-
-function pageTimings(data) {
- return validate('pageTimings', data);
-}
-
-function postData(data) {
- return validate('postData', data);
-}
-
-function query(data) {
- return validate('query', data);
-}
-
-function request(data) {
- return validate('request', data);
-}
-
-function response(data) {
- return validate('response', data);
-}
-
-function timings(data) {
- return validate('timings', data);
-} \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/har-validator/package.json b/node_modules/node-gyp/node_modules/har-validator/package.json
deleted file mode 100644
index bdf3c59a7..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/package.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "_from": "har-validator@~4.2.1",
- "_id": "har-validator@4.2.1",
- "_inBundle": false,
- "_integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
- "_location": "/node-gyp/har-validator",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "har-validator@~4.2.1",
- "name": "har-validator",
- "escapedName": "har-validator",
- "rawSpec": "~4.2.1",
- "saveSpec": null,
- "fetchSpec": "~4.2.1"
- },
- "_requiredBy": [
- "/node-gyp/request"
- ],
- "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
- "_shasum": "33481d0f1bbff600dd203d75812a6a5fba002e2a",
- "_spec": "har-validator@~4.2.1",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/request",
- "author": {
- "name": "Ahmad Nassri",
- "email": "ahmad@ahmadnassri.com",
- "url": "https://www.ahmadnassri.com/"
- },
- "bugs": {
- "url": "https://github.com/ahmadnassri/har-validator/issues"
- },
- "bundleDependencies": false,
- "config": {
- "commitizen": {
- "path": "./node_modules/cz-conventional-changelog"
- }
- },
- "dependencies": {
- "ajv": "^4.9.1",
- "har-schema": "^1.0.5"
- },
- "deprecated": false,
- "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
- "devDependencies": {
- "babel-cli": "^6.18.0",
- "babel-plugin-add-module-exports": "^0.2.1",
- "babel-preset-env": "1.1.10",
- "babel-register": "^6.18.0",
- "codeclimate-test-reporter": "^0.4.0",
- "cz-conventional-changelog": "^1.2.0",
- "echint": "^4.0.1",
- "semantic-release": "^6.3.2",
- "snazzy": "^6.0.0",
- "tap": "^10.0.0"
- },
- "echint": {
- "ignore": [
- "lib/**"
- ]
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "lib",
- "src"
- ],
- "homepage": "https://github.com/ahmadnassri/har-validator",
- "keywords": [
- "har",
- "cli",
- "ajv",
- "http",
- "archive",
- "validate",
- "validator"
- ],
- "license": "ISC",
- "main": "lib/node4/promise.js",
- "name": "har-validator",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/ahmadnassri/har-validator.git"
- },
- "scripts": {
- "codeclimate": "BABEL_ENV=test tap --coverage-report=text-lcov | codeclimate-test-reporter",
- "compile": "babel -q src",
- "coverage": "BABEL_ENV=test tap test --reporter silent --coverage --nyc-arg=--require --nyc-arg=babel-register",
- "pretest": "snazzy && echint",
- "semantic-release": "semantic-release pre && npm publish && semantic-release post",
- "test": "BABEL_ENV=test tap test --reporter spec --node-arg=--require --node-arg=babel-register",
- "test-one": "BABEL_ENV=test tap --reporter spec --node-arg=--require --node-arg=babel-register"
- },
- "standard": {
- "ignore": [
- "lib/**"
- ]
- },
- "version": "4.2.1"
-}
diff --git a/node_modules/node-gyp/node_modules/har-validator/src/async.js b/node_modules/node-gyp/node_modules/har-validator/src/async.js
deleted file mode 100644
index 5b9874111..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/src/async.js
+++ /dev/null
@@ -1,96 +0,0 @@
-import * as schemas from 'har-schema'
-import Ajv from 'ajv'
-import HARError from './error'
-
-let ajv
-
-export function validate (name, data = {}, next) {
- // validator config
- ajv = ajv || new Ajv({
- allErrors: true,
- schemas: schemas
- })
-
- let validate = ajv.getSchema(name + '.json')
-
- let valid = validate(data)
-
- // callback?
- if (typeof next === 'function') {
- return next(!valid ? new HARError(validate.errors) : null, valid)
- }
-
- return valid
-}
-
-export function afterRequest (data, next) {
- return validate('afterRequest', data, next)
-}
-
-export function beforeRequest (data, next) {
- return validate('beforeRequest', data, next)
-}
-
-export function browser (data, next) {
- return validate('browser', data, next)
-}
-
-export function cache (data, next) {
- return validate('cache', data, next)
-}
-
-export function content (data, next) {
- return validate('content', data, next)
-}
-
-export function cookie (data, next) {
- return validate('cookie', data, next)
-}
-
-export function creator (data, next) {
- return validate('creator', data, next)
-}
-
-export function entry (data, next) {
- return validate('entry', data, next)
-}
-
-export function har (data, next) {
- return validate('har', data, next)
-}
-
-export function header (data, next) {
- return validate('header', data, next)
-}
-
-export function log (data, next) {
- return validate('log', data, next)
-}
-
-export function page (data, next) {
- return validate('page', data, next)
-}
-
-export function pageTimings (data, next) {
- return validate('pageTimings', data, next)
-}
-
-export function postData (data, next) {
- return validate('postData', data, next)
-}
-
-export function query (data, next) {
- return validate('query', data, next)
-}
-
-export function request (data, next) {
- return validate('request', data, next)
-}
-
-export function response (data, next) {
- return validate('response', data, next)
-}
-
-export function timings (data, next) {
- return validate('timings', data, next)
-}
diff --git a/node_modules/node-gyp/node_modules/har-validator/src/error.js b/node_modules/node-gyp/node_modules/har-validator/src/error.js
deleted file mode 100644
index f0707eb35..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/src/error.js
+++ /dev/null
@@ -1,15 +0,0 @@
-export default function HARError (errors) {
- let message = 'validation failed'
-
- this.name = 'HARError'
- this.message = message
- this.errors = errors
-
- if (typeof Error.captureStackTrace === 'function') {
- Error.captureStackTrace(this, this.constructor)
- } else {
- this.stack = (new Error(message)).stack
- }
-}
-
-HARError.prototype = Error.prototype
diff --git a/node_modules/node-gyp/node_modules/har-validator/src/promise.js b/node_modules/node-gyp/node_modules/har-validator/src/promise.js
deleted file mode 100644
index 57b067997..000000000
--- a/node_modules/node-gyp/node_modules/har-validator/src/promise.js
+++ /dev/null
@@ -1,93 +0,0 @@
-import * as schemas from 'har-schema'
-import Ajv from 'ajv'
-import HARError from './error'
-
-let ajv
-
-export function validate (name, data = {}) {
- // validator config
- ajv = ajv || new Ajv({
- allErrors: true,
- schemas: schemas
- })
-
- let validate = ajv.getSchema(name + '.json')
-
- return new Promise((resolve, reject) => {
- let valid = validate(data)
-
- !valid ? reject(new HARError(validate.errors)) : resolve(data)
- })
-}
-
-export function afterRequest (data) {
- return validate('afterRequest', data)
-}
-
-export function beforeRequest (data) {
- return validate('beforeRequest', data)
-}
-
-export function browser (data) {
- return validate('browser', data)
-}
-
-export function cache (data) {
- return validate('cache', data)
-}
-
-export function content (data) {
- return validate('content', data)
-}
-
-export function cookie (data) {
- return validate('cookie', data)
-}
-
-export function creator (data) {
- return validate('creator', data)
-}
-
-export function entry (data) {
- return validate('entry', data)
-}
-
-export function har (data) {
- return validate('har', data)
-}
-
-export function header (data) {
- return validate('header', data)
-}
-
-export function log (data) {
- return validate('log', data)
-}
-
-export function page (data) {
- return validate('page', data)
-}
-
-export function pageTimings (data) {
- return validate('pageTimings', data)
-}
-
-export function postData (data) {
- return validate('postData', data)
-}
-
-export function query (data) {
- return validate('query', data)
-}
-
-export function request (data) {
- return validate('request', data)
-}
-
-export function response (data) {
- return validate('response', data)
-}
-
-export function timings (data) {
- return validate('timings', data)
-}
diff --git a/node_modules/node-gyp/node_modules/http-signature/.npmignore b/node_modules/node-gyp/node_modules/http-signature/.npmignore
deleted file mode 100644
index c143fb3a4..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.gitmodules
-deps
-docs
-Makefile
-node_modules
-test
-tools \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/http-signature/CHANGES.md b/node_modules/node-gyp/node_modules/http-signature/CHANGES.md
deleted file mode 100644
index 6f69444ba..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/CHANGES.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# node-http-signature changelog
-
-## 1.1.1
-
-- Version of dependency `assert-plus` updated: old version was missing
- some license information
-- Corrected examples in `http_signing.md`, added auto-tests to
- automatically validate these examples
-
-## 1.1.0
-
-- Bump version of `sshpk` dependency, remove peerDependency on it since
- it now supports exchanging objects between multiple versions of itself
- where possible
-
-## 1.0.2
-
-- Bump min version of `jsprim` dependency, to include fixes for using
- http-signature with `browserify`
-
-## 1.0.1
-
-- Bump minimum version of `sshpk` dependency, to include fixes for
- whitespace tolerance in key parsing.
-
-## 1.0.0
-
-- First semver release.
-- #36: Ensure verifySignature does not leak useful timing information
-- #42: Bring the library up to the latest version of the spec (including the
- request-target changes)
-- Support for ECDSA keys and signatures.
-- Now uses `sshpk` for key parsing, validation and conversion.
-- Fixes for #21, #47, #39 and compatibility with node 0.8
-
-## 0.11.0
-
-- Split up HMAC and Signature verification to avoid vulnerabilities where a
- key intended for use with one can be validated against the other method
- instead.
-
-## 0.10.2
-
-- Updated versions of most dependencies.
-- Utility functions exported for PEM => SSH-RSA conversion.
-- Improvements to tests and examples.
diff --git a/node_modules/node-gyp/node_modules/http-signature/LICENSE b/node_modules/node-gyp/node_modules/http-signature/LICENSE
deleted file mode 100644
index f6d947d2f..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright Joyent, Inc. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/http-signature/README.md b/node_modules/node-gyp/node_modules/http-signature/README.md
deleted file mode 100644
index de487d323..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/README.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# node-http-signature
-
-node-http-signature is a node.js library that has client and server components
-for Joyent's [HTTP Signature Scheme](http_signing.md).
-
-## Usage
-
-Note the example below signs a request with the same key/cert used to start an
-HTTP server. This is almost certainly not what you actually want, but is just
-used to illustrate the API calls; you will need to provide your own key
-management in addition to this library.
-
-### Client
-
-```js
-var fs = require('fs');
-var https = require('https');
-var httpSignature = require('http-signature');
-
-var key = fs.readFileSync('./key.pem', 'ascii');
-
-var options = {
- host: 'localhost',
- port: 8443,
- path: '/',
- method: 'GET',
- headers: {}
-};
-
-// Adds a 'Date' header in, signs it, and adds the
-// 'Authorization' header in.
-var req = https.request(options, function(res) {
- console.log(res.statusCode);
-});
-
-
-httpSignature.sign(req, {
- key: key,
- keyId: './cert.pem'
-});
-
-req.end();
-```
-
-### Server
-
-```js
-var fs = require('fs');
-var https = require('https');
-var httpSignature = require('http-signature');
-
-var options = {
- key: fs.readFileSync('./key.pem'),
- cert: fs.readFileSync('./cert.pem')
-};
-
-https.createServer(options, function (req, res) {
- var rc = 200;
- var parsed = httpSignature.parseRequest(req);
- var pub = fs.readFileSync(parsed.keyId, 'ascii');
- if (!httpSignature.verifySignature(parsed, pub))
- rc = 401;
-
- res.writeHead(rc);
- res.end();
-}).listen(8443);
-```
-
-## Installation
-
- npm install http-signature
-
-## License
-
-MIT.
-
-## Bugs
-
-See <https://github.com/joyent/node-http-signature/issues>.
diff --git a/node_modules/node-gyp/node_modules/http-signature/http_signing.md b/node_modules/node-gyp/node_modules/http-signature/http_signing.md
deleted file mode 100644
index 4f24d28c3..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/http_signing.md
+++ /dev/null
@@ -1,363 +0,0 @@
-# Abstract
-
-This document describes a way to add origin authentication, message integrity,
-and replay resistance to HTTP REST requests. It is intended to be used over
-the HTTPS protocol.
-
-# Copyright Notice
-
-Copyright (c) 2011 Joyent, Inc. and the persons identified as document authors.
-All rights reserved.
-
-Code Components extracted from this document must include MIT License text.
-
-# Introduction
-
-This protocol is intended to provide a standard way for clients to sign HTTP
-requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication
-mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely
-employed on the Internet today. However, it is common place that the burdens of
-PKI prevent web service operators from deploying that methodology, and so many
-fall back to Basic authentication, which has poor security characteristics.
-
-Additionally, OAuth provides a fully-specified alternative for authorization
-of web service requests, but is not (always) ideal for machine to machine
-communication, as the key acquisition steps (generally) imply a fixed
-infrastructure that may not make sense to a service provider (e.g., symmetric
-keys).
-
-Several web service providers have invented their own schemes for signing
-HTTP requests, but to date, none have been placed in the public domain as a
-standard. This document serves that purpose. There are no techniques in this
-proposal that are novel beyond previous art, however, this aims to be a simple
-mechanism for signing these requests.
-
-# Signature Authentication Scheme
-
-The "signature" authentication scheme is based on the model that the client must
-authenticate itself with a digital signature produced by either a private
-asymmetric key (e.g., RSA) or a shared symmetric key (e.g., HMAC). The scheme
-is parameterized enough such that it is not bound to any particular key type or
-signing algorithm. However, it does explicitly assume that clients can send an
-HTTP `Date` header.
-
-## Authorization Header
-
-The client is expected to send an Authorization header (as defined in RFC 2617)
-with the following parameterization:
-
- credentials := "Signature" params
- params := 1#(keyId | algorithm | [headers] | [ext] | signature)
- digitalSignature := plain-string
-
- keyId := "keyId" "=" <"> plain-string <">
- algorithm := "algorithm" "=" <"> plain-string <">
- headers := "headers" "=" <"> 1#headers-value <">
- ext := "ext" "=" <"> plain-string <">
- signature := "signature" "=" <"> plain-string <">
-
- headers-value := plain-string
- plain-string = 1*( %x20-21 / %x23-5B / %x5D-7E )
-
-### Signature Parameters
-
-#### keyId
-
-REQUIRED. The `keyId` field is an opaque string that the server can use to look
-up the component they need to validate the signature. It could be an SSH key
-fingerprint, an LDAP DN, etc. Management of keys and assignment of `keyId` is
-out of scope for this document.
-
-#### algorithm
-
-REQUIRED. The `algorithm` parameter is used if the client and server agree on a
-non-standard digital signature algorithm. The full list of supported signature
-mechanisms is listed below.
-
-#### headers
-
-OPTIONAL. The `headers` parameter is used to specify the list of HTTP headers
-used to sign the request. If specified, it should be a quoted list of HTTP
-header names, separated by a single space character. By default, only one
-HTTP header is signed, which is the `Date` header. Note that the list MUST be
-specified in the order the values are concatenated together during signing. To
-include the HTTP request line in the signature calculation, use the special
-`request-line` value. While this is overloading the definition of `headers` in
-HTTP linguism, the request-line is defined in RFC 2616, and as the outlier from
-headers in useful signature calculation, it is deemed simpler to simply use
-`request-line` than to add a separate parameter for it.
-
-#### extensions
-
-OPTIONAL. The `extensions` parameter is used to include additional information
-which is covered by the request. The content and format of the string is out of
-scope for this document, and expected to be specified by implementors.
-
-#### signature
-
-REQUIRED. The `signature` parameter is a `Base64` encoded digital signature
-generated by the client. The client uses the `algorithm` and `headers` request
-parameters to form a canonicalized `signing string`. This `signing string` is
-then signed with the key associated with `keyId` and the algorithm
-corresponding to `algorithm`. The `signature` parameter is then set to the
-`Base64` encoding of the signature.
-
-### Signing String Composition
-
-In order to generate the string that is signed with a key, the client MUST take
-the values of each HTTP header specified by `headers` in the order they appear.
-
-1. If the header name is not `request-line` then append the lowercased header
- name followed with an ASCII colon `:` and an ASCII space ` `.
-2. If the header name is `request-line` then append the HTTP request line,
- otherwise append the header value.
-3. If value is not the last value then append an ASCII newline `\n`. The string
- MUST NOT include a trailing ASCII newline.
-
-# Example Requests
-
-All requests refer to the following request (body omitted):
-
- POST /foo HTTP/1.1
- Host: example.org
- Date: Tue, 07 Jun 2014 20:51:35 GMT
- Content-Type: application/json
- Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
- Content-Length: 18
-
-The "rsa-key-1" keyId refers to a private key known to the client and a public
-key known to the server. The "hmac-key-1" keyId refers to key known to the
-client and server.
-
-## Default parameterization
-
-The authorization header and signature would be generated as:
-
- Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",signature="Base64(RSA-SHA256(signing string))"
-
-The client would compose the signing string as:
-
- date: Tue, 07 Jun 2014 20:51:35 GMT
-
-## Header List
-
-The authorization header and signature would be generated as:
-
- Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="(request-target) date content-type digest",signature="Base64(RSA-SHA256(signing string))"
-
-The client would compose the signing string as (`+ "\n"` inserted for
-readability):
-
- (request-target) post /foo + "\n"
- date: Tue, 07 Jun 2011 20:51:35 GMT + "\n"
- content-type: application/json + "\n"
- digest: SHA-256=Base64(SHA256(Body))
-
-## Algorithm
-
-The authorization header and signature would be generated as:
-
- Authorization: Signature keyId="hmac-key-1",algorithm="hmac-sha1",signature="Base64(HMAC-SHA1(signing string))"
-
-The client would compose the signing string as:
-
- date: Tue, 07 Jun 2011 20:51:35 GMT
-
-# Signing Algorithms
-
-Currently supported algorithm names are:
-
-* rsa-sha1
-* rsa-sha256
-* rsa-sha512
-* dsa-sha1
-* hmac-sha1
-* hmac-sha256
-* hmac-sha512
-
-# Security Considerations
-
-## Default Parameters
-
-Note the default parameterization of the `Signature` scheme is only safe if all
-requests are carried over a secure transport (i.e., TLS). Sending the default
-scheme over a non-secure transport will leave the request vulnerable to
-spoofing, tampering, replay/repudiation, and integrity violations (if using the
-STRIDE threat-modeling methodology).
-
-## Insecure Transports
-
-If sending the request over plain HTTP, service providers SHOULD require clients
-to sign ALL HTTP headers, and the `request-line`. Additionally, service
-providers SHOULD require `Content-MD5` calculations to be performed to ensure
-against any tampering from clients.
-
-## Nonces
-
-Nonces are out of scope for this document simply because many service providers
-fail to implement them correctly, or do not adopt security specifications
-because of the infrastructure complexity. Given the `header` parameterization,
-a service provider is fully enabled to add nonce semantics into this scheme by
-using something like an `x-request-nonce` header, and ensuring it is signed
-with the `Date` header.
-
-## Clock Skew
-
-As the default scheme is to sign the `Date` header, service providers SHOULD
-protect against logged replay attacks by enforcing a clock skew. The server
-SHOULD be synchronized with NTP, and the recommendation in this specification
-is to allow 300s of clock skew (in either direction).
-
-## Required Headers to Sign
-
-It is out of scope for this document to dictate what headers a service provider
-will want to enforce, but service providers SHOULD at minimum include the
-`Date` header.
-
-# References
-
-## Normative References
-
-* [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1
-* [RFC2617] HTTP Authentication: Basic and Digest Access Authentication
-* [RFC5246] The Transport Layer Security (TLS) Protocol Version 1.2
-
-## Informative References
-
- Name: Mark Cavage (editor)
- Company: Joyent, Inc.
- Email: mark.cavage@joyent.com
- URI: http://www.joyent.com
-
-# Appendix A - Test Values
-
-The following test data uses the RSA (1024b) keys, which we will refer
-to as `keyId=Test` in the following samples:
-
- -----BEGIN PUBLIC KEY-----
- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3
- 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6
- Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw
- oYi+1hqp1fIekaxsyQIDAQAB
- -----END PUBLIC KEY-----
-
- -----BEGIN RSA PRIVATE KEY-----
- MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF
- NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F
- UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB
- AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA
- QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK
- kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg
- f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u
- 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc
- mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7
- kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA
- gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW
- G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI
- 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA==
- -----END RSA PRIVATE KEY-----
-
-And all examples use this request:
-
-<!-- httpreq -->
-
- POST /foo?param=value&pet=dog HTTP/1.1
- Host: example.com
- Date: Thu, 05 Jan 2014 21:31:40 GMT
- Content-Type: application/json
- Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
- Content-Length: 18
-
- {"hello": "world"}
-
-<!-- /httpreq -->
-
-### Default
-
-The string to sign would be:
-
-<!-- sign {"name": "Default", "options": {"keyId":"Test", "algorithm": "rsa-sha256"}} -->
-<!-- signstring -->
-
- date: Thu, 05 Jan 2014 21:31:40 GMT
-
-<!-- /signstring -->
-
-The Authorization header would be:
-
-<!-- authz -->
-
- Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="date",signature="jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9HpFQlG7N4YcJPteKTu4MWCLyk+gIr0wDgqtLWf9NLpMAMimdfsH7FSWGfbMFSrsVTHNTk0rK3usrfFnti1dxsM4jl0kYJCKTGI/UWkqiaxwNiKqGcdlEDrTcUhhsFsOIo8VhddmZTZ8w="
-
-<!-- /authz -->
-
-### All Headers
-
-Parameterized to include all headers, the string to sign would be (`+ "\n"`
-inserted for readability):
-
-<!-- sign {"name": "All Headers", "options": {"keyId":"Test", "algorithm": "rsa-sha256", "headers": ["(request-target)", "host", "date", "content-type", "digest", "content-length"]}} -->
-<!-- signstring -->
-
- (request-target): post /foo?param=value&pet=dog
- host: example.com
- date: Thu, 05 Jan 2014 21:31:40 GMT
- content-type: application/json
- digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
- content-length: 18
-
-<!-- /signstring -->
-
-The Authorization header would be:
-
-<!-- authz -->
-
- Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="(request-target) host date content-type digest content-length",signature="Ef7MlxLXoBovhil3AlyjtBwAL9g4TN3tibLj7uuNB3CROat/9KaeQ4hW2NiJ+pZ6HQEOx9vYZAyi+7cmIkmJszJCut5kQLAwuX+Ms/mUFvpKlSo9StS2bMXDBNjOh4Auj774GFj4gwjS+3NhFeoqyr/MuN6HsEnkvn6zdgfE2i0="
-
-<!-- /authz -->
-
-## Generating and verifying signatures using `openssl`
-
-The `openssl` commandline tool can be used to generate or verify the signatures listed above.
-
-Compose the signing string as usual, and pipe it into the the `openssl dgst` command, then into `openssl enc -base64`, as follows:
-
- $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
- openssl dgst -binary -sign /path/to/private.pem -sha256 | \
- openssl enc -base64
- jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9Hp...
- $
-
-The `-sha256` option is necessary to produce an `rsa-sha256` signature. You can select other hash algorithms such as `sha1` by changing this argument.
-
-To verify a signature, first save the signature data, Base64-decoded, into a file, then use `openssl dgst` again with the `-verify` option:
-
- $ echo 'jKyvPcxB4JbmYY4mByy...' | openssl enc -A -d -base64 > signature
- $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
- openssl dgst -sha256 -verify /path/to/public.pem -signature ./signature
- Verified OK
- $
-
-## Generating and verifying signatures using `sshpk-sign`
-
-You can also generate and check signatures using the `sshpk-sign` tool which is
-included with the `sshpk` package in `npm`.
-
-Compose the signing string as above, and pipe it into `sshpk-sign` as follows:
-
- $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
- sshpk-sign -i /path/to/private.pem
- jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9Hp...
- $
-
-This will produce an `rsa-sha256` signature by default, as you can see using
-the `-v` option:
-
- sshpk-sign: using rsa-sha256 with a 1024 bit key
-
-You can also use `sshpk-verify` in a similar manner:
-
- $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
- sshpk-verify -i ./public.pem -s 'jKyvPcxB4JbmYY...'
- OK
- $
diff --git a/node_modules/node-gyp/node_modules/http-signature/lib/index.js b/node_modules/node-gyp/node_modules/http-signature/lib/index.js
deleted file mode 100644
index 54d46030f..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/lib/index.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 Joyent, Inc.
-
-var parser = require('./parser');
-var signer = require('./signer');
-var verify = require('./verify');
-var utils = require('./utils');
-
-
-
-///--- API
-
-module.exports = {
-
- parse: parser.parseRequest,
- parseRequest: parser.parseRequest,
-
- sign: signer.signRequest,
- signRequest: signer.signRequest,
- createSigner: signer.createSigner,
- isSigner: signer.isSigner,
-
- sshKeyToPEM: utils.sshKeyToPEM,
- sshKeyFingerprint: utils.fingerprint,
- pemToRsaSSHKey: utils.pemToRsaSSHKey,
-
- verify: verify.verifySignature,
- verifySignature: verify.verifySignature,
- verifyHMAC: verify.verifyHMAC
-};
diff --git a/node_modules/node-gyp/node_modules/http-signature/lib/parser.js b/node_modules/node-gyp/node_modules/http-signature/lib/parser.js
deleted file mode 100644
index 7c841b317..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/lib/parser.js
+++ /dev/null
@@ -1,318 +0,0 @@
-// Copyright 2012 Joyent, Inc. All rights reserved.
-
-var assert = require('assert-plus');
-var util = require('util');
-var utils = require('./utils');
-
-
-
-///--- Globals
-
-var HASH_ALGOS = utils.HASH_ALGOS;
-var PK_ALGOS = utils.PK_ALGOS;
-var HttpSignatureError = utils.HttpSignatureError;
-var InvalidAlgorithmError = utils.InvalidAlgorithmError;
-var validateAlgorithm = utils.validateAlgorithm;
-
-var State = {
- New: 0,
- Params: 1
-};
-
-var ParamsState = {
- Name: 0,
- Quote: 1,
- Value: 2,
- Comma: 3
-};
-
-
-///--- Specific Errors
-
-
-function ExpiredRequestError(message) {
- HttpSignatureError.call(this, message, ExpiredRequestError);
-}
-util.inherits(ExpiredRequestError, HttpSignatureError);
-
-
-function InvalidHeaderError(message) {
- HttpSignatureError.call(this, message, InvalidHeaderError);
-}
-util.inherits(InvalidHeaderError, HttpSignatureError);
-
-
-function InvalidParamsError(message) {
- HttpSignatureError.call(this, message, InvalidParamsError);
-}
-util.inherits(InvalidParamsError, HttpSignatureError);
-
-
-function MissingHeaderError(message) {
- HttpSignatureError.call(this, message, MissingHeaderError);
-}
-util.inherits(MissingHeaderError, HttpSignatureError);
-
-function StrictParsingError(message) {
- HttpSignatureError.call(this, message, StrictParsingError);
-}
-util.inherits(StrictParsingError, HttpSignatureError);
-
-///--- Exported API
-
-module.exports = {
-
- /**
- * Parses the 'Authorization' header out of an http.ServerRequest object.
- *
- * Note that this API will fully validate the Authorization header, and throw
- * on any error. It will not however check the signature, or the keyId format
- * as those are specific to your environment. You can use the options object
- * to pass in extra constraints.
- *
- * As a response object you can expect this:
- *
- * {
- * "scheme": "Signature",
- * "params": {
- * "keyId": "foo",
- * "algorithm": "rsa-sha256",
- * "headers": [
- * "date" or "x-date",
- * "digest"
- * ],
- * "signature": "base64"
- * },
- * "signingString": "ready to be passed to crypto.verify()"
- * }
- *
- * @param {Object} request an http.ServerRequest.
- * @param {Object} options an optional options object with:
- * - clockSkew: allowed clock skew in seconds (default 300).
- * - headers: required header names (def: date or x-date)
- * - algorithms: algorithms to support (default: all).
- * - strict: should enforce latest spec parsing
- * (default: false).
- * @return {Object} parsed out object (see above).
- * @throws {TypeError} on invalid input.
- * @throws {InvalidHeaderError} on an invalid Authorization header error.
- * @throws {InvalidParamsError} if the params in the scheme are invalid.
- * @throws {MissingHeaderError} if the params indicate a header not present,
- * either in the request headers from the params,
- * or not in the params from a required header
- * in options.
- * @throws {StrictParsingError} if old attributes are used in strict parsing
- * mode.
- * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew.
- */
- parseRequest: function parseRequest(request, options) {
- assert.object(request, 'request');
- assert.object(request.headers, 'request.headers');
- if (options === undefined) {
- options = {};
- }
- if (options.headers === undefined) {
- options.headers = [request.headers['x-date'] ? 'x-date' : 'date'];
- }
- assert.object(options, 'options');
- assert.arrayOfString(options.headers, 'options.headers');
- assert.optionalNumber(options.clockSkew, 'options.clockSkew');
-
- if (!request.headers.authorization)
- throw new MissingHeaderError('no authorization header present in ' +
- 'the request');
-
- options.clockSkew = options.clockSkew || 300;
-
-
- var i = 0;
- var state = State.New;
- var substate = ParamsState.Name;
- var tmpName = '';
- var tmpValue = '';
-
- var parsed = {
- scheme: '',
- params: {},
- signingString: '',
-
- get algorithm() {
- return this.params.algorithm.toUpperCase();
- },
-
- get keyId() {
- return this.params.keyId;
- }
- };
-
- var authz = request.headers.authorization;
- for (i = 0; i < authz.length; i++) {
- var c = authz.charAt(i);
-
- switch (Number(state)) {
-
- case State.New:
- if (c !== ' ') parsed.scheme += c;
- else state = State.Params;
- break;
-
- case State.Params:
- switch (Number(substate)) {
-
- case ParamsState.Name:
- var code = c.charCodeAt(0);
- // restricted name of A-Z / a-z
- if ((code >= 0x41 && code <= 0x5a) || // A-Z
- (code >= 0x61 && code <= 0x7a)) { // a-z
- tmpName += c;
- } else if (c === '=') {
- if (tmpName.length === 0)
- throw new InvalidHeaderError('bad param format');
- substate = ParamsState.Quote;
- } else {
- throw new InvalidHeaderError('bad param format');
- }
- break;
-
- case ParamsState.Quote:
- if (c === '"') {
- tmpValue = '';
- substate = ParamsState.Value;
- } else {
- throw new InvalidHeaderError('bad param format');
- }
- break;
-
- case ParamsState.Value:
- if (c === '"') {
- parsed.params[tmpName] = tmpValue;
- substate = ParamsState.Comma;
- } else {
- tmpValue += c;
- }
- break;
-
- case ParamsState.Comma:
- if (c === ',') {
- tmpName = '';
- substate = ParamsState.Name;
- } else {
- throw new InvalidHeaderError('bad param format');
- }
- break;
-
- default:
- throw new Error('Invalid substate');
- }
- break;
-
- default:
- throw new Error('Invalid substate');
- }
-
- }
-
- if (!parsed.params.headers || parsed.params.headers === '') {
- if (request.headers['x-date']) {
- parsed.params.headers = ['x-date'];
- } else {
- parsed.params.headers = ['date'];
- }
- } else {
- parsed.params.headers = parsed.params.headers.split(' ');
- }
-
- // Minimally validate the parsed object
- if (!parsed.scheme || parsed.scheme !== 'Signature')
- throw new InvalidHeaderError('scheme was not "Signature"');
-
- if (!parsed.params.keyId)
- throw new InvalidHeaderError('keyId was not specified');
-
- if (!parsed.params.algorithm)
- throw new InvalidHeaderError('algorithm was not specified');
-
- if (!parsed.params.signature)
- throw new InvalidHeaderError('signature was not specified');
-
- // Check the algorithm against the official list
- parsed.params.algorithm = parsed.params.algorithm.toLowerCase();
- try {
- validateAlgorithm(parsed.params.algorithm);
- } catch (e) {
- if (e instanceof InvalidAlgorithmError)
- throw (new InvalidParamsError(parsed.params.algorithm + ' is not ' +
- 'supported'));
- else
- throw (e);
- }
-
- // Build the signingString
- for (i = 0; i < parsed.params.headers.length; i++) {
- var h = parsed.params.headers[i].toLowerCase();
- parsed.params.headers[i] = h;
-
- if (h === 'request-line') {
- if (!options.strict) {
- /*
- * We allow headers from the older spec drafts if strict parsing isn't
- * specified in options.
- */
- parsed.signingString +=
- request.method + ' ' + request.url + ' HTTP/' + request.httpVersion;
- } else {
- /* Strict parsing doesn't allow older draft headers. */
- throw (new StrictParsingError('request-line is not a valid header ' +
- 'with strict parsing enabled.'));
- }
- } else if (h === '(request-target)') {
- parsed.signingString +=
- '(request-target): ' + request.method.toLowerCase() + ' ' +
- request.url;
- } else {
- var value = request.headers[h];
- if (value === undefined)
- throw new MissingHeaderError(h + ' was not in the request');
- parsed.signingString += h + ': ' + value;
- }
-
- if ((i + 1) < parsed.params.headers.length)
- parsed.signingString += '\n';
- }
-
- // Check against the constraints
- var date;
- if (request.headers.date || request.headers['x-date']) {
- if (request.headers['x-date']) {
- date = new Date(request.headers['x-date']);
- } else {
- date = new Date(request.headers.date);
- }
- var now = new Date();
- var skew = Math.abs(now.getTime() - date.getTime());
-
- if (skew > options.clockSkew * 1000) {
- throw new ExpiredRequestError('clock skew of ' +
- (skew / 1000) +
- 's was greater than ' +
- options.clockSkew + 's');
- }
- }
-
- options.headers.forEach(function (hdr) {
- // Remember that we already checked any headers in the params
- // were in the request, so if this passes we're good.
- if (parsed.params.headers.indexOf(hdr) < 0)
- throw new MissingHeaderError(hdr + ' was not a signed header');
- });
-
- if (options.algorithms) {
- if (options.algorithms.indexOf(parsed.params.algorithm) === -1)
- throw new InvalidParamsError(parsed.params.algorithm +
- ' is not a supported algorithm');
- }
-
- return parsed;
- }
-
-};
diff --git a/node_modules/node-gyp/node_modules/http-signature/lib/signer.js b/node_modules/node-gyp/node_modules/http-signature/lib/signer.js
deleted file mode 100644
index ef9946f77..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/lib/signer.js
+++ /dev/null
@@ -1,399 +0,0 @@
-// Copyright 2012 Joyent, Inc. All rights reserved.
-
-var assert = require('assert-plus');
-var crypto = require('crypto');
-var http = require('http');
-var util = require('util');
-var sshpk = require('sshpk');
-var jsprim = require('jsprim');
-var utils = require('./utils');
-
-var sprintf = require('util').format;
-
-var HASH_ALGOS = utils.HASH_ALGOS;
-var PK_ALGOS = utils.PK_ALGOS;
-var InvalidAlgorithmError = utils.InvalidAlgorithmError;
-var HttpSignatureError = utils.HttpSignatureError;
-var validateAlgorithm = utils.validateAlgorithm;
-
-///--- Globals
-
-var AUTHZ_FMT =
- 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';
-
-///--- Specific Errors
-
-function MissingHeaderError(message) {
- HttpSignatureError.call(this, message, MissingHeaderError);
-}
-util.inherits(MissingHeaderError, HttpSignatureError);
-
-function StrictParsingError(message) {
- HttpSignatureError.call(this, message, StrictParsingError);
-}
-util.inherits(StrictParsingError, HttpSignatureError);
-
-/* See createSigner() */
-function RequestSigner(options) {
- assert.object(options, 'options');
-
- var alg = [];
- if (options.algorithm !== undefined) {
- assert.string(options.algorithm, 'options.algorithm');
- alg = validateAlgorithm(options.algorithm);
- }
- this.rs_alg = alg;
-
- /*
- * RequestSigners come in two varieties: ones with an rs_signFunc, and ones
- * with an rs_signer.
- *
- * rs_signFunc-based RequestSigners have to build up their entire signing
- * string within the rs_lines array and give it to rs_signFunc as a single
- * concat'd blob. rs_signer-based RequestSigners can add a line at a time to
- * their signing state by using rs_signer.update(), thus only needing to
- * buffer the hash function state and one line at a time.
- */
- if (options.sign !== undefined) {
- assert.func(options.sign, 'options.sign');
- this.rs_signFunc = options.sign;
-
- } else if (alg[0] === 'hmac' && options.key !== undefined) {
- assert.string(options.keyId, 'options.keyId');
- this.rs_keyId = options.keyId;
-
- if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))
- throw (new TypeError('options.key for HMAC must be a string or Buffer'));
-
- /*
- * Make an rs_signer for HMACs, not a rs_signFunc -- HMACs digest their
- * data in chunks rather than requiring it all to be given in one go
- * at the end, so they are more similar to signers than signFuncs.
- */
- this.rs_signer = crypto.createHmac(alg[1].toUpperCase(), options.key);
- this.rs_signer.sign = function () {
- var digest = this.digest('base64');
- return ({
- hashAlgorithm: alg[1],
- toString: function () { return (digest); }
- });
- };
-
- } else if (options.key !== undefined) {
- var key = options.key;
- if (typeof (key) === 'string' || Buffer.isBuffer(key))
- key = sshpk.parsePrivateKey(key);
-
- assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),
- 'options.key must be a sshpk.PrivateKey');
- this.rs_key = key;
-
- assert.string(options.keyId, 'options.keyId');
- this.rs_keyId = options.keyId;
-
- if (!PK_ALGOS[key.type]) {
- throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +
- 'keys are not supported'));
- }
-
- if (alg[0] !== undefined && key.type !== alg[0]) {
- throw (new InvalidAlgorithmError('options.key must be a ' +
- alg[0].toUpperCase() + ' key, was given a ' +
- key.type.toUpperCase() + ' key instead'));
- }
-
- this.rs_signer = key.createSign(alg[1]);
-
- } else {
- throw (new TypeError('options.sign (func) or options.key is required'));
- }
-
- this.rs_headers = [];
- this.rs_lines = [];
-}
-
-/**
- * Adds a header to be signed, with its value, into this signer.
- *
- * @param {String} header
- * @param {String} value
- * @return {String} value written
- */
-RequestSigner.prototype.writeHeader = function (header, value) {
- assert.string(header, 'header');
- header = header.toLowerCase();
- assert.string(value, 'value');
-
- this.rs_headers.push(header);
-
- if (this.rs_signFunc) {
- this.rs_lines.push(header + ': ' + value);
-
- } else {
- var line = header + ': ' + value;
- if (this.rs_headers.length > 0)
- line = '\n' + line;
- this.rs_signer.update(line);
- }
-
- return (value);
-};
-
-/**
- * Adds a default Date header, returning its value.
- *
- * @return {String}
- */
-RequestSigner.prototype.writeDateHeader = function () {
- return (this.writeHeader('date', jsprim.rfc1123(new Date())));
-};
-
-/**
- * Adds the request target line to be signed.
- *
- * @param {String} method, HTTP method (e.g. 'get', 'post', 'put')
- * @param {String} path
- */
-RequestSigner.prototype.writeTarget = function (method, path) {
- assert.string(method, 'method');
- assert.string(path, 'path');
- method = method.toLowerCase();
- this.writeHeader('(request-target)', method + ' ' + path);
-};
-
-/**
- * Calculate the value for the Authorization header on this request
- * asynchronously.
- *
- * @param {Func} callback (err, authz)
- */
-RequestSigner.prototype.sign = function (cb) {
- assert.func(cb, 'callback');
-
- if (this.rs_headers.length < 1)
- throw (new Error('At least one header must be signed'));
-
- var alg, authz;
- if (this.rs_signFunc) {
- var data = this.rs_lines.join('\n');
- var self = this;
- this.rs_signFunc(data, function (err, sig) {
- if (err) {
- cb(err);
- return;
- }
- try {
- assert.object(sig, 'signature');
- assert.string(sig.keyId, 'signature.keyId');
- assert.string(sig.algorithm, 'signature.algorithm');
- assert.string(sig.signature, 'signature.signature');
- alg = validateAlgorithm(sig.algorithm);
-
- authz = sprintf(AUTHZ_FMT,
- sig.keyId,
- sig.algorithm,
- self.rs_headers.join(' '),
- sig.signature);
- } catch (e) {
- cb(e);
- return;
- }
- cb(null, authz);
- });
-
- } else {
- try {
- var sigObj = this.rs_signer.sign();
- } catch (e) {
- cb(e);
- return;
- }
- alg = (this.rs_alg[0] || this.rs_key.type) + '-' + sigObj.hashAlgorithm;
- var signature = sigObj.toString();
- authz = sprintf(AUTHZ_FMT,
- this.rs_keyId,
- alg,
- this.rs_headers.join(' '),
- signature);
- cb(null, authz);
- }
-};
-
-///--- Exported API
-
-module.exports = {
- /**
- * Identifies whether a given object is a request signer or not.
- *
- * @param {Object} object, the object to identify
- * @returns {Boolean}
- */
- isSigner: function (obj) {
- if (typeof (obj) === 'object' && obj instanceof RequestSigner)
- return (true);
- return (false);
- },
-
- /**
- * Creates a request signer, used to asynchronously build a signature
- * for a request (does not have to be an http.ClientRequest).
- *
- * @param {Object} options, either:
- * - {String} keyId
- * - {String|Buffer} key
- * - {String} algorithm (optional, required for HMAC)
- * or:
- * - {Func} sign (data, cb)
- * @return {RequestSigner}
- */
- createSigner: function createSigner(options) {
- return (new RequestSigner(options));
- },
-
- /**
- * Adds an 'Authorization' header to an http.ClientRequest object.
- *
- * Note that this API will add a Date header if it's not already set. Any
- * other headers in the options.headers array MUST be present, or this
- * will throw.
- *
- * You shouldn't need to check the return type; it's just there if you want
- * to be pedantic.
- *
- * The optional flag indicates whether parsing should use strict enforcement
- * of the version draft-cavage-http-signatures-04 of the spec or beyond.
- * The default is to be loose and support
- * older versions for compatibility.
- *
- * @param {Object} request an instance of http.ClientRequest.
- * @param {Object} options signing parameters object:
- * - {String} keyId required.
- * - {String} key required (either a PEM or HMAC key).
- * - {Array} headers optional; defaults to ['date'].
- * - {String} algorithm optional (unless key is HMAC);
- * default is the same as the sshpk default
- * signing algorithm for the type of key given
- * - {String} httpVersion optional; defaults to '1.1'.
- * - {Boolean} strict optional; defaults to 'false'.
- * @return {Boolean} true if Authorization (and optionally Date) were added.
- * @throws {TypeError} on bad parameter types (input).
- * @throws {InvalidAlgorithmError} if algorithm was bad or incompatible with
- * the given key.
- * @throws {sshpk.KeyParseError} if key was bad.
- * @throws {MissingHeaderError} if a header to be signed was specified but
- * was not present.
- */
- signRequest: function signRequest(request, options) {
- assert.object(request, 'request');
- assert.object(options, 'options');
- assert.optionalString(options.algorithm, 'options.algorithm');
- assert.string(options.keyId, 'options.keyId');
- assert.optionalArrayOfString(options.headers, 'options.headers');
- assert.optionalString(options.httpVersion, 'options.httpVersion');
-
- if (!request.getHeader('Date'))
- request.setHeader('Date', jsprim.rfc1123(new Date()));
- if (!options.headers)
- options.headers = ['date'];
- if (!options.httpVersion)
- options.httpVersion = '1.1';
-
- var alg = [];
- if (options.algorithm) {
- options.algorithm = options.algorithm.toLowerCase();
- alg = validateAlgorithm(options.algorithm);
- }
-
- var i;
- var stringToSign = '';
- for (i = 0; i < options.headers.length; i++) {
- if (typeof (options.headers[i]) !== 'string')
- throw new TypeError('options.headers must be an array of Strings');
-
- var h = options.headers[i].toLowerCase();
-
- if (h === 'request-line') {
- if (!options.strict) {
- /**
- * We allow headers from the older spec drafts if strict parsing isn't
- * specified in options.
- */
- stringToSign +=
- request.method + ' ' + request.path + ' HTTP/' +
- options.httpVersion;
- } else {
- /* Strict parsing doesn't allow older draft headers. */
- throw (new StrictParsingError('request-line is not a valid header ' +
- 'with strict parsing enabled.'));
- }
- } else if (h === '(request-target)') {
- stringToSign +=
- '(request-target): ' + request.method.toLowerCase() + ' ' +
- request.path;
- } else {
- var value = request.getHeader(h);
- if (value === undefined || value === '') {
- throw new MissingHeaderError(h + ' was not in the request');
- }
- stringToSign += h + ': ' + value;
- }
-
- if ((i + 1) < options.headers.length)
- stringToSign += '\n';
- }
-
- /* This is just for unit tests. */
- if (request.hasOwnProperty('_stringToSign')) {
- request._stringToSign = stringToSign;
- }
-
- var signature;
- if (alg[0] === 'hmac') {
- if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))
- throw (new TypeError('options.key must be a string or Buffer'));
-
- var hmac = crypto.createHmac(alg[1].toUpperCase(), options.key);
- hmac.update(stringToSign);
- signature = hmac.digest('base64');
-
- } else {
- var key = options.key;
- if (typeof (key) === 'string' || Buffer.isBuffer(key))
- key = sshpk.parsePrivateKey(options.key);
-
- assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),
- 'options.key must be a sshpk.PrivateKey');
-
- if (!PK_ALGOS[key.type]) {
- throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +
- 'keys are not supported'));
- }
-
- if (alg[0] !== undefined && key.type !== alg[0]) {
- throw (new InvalidAlgorithmError('options.key must be a ' +
- alg[0].toUpperCase() + ' key, was given a ' +
- key.type.toUpperCase() + ' key instead'));
- }
-
- var signer = key.createSign(alg[1]);
- signer.update(stringToSign);
- var sigObj = signer.sign();
- if (!HASH_ALGOS[sigObj.hashAlgorithm]) {
- throw (new InvalidAlgorithmError(sigObj.hashAlgorithm.toUpperCase() +
- ' is not a supported hash algorithm'));
- }
- options.algorithm = key.type + '-' + sigObj.hashAlgorithm;
- signature = sigObj.toString();
- assert.notStrictEqual(signature, '', 'empty signature produced');
- }
-
- request.setHeader('Authorization', sprintf(AUTHZ_FMT,
- options.keyId,
- options.algorithm,
- options.headers.join(' '),
- signature));
-
- return true;
- }
-
-};
diff --git a/node_modules/node-gyp/node_modules/http-signature/lib/utils.js b/node_modules/node-gyp/node_modules/http-signature/lib/utils.js
deleted file mode 100644
index bbf2aa895..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/lib/utils.js
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2012 Joyent, Inc. All rights reserved.
-
-var assert = require('assert-plus');
-var sshpk = require('sshpk');
-var util = require('util');
-
-var HASH_ALGOS = {
- 'sha1': true,
- 'sha256': true,
- 'sha512': true
-};
-
-var PK_ALGOS = {
- 'rsa': true,
- 'dsa': true,
- 'ecdsa': true
-};
-
-function HttpSignatureError(message, caller) {
- if (Error.captureStackTrace)
- Error.captureStackTrace(this, caller || HttpSignatureError);
-
- this.message = message;
- this.name = caller.name;
-}
-util.inherits(HttpSignatureError, Error);
-
-function InvalidAlgorithmError(message) {
- HttpSignatureError.call(this, message, InvalidAlgorithmError);
-}
-util.inherits(InvalidAlgorithmError, HttpSignatureError);
-
-function validateAlgorithm(algorithm) {
- var alg = algorithm.toLowerCase().split('-');
-
- if (alg.length !== 2) {
- throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' +
- 'valid algorithm'));
- }
-
- if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) {
- throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' +
- 'are not supported'));
- }
-
- if (!HASH_ALGOS[alg[1]]) {
- throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' +
- 'supported hash algorithm'));
- }
-
- return (alg);
-}
-
-///--- API
-
-module.exports = {
-
- HASH_ALGOS: HASH_ALGOS,
- PK_ALGOS: PK_ALGOS,
-
- HttpSignatureError: HttpSignatureError,
- InvalidAlgorithmError: InvalidAlgorithmError,
-
- validateAlgorithm: validateAlgorithm,
-
- /**
- * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file.
- *
- * The intent of this module is to interoperate with OpenSSL only,
- * specifically the node crypto module's `verify` method.
- *
- * @param {String} key an OpenSSH public key.
- * @return {String} PEM encoded form of the RSA public key.
- * @throws {TypeError} on bad input.
- * @throws {Error} on invalid ssh key formatted data.
- */
- sshKeyToPEM: function sshKeyToPEM(key) {
- assert.string(key, 'ssh_key');
-
- var k = sshpk.parseKey(key, 'ssh');
- return (k.toString('pem'));
- },
-
-
- /**
- * Generates an OpenSSH fingerprint from an ssh public key.
- *
- * @param {String} key an OpenSSH public key.
- * @return {String} key fingerprint.
- * @throws {TypeError} on bad input.
- * @throws {Error} if what you passed doesn't look like an ssh public key.
- */
- fingerprint: function fingerprint(key) {
- assert.string(key, 'ssh_key');
-
- var k = sshpk.parseKey(key, 'ssh');
- return (k.fingerprint('md5').toString('hex'));
- },
-
- /**
- * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa)
- *
- * The reverse of the above function.
- */
- pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) {
- assert.equal('string', typeof (pem), 'typeof pem');
-
- var k = sshpk.parseKey(pem, 'pem');
- k.comment = comment;
- return (k.toString('ssh'));
- }
-};
diff --git a/node_modules/node-gyp/node_modules/http-signature/lib/verify.js b/node_modules/node-gyp/node_modules/http-signature/lib/verify.js
deleted file mode 100644
index b053fd6bf..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/lib/verify.js
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2015 Joyent, Inc.
-
-var assert = require('assert-plus');
-var crypto = require('crypto');
-var sshpk = require('sshpk');
-var utils = require('./utils');
-
-var HASH_ALGOS = utils.HASH_ALGOS;
-var PK_ALGOS = utils.PK_ALGOS;
-var InvalidAlgorithmError = utils.InvalidAlgorithmError;
-var HttpSignatureError = utils.HttpSignatureError;
-var validateAlgorithm = utils.validateAlgorithm;
-
-///--- Exported API
-
-module.exports = {
- /**
- * Verify RSA/DSA signature against public key. You are expected to pass in
- * an object that was returned from `parse()`.
- *
- * @param {Object} parsedSignature the object you got from `parse`.
- * @param {String} pubkey RSA/DSA private key PEM.
- * @return {Boolean} true if valid, false otherwise.
- * @throws {TypeError} if you pass in bad arguments.
- * @throws {InvalidAlgorithmError}
- */
- verifySignature: function verifySignature(parsedSignature, pubkey) {
- assert.object(parsedSignature, 'parsedSignature');
- if (typeof (pubkey) === 'string' || Buffer.isBuffer(pubkey))
- pubkey = sshpk.parseKey(pubkey);
- assert.ok(sshpk.Key.isKey(pubkey, [1, 1]), 'pubkey must be a sshpk.Key');
-
- var alg = validateAlgorithm(parsedSignature.algorithm);
- if (alg[0] === 'hmac' || alg[0] !== pubkey.type)
- return (false);
-
- var v = pubkey.createVerify(alg[1]);
- v.update(parsedSignature.signingString);
- return (v.verify(parsedSignature.params.signature, 'base64'));
- },
-
- /**
- * Verify HMAC against shared secret. You are expected to pass in an object
- * that was returned from `parse()`.
- *
- * @param {Object} parsedSignature the object you got from `parse`.
- * @param {String} secret HMAC shared secret.
- * @return {Boolean} true if valid, false otherwise.
- * @throws {TypeError} if you pass in bad arguments.
- * @throws {InvalidAlgorithmError}
- */
- verifyHMAC: function verifyHMAC(parsedSignature, secret) {
- assert.object(parsedSignature, 'parsedHMAC');
- assert.string(secret, 'secret');
-
- var alg = validateAlgorithm(parsedSignature.algorithm);
- if (alg[0] !== 'hmac')
- return (false);
-
- var hashAlg = alg[1].toUpperCase();
-
- var hmac = crypto.createHmac(hashAlg, secret);
- hmac.update(parsedSignature.signingString);
-
- /*
- * Now double-hash to avoid leaking timing information - there's
- * no easy constant-time compare in JS, so we use this approach
- * instead. See for more info:
- * https://www.isecpartners.com/blog/2011/february/double-hmac-
- * verification.aspx
- */
- var h1 = crypto.createHmac(hashAlg, secret);
- h1.update(hmac.digest());
- h1 = h1.digest();
- var h2 = crypto.createHmac(hashAlg, secret);
- h2.update(new Buffer(parsedSignature.params.signature, 'base64'));
- h2 = h2.digest();
-
- /* Node 0.8 returns strings from .digest(). */
- if (typeof (h1) === 'string')
- return (h1 === h2);
- /* And node 0.10 lacks the .equals() method on Buffers. */
- if (Buffer.isBuffer(h1) && !h1.equals)
- return (h1.toString('binary') === h2.toString('binary'));
-
- return (h1.equals(h2));
- }
-};
diff --git a/node_modules/node-gyp/node_modules/http-signature/package.json b/node_modules/node-gyp/node_modules/http-signature/package.json
deleted file mode 100644
index 2da87cf0f..000000000
--- a/node_modules/node-gyp/node_modules/http-signature/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_from": "http-signature@~1.1.0",
- "_id": "http-signature@1.1.1",
- "_inBundle": false,
- "_integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
- "_location": "/node-gyp/http-signature",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "http-signature@~1.1.0",
- "name": "http-signature",
- "escapedName": "http-signature",
- "rawSpec": "~1.1.0",
- "saveSpec": null,
- "fetchSpec": "~1.1.0"
- },
- "_requiredBy": [
- "/node-gyp/request"
- ],
- "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
- "_shasum": "df72e267066cd0ac67fb76adf8e134a8fbcf91bf",
- "_spec": "http-signature@~1.1.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/request",
- "author": {
- "name": "Joyent, Inc"
- },
- "bugs": {
- "url": "https://github.com/joyent/node-http-signature/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Mark Cavage",
- "email": "mcavage@gmail.com"
- },
- {
- "name": "David I. Lehn",
- "email": "dil@lehn.org"
- },
- {
- "name": "Patrick Mooney",
- "email": "patrick.f.mooney@gmail.com"
- }
- ],
- "dependencies": {
- "assert-plus": "^0.2.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
- },
- "deprecated": false,
- "description": "Reference implementation of Joyent's HTTP Signature scheme.",
- "devDependencies": {
- "node-uuid": "^1.4.1",
- "tap": "0.4.2"
- },
- "engines": {
- "node": ">=0.8",
- "npm": ">=1.3.7"
- },
- "homepage": "https://github.com/joyent/node-http-signature/",
- "keywords": [
- "https",
- "request"
- ],
- "license": "MIT",
- "main": "lib/index.js",
- "name": "http-signature",
- "repository": {
- "type": "git",
- "url": "git://github.com/joyent/node-http-signature.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "1.1.1"
-}
diff --git a/node_modules/node-gyp/node_modules/performance-now/.npmignore b/node_modules/node-gyp/node_modules/performance-now/.npmignore
deleted file mode 100644
index 496ee2ca6..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-.DS_Store \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/performance-now/.tm_properties b/node_modules/node-gyp/node_modules/performance-now/.tm_properties
deleted file mode 100644
index 4b8eb3f61..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/.tm_properties
+++ /dev/null
@@ -1,7 +0,0 @@
-excludeDirectories = "{.git,node_modules}"
-excludeInFolderSearch = "{excludeDirectories,lib}"
-
-includeFiles = "{.gitignore,.npmignore,.travis.yml}"
-
-[ attr.untitled ]
-fileType = 'source.coffee' \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/performance-now/.travis.yml b/node_modules/node-gyp/node_modules/performance-now/.travis.yml
deleted file mode 100644
index 2ca91f289..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
- - "0.8" \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/performance-now/Makefile b/node_modules/node-gyp/node_modules/performance-now/Makefile
deleted file mode 100644
index 8a2a565b0..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-build:
- mkdir -p lib
- rm -rf lib/*
- node_modules/.bin/coffee --compile --output lib/ src/
-
-watch:
- node_modules/.bin/coffee --watch --compile --output lib/ src/
-
-test:
- node_modules/.bin/mocha
-
-jumpstart:
- curl -u 'meryn' https://api.github.com/user/repos -d '{"name":"performance-now", "description":"Implements performance.now (based on process.hrtime).","private":false}'
- mkdir -p src
- touch src/performance-now.coffee
- mkdir -p test
- touch test/performance-now.coffee
- npm install
- git init
- git remote add origin git@github.com:meryn/performance-now
- git add .
- git commit -m "jumpstart commit."
- git push -u origin master
-
-.PHONY: test \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/performance-now/README.md b/node_modules/node-gyp/node_modules/performance-now/README.md
deleted file mode 100644
index aefd42a16..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# performance-now [![Build Status](https://travis-ci.org/meryn/performance-now.png?branch=master)](https://travis-ci.org/meryn/performance-now) [![Dependency Status](https://david-dm.org/meryn/performance-now.png)](https://david-dm.org/meryn/performance-now)
-
-Implements a function similar to `performance.now` (based on `process.hrtime`).
-
-Modern browsers have a `window.performance` object with - among others - a `now` method which gives time in miliseconds, but with sub-milisecond precision. This module offers the same function based on the Node.js native `process.hrtime` function.
-
-According to the [High Resolution Time specification](http://www.w3.org/TR/hr-time/), the number of miliseconds reported by `performance.now` should be relative to the value of `performance.timing.navigationStart`. For this module, it's relative to when the time when this module got loaded. Right after requiring this module for the first time, the reported time is expected to have a near-zero value.
-
-Using `process.hrtime` means that the reported time will be monotonically increasing, and not subject to clock-drift.
-
-## Example usage
-
-```javascript
-var now = require("performance-now")
-var start = now()
-var end = now()
-console.log(start.toFixed(3)) // ~ 0.05 on my system
-console.log((start-end).toFixed(3)) // ~ 0.002 on my system
-```
-
-Running the now function two times right after each other yields a time difference of a few microseconds. Given this overhead, I think it's best to assume that the precision of intervals computed with this method is not higher than 10 microseconds, if you don't know the exact overhead on your own system.
-
-## Credits
-
-The initial structure of this module was generated by [Jumpstart](https://github.com/meryn/jumpstart), using the [Jumpstart Black Coffee](https://github.com/meryn/jumpstart-black-coffee) template.
-
-## License
-
-performance-now is released under the [MIT License](http://opensource.org/licenses/MIT).
-Copyright (c) 2013 Meryn Stol \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/performance-now/lib/performance-now.js b/node_modules/node-gyp/node_modules/performance-now/lib/performance-now.js
deleted file mode 100644
index e95d6a821..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/lib/performance-now.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Generated by CoffeeScript 1.7.1
-(function() {
- var getNanoSeconds, hrtime, loadTime;
-
- if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
- module.exports = function() {
- return performance.now();
- };
- } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
- module.exports = function() {
- return (getNanoSeconds() - loadTime) / 1e6;
- };
- hrtime = process.hrtime;
- getNanoSeconds = function() {
- var hr;
- hr = hrtime();
- return hr[0] * 1e9 + hr[1];
- };
- loadTime = getNanoSeconds();
- } else if (Date.now) {
- module.exports = function() {
- return Date.now() - loadTime;
- };
- loadTime = Date.now();
- } else {
- module.exports = function() {
- return new Date().getTime() - loadTime;
- };
- loadTime = new Date().getTime();
- }
-
-}).call(this);
diff --git a/node_modules/node-gyp/node_modules/performance-now/license.txt b/node_modules/node-gyp/node_modules/performance-now/license.txt
deleted file mode 100644
index d4facc303..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/license.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) 2013 Meryn Stol
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/performance-now/package.json b/node_modules/node-gyp/node_modules/performance-now/package.json
deleted file mode 100644
index bd0cb21e8..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "_from": "performance-now@^0.2.0",
- "_id": "performance-now@0.2.0",
- "_inBundle": false,
- "_integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
- "_location": "/node-gyp/performance-now",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "performance-now@^0.2.0",
- "name": "performance-now",
- "escapedName": "performance-now",
- "rawSpec": "^0.2.0",
- "saveSpec": null,
- "fetchSpec": "^0.2.0"
- },
- "_requiredBy": [
- "/node-gyp/request"
- ],
- "_resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
- "_shasum": "33ef30c5c77d4ea21c5a53869d91b56d8f2555e5",
- "_spec": "performance-now@^0.2.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/request",
- "author": {
- "name": "Meryn Stol",
- "email": "merynstol@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/meryn/performance-now/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Implements performance.now (based on process.hrtime).",
- "devDependencies": {
- "coffee-script": "~1.7.1",
- "mocha": "~1.21.0"
- },
- "homepage": "https://github.com/meryn/performance-now",
- "keywords": [],
- "license": "MIT",
- "main": "lib/performance-now.js",
- "name": "performance-now",
- "optionalDependencies": {},
- "private": false,
- "repository": {
- "type": "git",
- "url": "git://github.com/meryn/performance-now.git"
- },
- "scripts": {
- "prepublish": "npm test",
- "pretest": "make build",
- "test": "make test"
- },
- "version": "0.2.0"
-}
diff --git a/node_modules/node-gyp/node_modules/performance-now/src/performance-now.coffee b/node_modules/node-gyp/node_modules/performance-now/src/performance-now.coffee
deleted file mode 100644
index e752fc5e1..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/src/performance-now.coffee
+++ /dev/null
@@ -1,15 +0,0 @@
-if performance? and performance.now
- module.exports = -> performance.now()
-else if process? and process.hrtime
- module.exports = -> (getNanoSeconds() - loadTime) / 1e6
- hrtime = process.hrtime
- getNanoSeconds = ->
- hr = hrtime()
- hr[0] * 1e9 + hr[1]
- loadTime = getNanoSeconds()
-else if Date.now
- module.exports = -> Date.now() - loadTime
- loadTime = Date.now()
-else
- module.exports = -> new Date().getTime() - loadTime
- loadTime = new Date().getTime()
diff --git a/node_modules/node-gyp/node_modules/performance-now/test/mocha.opts b/node_modules/node-gyp/node_modules/performance-now/test/mocha.opts
deleted file mode 100644
index 55d849270..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/test/mocha.opts
+++ /dev/null
@@ -1,3 +0,0 @@
---require coffee-script/register
---compilers coffee:coffee-script/register
---reporter spec \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/performance-now/test/performance-now.coffee b/node_modules/node-gyp/node_modules/performance-now/test/performance-now.coffee
deleted file mode 100644
index c552b8791..000000000
--- a/node_modules/node-gyp/node_modules/performance-now/test/performance-now.coffee
+++ /dev/null
@@ -1,38 +0,0 @@
-assert = require "assert"
-
-delay = (ms, fn) -> setTimeout fn, ms
-now = undefined
-describe "now", ->
- it "initially gives a near zero (< 20 ms) time ", ->
- now = require "../"
- assert now() < 20
-
- it "gives a positive time", ->
- assert now() > 0
-
- it "two subsequent calls return an increasing number", ->
- a = now()
- b = now()
- assert now() < now()
-
- it "has less than 10 microseconds overhead", ->
- Math.abs(now() - now()) < 0.010
-
- it "can do 1,000,000 calls really quickly", ->
- now() for i in [0...1000000]
-
- it "shows that at least 990 ms has passed after a timeout of 1 second", (done) ->
- a = now()
- delay 1000, ->
- b = now()
- diff = b - a
- return done new Error "Diff (#{diff}) lower than 990." if diff < 990
- return done null
-
- it "shows that not more than 1020 ms has passed after a timeout of 1 second", (done) ->
- a = now()
- delay 1000, ->
- b = now()
- diff = b - a
- return done new Error "Diff (#{diff}) higher than 1020." if diff > 1020
- return done null \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/qs/.eslintignore b/node_modules/node-gyp/node_modules/qs/.eslintignore
deleted file mode 100644
index 1521c8b76..000000000
--- a/node_modules/node-gyp/node_modules/qs/.eslintignore
+++ /dev/null
@@ -1 +0,0 @@
-dist
diff --git a/node_modules/node-gyp/node_modules/qs/.jscs.json b/node_modules/node-gyp/node_modules/qs/.jscs.json
deleted file mode 100644
index 3d099c4b1..000000000
--- a/node_modules/node-gyp/node_modules/qs/.jscs.json
+++ /dev/null
@@ -1,176 +0,0 @@
-{
- "es3": true,
-
- "additionalRules": [],
-
- "requireSemicolons": true,
-
- "disallowMultipleSpaces": true,
-
- "disallowIdentifierNames": [],
-
- "requireCurlyBraces": {
- "allExcept": [],
- "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
- },
-
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
-
- "disallowSpaceAfterKeywords": [],
-
- "disallowSpaceBeforeComma": true,
- "disallowSpaceAfterComma": false,
- "disallowSpaceBeforeSemicolon": true,
-
- "disallowNodeTypes": [
- "DebuggerStatement",
- "ForInStatement",
- "LabeledStatement",
- "SwitchCase",
- "SwitchStatement",
- "WithStatement"
- ],
-
- "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
-
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
-
- "requireSpaceBetweenArguments": true,
-
- "disallowSpacesInsideParentheses": true,
-
- "disallowSpacesInsideArrayBrackets": true,
-
- "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
-
- "disallowSpaceAfterObjectKeys": true,
-
- "requireCommaBeforeLineBreak": true,
-
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "requireSpaceAfterPrefixUnaryOperators": [],
-
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "requireSpaceBeforePostfixUnaryOperators": [],
-
- "disallowSpaceBeforeBinaryOperators": [],
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
-
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
- "disallowSpaceAfterBinaryOperators": [],
-
- "disallowImplicitTypeConversion": ["binary", "string"],
-
- "disallowKeywords": ["with", "eval"],
-
- "requireKeywordsOnNewLine": [],
- "disallowKeywordsOnNewLine": ["else"],
-
- "requireLineFeedAtFileEnd": true,
-
- "disallowTrailingWhitespace": true,
-
- "disallowTrailingComma": true,
-
- "excludeFiles": ["node_modules/**", "vendor/**"],
-
- "disallowMultipleLineStrings": true,
-
- "requireDotNotation": { "allExcept": ["keywords"] },
-
- "requireParenthesesAroundIIFE": true,
-
- "validateLineBreaks": "LF",
-
- "validateQuoteMarks": {
- "escape": true,
- "mark": "'"
- },
-
- "disallowOperatorBeforeLineBreak": [],
-
- "requireSpaceBeforeKeywords": [
- "do",
- "for",
- "if",
- "else",
- "switch",
- "case",
- "try",
- "catch",
- "finally",
- "while",
- "with",
- "return"
- ],
-
- "validateAlignedFunctionParameters": {
- "lineBreakAfterOpeningBraces": true,
- "lineBreakBeforeClosingBraces": true
- },
-
- "requirePaddingNewLinesBeforeExport": true,
-
- "validateNewlineAfterArrayElements": {
- "maximum": 1
- },
-
- "requirePaddingNewLinesAfterUseStrict": true,
-
- "disallowArrowFunctions": true,
-
- "disallowMultiLineTernary": true,
-
- "validateOrderInObjectKeys": "asc-insensitive",
-
- "disallowIdenticalDestructuringNames": true,
-
- "disallowNestedTernaries": { "maxLevel": 1 },
-
- "requireSpaceAfterComma": { "allExcept": ["trailing"] },
- "requireAlignedMultilineParams": false,
-
- "requireSpacesInGenerator": {
- "afterStar": true
- },
-
- "disallowSpacesInGenerator": {
- "beforeStar": true
- },
-
- "disallowVar": false,
-
- "requireArrayDestructuring": false,
-
- "requireEnhancedObjectLiterals": false,
-
- "requireObjectDestructuring": false,
-
- "requireEarlyReturn": false,
-
- "requireCapitalizedConstructorsNew": {
- "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
- },
-
- "requireImportAlphabetized": false,
-
- "requireSpaceBeforeObjectValues": true,
- "requireSpaceBeforeDestructuredValues": true,
-
- "disallowSpacesInsideTemplateStringPlaceholders": true,
-
- "disallowArrayDestructuringReturn": false,
-
- "requireNewlineBeforeSingleStatementsInIf": false,
-
- "disallowUnusedVariables": true,
-
- "requireSpacesInsideImportedObjectBraces": true,
-
- "requireUseStrict": true
-}
-
diff --git a/node_modules/node-gyp/node_modules/qs/CHANGELOG.md b/node_modules/node-gyp/node_modules/qs/CHANGELOG.md
deleted file mode 100644
index 85e69b0a2..000000000
--- a/node_modules/node-gyp/node_modules/qs/CHANGELOG.md
+++ /dev/null
@@ -1,175 +0,0 @@
-## **6.4.0**
-- [New] `qs.stringify`: add `encodeValuesOnly` option
-- [Fix] follow `allowPrototypes` option during merge (#201, #201)
-- [Fix] support keys starting with brackets (#202, #200)
-- [Fix] chmod a-x
-- [Dev Deps] update `eslint`
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-- [eslint] reduce warnings
-
-## **6.3.1**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!)
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape`
-- [Tests] on all node minors; improve test matrix
-- [Docs] document stringify option `allowDots` (#195)
-- [Docs] add empty object and array values example (#195)
-- [Docs] Fix minor inconsistency/typo (#192)
-- [Docs] document stringify option `sort` (#191)
-- [Refactor] `stringify`: throw faster with an invalid encoder
-- [Refactor] remove unnecessary escapes (#184)
-- Remove contributing.md, since `qs` is no longer part of `hapi` (#183)
-
-## **6.3.0**
-- [New] Add support for RFC 1738 (#174, #173)
-- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159)
-- [Fix] ensure `utils.merge` handles merging two arrays
-- [Refactor] only constructors should be capitalized
-- [Refactor] capitalized var names are for constructors only
-- [Refactor] avoid using a sparse array
-- [Robustness] `formats`: cache `String#replace`
-- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest`
-- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix
-- [Tests] flesh out arrayLimit/arrayFormat tests (#107)
-- [Tests] skip Object.create tests when null objects are not available
-- [Tests] Turn on eslint for test files (#175)
-
-## **6.2.2**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
-
-## **6.2.1**
-- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
-- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
-- [Tests] remove `parallelshell` since it does not reliably report failures
-- [Tests] up to `node` `v6.3`, `v5.12`
-- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv`
-
-## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
-- [New] pass Buffers to the encoder/decoder directly (#161)
-- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
-- [Fix] fix compacting of nested sparse arrays (#150)
-
-## **6.1.1**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
-
-## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
-- [New] allowDots option for `stringify` (#151)
-- [Fix] "sort" option should work at a depth of 3 or more (#151)
-- [Fix] Restore `dist` directory; will be removed in v7 (#148)
-
-## **6.0.3**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
-- [Fix] Restore `dist` directory; will be removed in v7 (#148)
-
-## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
-- Revert ES6 requirement and restore support for node down to v0.8.
-
-## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
-- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
-
-## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
-- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
-
-## **5.2.1**
-- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
-
-## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
-- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
-
-## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
-- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
-- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
-
-## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
-- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
-- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
-
-## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
-- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
-
-## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
-- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
-
-## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
-- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
-- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
-- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
-- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
-- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
-- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
-- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
-- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
-- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
-- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
-
-## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
-- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #<Object> is not a function
-
-## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed)
-- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option
-
-## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed)
-- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57
-- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader
-
-## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed)
-- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object
-
-## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed)
-- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
-
-## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed)
-- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46
-
-## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed)
-- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer?
-- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45
-- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39
-
-## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed)
-- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number
-
-## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed)
-- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array
-- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x
-
-## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed)
-- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value
-- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
-- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver?
-
-## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed)
-- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31
-- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects
-
-## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed)
-- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present
-- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays
-- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
-- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters?
-
-## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed)
-- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter
-
-## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed)
-- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit?
-- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit
-- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20
-
-## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed)
-- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values
-
-## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed)
-- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters
-- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block
-
-## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed)
-- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument
-- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
-
-## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed)
-- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted
-- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null
-- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README
-
-## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed)
-- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index
diff --git a/node_modules/node-gyp/node_modules/qs/LICENSE b/node_modules/node-gyp/node_modules/qs/LICENSE
deleted file mode 100644
index d4569487a..000000000
--- a/node_modules/node-gyp/node_modules/qs/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2014 Nathan LaFreniere and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/node_modules/node-gyp/node_modules/qs/README.md b/node_modules/node-gyp/node_modules/qs/README.md
deleted file mode 100644
index 32fc3123f..000000000
--- a/node_modules/node-gyp/node_modules/qs/README.md
+++ /dev/null
@@ -1,440 +0,0 @@
-# qs
-
-A querystring parsing and stringifying library with some added security.
-
-[![Build Status](https://api.travis-ci.org/ljharb/qs.svg)](http://travis-ci.org/ljharb/qs)
-
-Lead Maintainer: [Jordan Harband](https://github.com/ljharb)
-
-The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
-
-## Usage
-
-```javascript
-var qs = require('qs');
-var assert = require('assert');
-
-var obj = qs.parse('a=c');
-assert.deepEqual(obj, { a: 'c' });
-
-var str = qs.stringify(obj);
-assert.equal(str, 'a=c');
-```
-
-### Parsing Objects
-
-[](#preventEval)
-```javascript
-qs.parse(string, [options]);
-```
-
-**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
-For example, the string `'foo[bar]=baz'` converts to:
-
-```javascript
-assert.deepEqual(qs.parse('foo[bar]=baz'), {
- foo: {
- bar: 'baz'
- }
-});
-```
-
-When using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:
-
-```javascript
-var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });
-assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } });
-```
-
-By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.
-
-```javascript
-var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true });
-assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } });
-```
-
-URI encoded strings work too:
-
-```javascript
-assert.deepEqual(qs.parse('a%5Bb%5D=c'), {
- a: { b: 'c' }
-});
-```
-
-You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
-
-```javascript
-assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {
- foo: {
- bar: {
- baz: 'foobarbaz'
- }
- }
-});
-```
-
-By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
-`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
-
-```javascript
-var expected = {
- a: {
- b: {
- c: {
- d: {
- e: {
- f: {
- '[g][h][i]': 'j'
- }
- }
- }
- }
- }
- }
-};
-var string = 'a[b][c][d][e][f][g][h][i]=j';
-assert.deepEqual(qs.parse(string), expected);
-```
-
-This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`:
-
-```javascript
-var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
-assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } });
-```
-
-The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
-
-For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
-
-```javascript
-var limited = qs.parse('a=b&c=d', { parameterLimit: 1 });
-assert.deepEqual(limited, { a: 'b' });
-```
-
-An optional delimiter can also be passed:
-
-```javascript
-var delimited = qs.parse('a=b;c=d', { delimiter: ';' });
-assert.deepEqual(delimited, { a: 'b', c: 'd' });
-```
-
-Delimiters can be a regular expression too:
-
-```javascript
-var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
-assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' });
-```
-
-Option `allowDots` can be used to enable dot notation:
-
-```javascript
-var withDots = qs.parse('a.b=c', { allowDots: true });
-assert.deepEqual(withDots, { a: { b: 'c' } });
-```
-
-### Parsing Arrays
-
-**qs** can also parse arrays using a similar `[]` notation:
-
-```javascript
-var withArray = qs.parse('a[]=b&a[]=c');
-assert.deepEqual(withArray, { a: ['b', 'c'] });
-```
-
-You may specify an index as well:
-
-```javascript
-var withIndexes = qs.parse('a[1]=c&a[0]=b');
-assert.deepEqual(withIndexes, { a: ['b', 'c'] });
-```
-
-Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
-to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
-their order:
-
-```javascript
-var noSparse = qs.parse('a[1]=b&a[15]=c');
-assert.deepEqual(noSparse, { a: ['b', 'c'] });
-```
-
-Note that an empty string is also a value, and will be preserved:
-
-```javascript
-var withEmptyString = qs.parse('a[]=&a[]=b');
-assert.deepEqual(withEmptyString, { a: ['', 'b'] });
-
-var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');
-assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
-```
-
-**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
-instead be converted to an object with the index as the key:
-
-```javascript
-var withMaxIndex = qs.parse('a[100]=b');
-assert.deepEqual(withMaxIndex, { a: { '100': 'b' } });
-```
-
-This limit can be overridden by passing an `arrayLimit` option:
-
-```javascript
-var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 });
-assert.deepEqual(withArrayLimit, { a: { '1': 'b' } });
-```
-
-To disable array parsing entirely, set `parseArrays` to `false`.
-
-```javascript
-var noParsingArrays = qs.parse('a[]=b', { parseArrays: false });
-assert.deepEqual(noParsingArrays, { a: { '0': 'b' } });
-```
-
-If you mix notations, **qs** will merge the two items into an object:
-
-```javascript
-var mixedNotation = qs.parse('a[0]=b&a[b]=c');
-assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } });
-```
-
-You can also create arrays of objects:
-
-```javascript
-var arraysOfObjects = qs.parse('a[][b]=c');
-assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] });
-```
-
-### Stringifying
-
-[](#preventEval)
-```javascript
-qs.stringify(object, [options]);
-```
-
-When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:
-
-```javascript
-assert.equal(qs.stringify({ a: 'b' }), 'a=b');
-assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
-```
-
-This encoding can be disabled by setting the `encode` option to `false`:
-
-```javascript
-var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });
-assert.equal(unencoded, 'a[b]=c');
-```
-
-Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`:
-```javascript
-var encodedValues = qs.stringify(
- { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
- { encodeValuesOnly: true }
-)
-assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h');
-```
-
-This encoding can also be replaced by a custom encoding method set as `encoder` option:
-
-```javascript
-var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
- // Passed in values `a`, `b`, `c`
- return // Return encoded string
-}})
-```
-
-_(Note: the `encoder` option does not apply if `encode` is `false`)_
-
-Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:
-
-```javascript
-var decoded = qs.parse('x=z', { decoder: function (str) {
- // Passed in values `x`, `z`
- return // Return decoded string
-}})
-```
-
-Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
-
-When arrays are stringified, by default they are given explicit indices:
-
-```javascript
-qs.stringify({ a: ['b', 'c', 'd'] });
-// 'a[0]=b&a[1]=c&a[2]=d'
-```
-
-You may override this by setting the `indices` option to `false`:
-
-```javascript
-qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
-// 'a=b&a=c&a=d'
-```
-
-You may use the `arrayFormat` option to specify the format of the output array:
-
-```javascript
-qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })
-// 'a[0]=b&a[1]=c'
-qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })
-// 'a[]=b&a[]=c'
-qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })
-// 'a=b&a=c'
-```
-
-When objects are stringified, by default they use bracket notation:
-
-```javascript
-qs.stringify({ a: { b: { c: 'd', e: 'f' } } });
-// 'a[b][c]=d&a[b][e]=f'
-```
-
-You may override this to use dot notation by setting the `allowDots` option to `true`:
-
-```javascript
-qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true });
-// 'a.b.c=d&a.b.e=f'
-```
-
-Empty strings and null values will omit the value, but the equals sign (=) remains in place:
-
-```javascript
-assert.equal(qs.stringify({ a: '' }), 'a=');
-```
-
-Key with no values (such as an empty object or array) will return nothing:
-
-```javascript
-assert.equal(qs.stringify({ a: [] }), '');
-assert.equal(qs.stringify({ a: {} }), '');
-assert.equal(qs.stringify({ a: [{}] }), '');
-assert.equal(qs.stringify({ a: { b: []} }), '');
-assert.equal(qs.stringify({ a: { b: {}} }), '');
-```
-
-Properties that are set to `undefined` will be omitted entirely:
-
-```javascript
-assert.equal(qs.stringify({ a: null, b: undefined }), 'a=');
-```
-
-The delimiter may be overridden with stringify as well:
-
-```javascript
-assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
-```
-
-If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option:
-
-```javascript
-var date = new Date(7);
-assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A'));
-assert.equal(
- qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }),
- 'a=7'
-);
-```
-
-You may use the `sort` option to affect the order of parameter keys:
-
-```javascript
-function alphabeticalSort(a, b) {
- return a.localeCompare(b);
-}
-assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y');
-```
-
-Finally, you can use the `filter` option to restrict which keys will be included in the stringified output.
-If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you
-pass an array, it will be used to select properties and array indices for stringification:
-
-```javascript
-function filterFunc(prefix, value) {
- if (prefix == 'b') {
- // Return an `undefined` value to omit a property.
- return;
- }
- if (prefix == 'e[f]') {
- return value.getTime();
- }
- if (prefix == 'e[g][0]') {
- return value * 2;
- }
- return value;
-}
-qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc });
-// 'a=b&c=d&e[f]=123&e[g][0]=4'
-qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] });
-// 'a=b&e=f'
-qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] });
-// 'a[0]=b&a[2]=d'
-```
-
-### Handling of `null` values
-
-By default, `null` values are treated like empty strings:
-
-```javascript
-var withNull = qs.stringify({ a: null, b: '' });
-assert.equal(withNull, 'a=&b=');
-```
-
-Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings.
-
-```javascript
-var equalsInsensitive = qs.parse('a&b=');
-assert.deepEqual(equalsInsensitive, { a: '', b: '' });
-```
-
-To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null`
-values have no `=` sign:
-
-```javascript
-var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true });
-assert.equal(strictNull, 'a&b=');
-```
-
-To parse values without `=` back to `null` use the `strictNullHandling` flag:
-
-```javascript
-var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true });
-assert.deepEqual(parsedStrictNull, { a: null, b: '' });
-```
-
-To completely skip rendering keys with `null` values, use the `skipNulls` flag:
-
-```javascript
-var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });
-assert.equal(nullsSkipped, 'a=b');
-```
-
-### Dealing with special character sets
-
-By default the encoding and decoding of characters is done in `utf-8`. If you
-wish to encode querystrings to a different character set (i.e.
-[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the
-[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:
-
-```javascript
-var encoder = require('qs-iconv/encoder')('shift_jis');
-var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });
-assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');
-```
-
-This also works for decoding of query strings:
-
-```javascript
-var decoder = require('qs-iconv/decoder')('shift_jis');
-var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
-assert.deepEqual(obj, { a: 'こんにちは!' });
-```
-
-### RFC 3986 and RFC 1738 space encoding
-
-RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible.
-In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'.
-
-```
-assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
-assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');
-assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');
-```
diff --git a/node_modules/node-gyp/node_modules/qs/dist/qs.js b/node_modules/node-gyp/node_modules/qs/dist/qs.js
deleted file mode 100644
index 2d0d63ff2..000000000
--- a/node_modules/node-gyp/node_modules/qs/dist/qs.js
+++ /dev/null
@@ -1,597 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-'use strict';
-
-var replace = String.prototype.replace;
-var percentTwenties = /%20/g;
-
-module.exports = {
- 'default': 'RFC3986',
- formatters: {
- RFC1738: function (value) {
- return replace.call(value, percentTwenties, '+');
- },
- RFC3986: function (value) {
- return value;
- }
- },
- RFC1738: 'RFC1738',
- RFC3986: 'RFC3986'
-};
-
-},{}],2:[function(require,module,exports){
-'use strict';
-
-var stringify = require('./stringify');
-var parse = require('./parse');
-var formats = require('./formats');
-
-module.exports = {
- formats: formats,
- parse: parse,
- stringify: stringify
-};
-
-},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(require,module,exports){
-'use strict';
-
-var utils = require('./utils');
-
-var has = Object.prototype.hasOwnProperty;
-
-var defaults = {
- allowDots: false,
- allowPrototypes: false,
- arrayLimit: 20,
- decoder: utils.decode,
- delimiter: '&',
- depth: 5,
- parameterLimit: 1000,
- plainObjects: false,
- strictNullHandling: false
-};
-
-var parseValues = function parseQueryStringValues(str, options) {
- var obj = {};
- var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
-
- for (var i = 0; i < parts.length; ++i) {
- var part = parts[i];
- var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
-
- var key, val;
- if (pos === -1) {
- key = options.decoder(part);
- val = options.strictNullHandling ? null : '';
- } else {
- key = options.decoder(part.slice(0, pos));
- val = options.decoder(part.slice(pos + 1));
- }
- if (has.call(obj, key)) {
- obj[key] = [].concat(obj[key]).concat(val);
- } else {
- obj[key] = val;
- }
- }
-
- return obj;
-};
-
-var parseObject = function parseObjectRecursive(chain, val, options) {
- if (!chain.length) {
- return val;
- }
-
- var root = chain.shift();
-
- var obj;
- if (root === '[]') {
- obj = [];
- obj = obj.concat(parseObject(chain, val, options));
- } else {
- obj = options.plainObjects ? Object.create(null) : {};
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
- var index = parseInt(cleanRoot, 10);
- if (
- !isNaN(index) &&
- root !== cleanRoot &&
- String(index) === cleanRoot &&
- index >= 0 &&
- (options.parseArrays && index <= options.arrayLimit)
- ) {
- obj = [];
- obj[index] = parseObject(chain, val, options);
- } else {
- obj[cleanRoot] = parseObject(chain, val, options);
- }
- }
-
- return obj;
-};
-
-var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
- if (!givenKey) {
- return;
- }
-
- // Transform dot notation to bracket notation
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
-
- // The regex chunks
-
- var brackets = /(\[[^[\]]*])/;
- var child = /(\[[^[\]]*])/g;
-
- // Get the parent
-
- var segment = brackets.exec(key);
- var parent = segment ? key.slice(0, segment.index) : key;
-
- // Stash the parent if it exists
-
- var keys = [];
- if (parent) {
- // If we aren't using plain objects, optionally prefix keys
- // that would overwrite object prototype properties
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
- if (!options.allowPrototypes) {
- return;
- }
- }
-
- keys.push(parent);
- }
-
- // Loop through children appending to the array until we hit depth
-
- var i = 0;
- while ((segment = child.exec(key)) !== null && i < options.depth) {
- i += 1;
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
- if (!options.allowPrototypes) {
- return;
- }
- }
- keys.push(segment[1]);
- }
-
- // If there's a remainder, just add whatever is left
-
- if (segment) {
- keys.push('[' + key.slice(segment.index) + ']');
- }
-
- return parseObject(keys, val, options);
-};
-
-module.exports = function (str, opts) {
- var options = opts || {};
-
- if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
- throw new TypeError('Decoder has to be a function.');
- }
-
- options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
- options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
- options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
- options.parseArrays = options.parseArrays !== false;
- options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
- options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
- options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
- options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
- options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
- options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
-
- if (str === '' || str === null || typeof str === 'undefined') {
- return options.plainObjects ? Object.create(null) : {};
- }
-
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
- var obj = options.plainObjects ? Object.create(null) : {};
-
- // Iterate over the keys and setup the new object
-
- var keys = Object.keys(tempObj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var newObj = parseKeys(key, tempObj[key], options);
- obj = utils.merge(obj, newObj, options);
- }
-
- return utils.compact(obj);
-};
-
-},{"./utils":5}],4:[function(require,module,exports){
-'use strict';
-
-var utils = require('./utils');
-var formats = require('./formats');
-
-var arrayPrefixGenerators = {
- brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
- return prefix + '[]';
- },
- indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
- return prefix + '[' + key + ']';
- },
- repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
- return prefix;
- }
-};
-
-var toISO = Date.prototype.toISOString;
-
-var defaults = {
- delimiter: '&',
- encode: true,
- encoder: utils.encode,
- encodeValuesOnly: false,
- serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
- return toISO.call(date);
- },
- skipNulls: false,
- strictNullHandling: false
-};
-
-var stringify = function stringify( // eslint-disable-line func-name-matching
- object,
- prefix,
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encoder,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
-) {
- var obj = object;
- if (typeof filter === 'function') {
- obj = filter(prefix, obj);
- } else if (obj instanceof Date) {
- obj = serializeDate(obj);
- } else if (obj === null) {
- if (strictNullHandling) {
- return encoder && !encodeValuesOnly ? encoder(prefix) : prefix;
- }
-
- obj = '';
- }
-
- if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
- if (encoder) {
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix);
- return [formatter(keyValue) + '=' + formatter(encoder(obj))];
- }
- return [formatter(prefix) + '=' + formatter(String(obj))];
- }
-
- var values = [];
-
- if (typeof obj === 'undefined') {
- return values;
- }
-
- var objKeys;
- if (Array.isArray(filter)) {
- objKeys = filter;
- } else {
- var keys = Object.keys(obj);
- objKeys = sort ? keys.sort(sort) : keys;
- }
-
- for (var i = 0; i < objKeys.length; ++i) {
- var key = objKeys[i];
-
- if (skipNulls && obj[key] === null) {
- continue;
- }
-
- if (Array.isArray(obj)) {
- values = values.concat(stringify(
- obj[key],
- generateArrayPrefix(prefix, key),
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encoder,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
- ));
- } else {
- values = values.concat(stringify(
- obj[key],
- prefix + (allowDots ? '.' + key : '[' + key + ']'),
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encoder,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
- ));
- }
- }
-
- return values;
-};
-
-module.exports = function (object, opts) {
- var obj = object;
- var options = opts || {};
-
- if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
- throw new TypeError('Encoder has to be a function.');
- }
-
- var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
- var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
- var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
- var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
- var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
- var sort = typeof options.sort === 'function' ? options.sort : null;
- var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
- var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
- var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
- if (typeof options.format === 'undefined') {
- options.format = formats.default;
- } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
- throw new TypeError('Unknown format option provided.');
- }
- var formatter = formats.formatters[options.format];
- var objKeys;
- var filter;
-
- if (typeof options.filter === 'function') {
- filter = options.filter;
- obj = filter('', obj);
- } else if (Array.isArray(options.filter)) {
- filter = options.filter;
- objKeys = filter;
- }
-
- var keys = [];
-
- if (typeof obj !== 'object' || obj === null) {
- return '';
- }
-
- var arrayFormat;
- if (options.arrayFormat in arrayPrefixGenerators) {
- arrayFormat = options.arrayFormat;
- } else if ('indices' in options) {
- arrayFormat = options.indices ? 'indices' : 'repeat';
- } else {
- arrayFormat = 'indices';
- }
-
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
-
- if (!objKeys) {
- objKeys = Object.keys(obj);
- }
-
- if (sort) {
- objKeys.sort(sort);
- }
-
- for (var i = 0; i < objKeys.length; ++i) {
- var key = objKeys[i];
-
- if (skipNulls && obj[key] === null) {
- continue;
- }
-
- keys = keys.concat(stringify(
- obj[key],
- key,
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encode ? encoder : null,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
- ));
- }
-
- return keys.join(delimiter);
-};
-
-},{"./formats":1,"./utils":5}],5:[function(require,module,exports){
-'use strict';
-
-var has = Object.prototype.hasOwnProperty;
-
-var hexTable = (function () {
- var array = [];
- for (var i = 0; i < 256; ++i) {
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
- }
-
- return array;
-}());
-
-exports.arrayToObject = function (source, options) {
- var obj = options && options.plainObjects ? Object.create(null) : {};
- for (var i = 0; i < source.length; ++i) {
- if (typeof source[i] !== 'undefined') {
- obj[i] = source[i];
- }
- }
-
- return obj;
-};
-
-exports.merge = function (target, source, options) {
- if (!source) {
- return target;
- }
-
- if (typeof source !== 'object') {
- if (Array.isArray(target)) {
- target.push(source);
- } else if (typeof target === 'object') {
- if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
- target[source] = true;
- }
- } else {
- return [target, source];
- }
-
- return target;
- }
-
- if (typeof target !== 'object') {
- return [target].concat(source);
- }
-
- var mergeTarget = target;
- if (Array.isArray(target) && !Array.isArray(source)) {
- mergeTarget = exports.arrayToObject(target, options);
- }
-
- if (Array.isArray(target) && Array.isArray(source)) {
- source.forEach(function (item, i) {
- if (has.call(target, i)) {
- if (target[i] && typeof target[i] === 'object') {
- target[i] = exports.merge(target[i], item, options);
- } else {
- target.push(item);
- }
- } else {
- target[i] = item;
- }
- });
- return target;
- }
-
- return Object.keys(source).reduce(function (acc, key) {
- var value = source[key];
-
- if (Object.prototype.hasOwnProperty.call(acc, key)) {
- acc[key] = exports.merge(acc[key], value, options);
- } else {
- acc[key] = value;
- }
- return acc;
- }, mergeTarget);
-};
-
-exports.decode = function (str) {
- try {
- return decodeURIComponent(str.replace(/\+/g, ' '));
- } catch (e) {
- return str;
- }
-};
-
-exports.encode = function (str) {
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
- // It has been adapted here for stricter adherence to RFC 3986
- if (str.length === 0) {
- return str;
- }
-
- var string = typeof str === 'string' ? str : String(str);
-
- var out = '';
- for (var i = 0; i < string.length; ++i) {
- var c = string.charCodeAt(i);
-
- if (
- c === 0x2D || // -
- c === 0x2E || // .
- c === 0x5F || // _
- c === 0x7E || // ~
- (c >= 0x30 && c <= 0x39) || // 0-9
- (c >= 0x41 && c <= 0x5A) || // a-z
- (c >= 0x61 && c <= 0x7A) // A-Z
- ) {
- out += string.charAt(i);
- continue;
- }
-
- if (c < 0x80) {
- out = out + hexTable[c];
- continue;
- }
-
- if (c < 0x800) {
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
- continue;
- }
-
- if (c < 0xD800 || c >= 0xE000) {
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
- continue;
- }
-
- i += 1;
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
- out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; // eslint-disable-line max-len
- }
-
- return out;
-};
-
-exports.compact = function (obj, references) {
- if (typeof obj !== 'object' || obj === null) {
- return obj;
- }
-
- var refs = references || [];
- var lookup = refs.indexOf(obj);
- if (lookup !== -1) {
- return refs[lookup];
- }
-
- refs.push(obj);
-
- if (Array.isArray(obj)) {
- var compacted = [];
-
- for (var i = 0; i < obj.length; ++i) {
- if (obj[i] && typeof obj[i] === 'object') {
- compacted.push(exports.compact(obj[i], refs));
- } else if (typeof obj[i] !== 'undefined') {
- compacted.push(obj[i]);
- }
- }
-
- return compacted;
- }
-
- var keys = Object.keys(obj);
- keys.forEach(function (key) {
- obj[key] = exports.compact(obj[key], refs);
- });
-
- return obj;
-};
-
-exports.isRegExp = function (obj) {
- return Object.prototype.toString.call(obj) === '[object RegExp]';
-};
-
-exports.isBuffer = function (obj) {
- if (obj === null || typeof obj === 'undefined') {
- return false;
- }
-
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
-};
-
-},{}]},{},[2])(2)
-}); \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/qs/lib/formats.js b/node_modules/node-gyp/node_modules/qs/lib/formats.js
deleted file mode 100644
index df4599752..000000000
--- a/node_modules/node-gyp/node_modules/qs/lib/formats.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var replace = String.prototype.replace;
-var percentTwenties = /%20/g;
-
-module.exports = {
- 'default': 'RFC3986',
- formatters: {
- RFC1738: function (value) {
- return replace.call(value, percentTwenties, '+');
- },
- RFC3986: function (value) {
- return value;
- }
- },
- RFC1738: 'RFC1738',
- RFC3986: 'RFC3986'
-};
diff --git a/node_modules/node-gyp/node_modules/qs/lib/index.js b/node_modules/node-gyp/node_modules/qs/lib/index.js
deleted file mode 100644
index 0d6a97dcf..000000000
--- a/node_modules/node-gyp/node_modules/qs/lib/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var stringify = require('./stringify');
-var parse = require('./parse');
-var formats = require('./formats');
-
-module.exports = {
- formats: formats,
- parse: parse,
- stringify: stringify
-};
diff --git a/node_modules/node-gyp/node_modules/qs/lib/parse.js b/node_modules/node-gyp/node_modules/qs/lib/parse.js
deleted file mode 100644
index 1307e9d79..000000000
--- a/node_modules/node-gyp/node_modules/qs/lib/parse.js
+++ /dev/null
@@ -1,167 +0,0 @@
-'use strict';
-
-var utils = require('./utils');
-
-var has = Object.prototype.hasOwnProperty;
-
-var defaults = {
- allowDots: false,
- allowPrototypes: false,
- arrayLimit: 20,
- decoder: utils.decode,
- delimiter: '&',
- depth: 5,
- parameterLimit: 1000,
- plainObjects: false,
- strictNullHandling: false
-};
-
-var parseValues = function parseQueryStringValues(str, options) {
- var obj = {};
- var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
-
- for (var i = 0; i < parts.length; ++i) {
- var part = parts[i];
- var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
-
- var key, val;
- if (pos === -1) {
- key = options.decoder(part);
- val = options.strictNullHandling ? null : '';
- } else {
- key = options.decoder(part.slice(0, pos));
- val = options.decoder(part.slice(pos + 1));
- }
- if (has.call(obj, key)) {
- obj[key] = [].concat(obj[key]).concat(val);
- } else {
- obj[key] = val;
- }
- }
-
- return obj;
-};
-
-var parseObject = function parseObjectRecursive(chain, val, options) {
- if (!chain.length) {
- return val;
- }
-
- var root = chain.shift();
-
- var obj;
- if (root === '[]') {
- obj = [];
- obj = obj.concat(parseObject(chain, val, options));
- } else {
- obj = options.plainObjects ? Object.create(null) : {};
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
- var index = parseInt(cleanRoot, 10);
- if (
- !isNaN(index) &&
- root !== cleanRoot &&
- String(index) === cleanRoot &&
- index >= 0 &&
- (options.parseArrays && index <= options.arrayLimit)
- ) {
- obj = [];
- obj[index] = parseObject(chain, val, options);
- } else {
- obj[cleanRoot] = parseObject(chain, val, options);
- }
- }
-
- return obj;
-};
-
-var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
- if (!givenKey) {
- return;
- }
-
- // Transform dot notation to bracket notation
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
-
- // The regex chunks
-
- var brackets = /(\[[^[\]]*])/;
- var child = /(\[[^[\]]*])/g;
-
- // Get the parent
-
- var segment = brackets.exec(key);
- var parent = segment ? key.slice(0, segment.index) : key;
-
- // Stash the parent if it exists
-
- var keys = [];
- if (parent) {
- // If we aren't using plain objects, optionally prefix keys
- // that would overwrite object prototype properties
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
- if (!options.allowPrototypes) {
- return;
- }
- }
-
- keys.push(parent);
- }
-
- // Loop through children appending to the array until we hit depth
-
- var i = 0;
- while ((segment = child.exec(key)) !== null && i < options.depth) {
- i += 1;
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
- if (!options.allowPrototypes) {
- return;
- }
- }
- keys.push(segment[1]);
- }
-
- // If there's a remainder, just add whatever is left
-
- if (segment) {
- keys.push('[' + key.slice(segment.index) + ']');
- }
-
- return parseObject(keys, val, options);
-};
-
-module.exports = function (str, opts) {
- var options = opts || {};
-
- if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
- throw new TypeError('Decoder has to be a function.');
- }
-
- options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
- options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
- options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
- options.parseArrays = options.parseArrays !== false;
- options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
- options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
- options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
- options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
- options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
- options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
-
- if (str === '' || str === null || typeof str === 'undefined') {
- return options.plainObjects ? Object.create(null) : {};
- }
-
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
- var obj = options.plainObjects ? Object.create(null) : {};
-
- // Iterate over the keys and setup the new object
-
- var keys = Object.keys(tempObj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var newObj = parseKeys(key, tempObj[key], options);
- obj = utils.merge(obj, newObj, options);
- }
-
- return utils.compact(obj);
-};
diff --git a/node_modules/node-gyp/node_modules/qs/lib/stringify.js b/node_modules/node-gyp/node_modules/qs/lib/stringify.js
deleted file mode 100644
index 7694988c0..000000000
--- a/node_modules/node-gyp/node_modules/qs/lib/stringify.js
+++ /dev/null
@@ -1,207 +0,0 @@
-'use strict';
-
-var utils = require('./utils');
-var formats = require('./formats');
-
-var arrayPrefixGenerators = {
- brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
- return prefix + '[]';
- },
- indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
- return prefix + '[' + key + ']';
- },
- repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
- return prefix;
- }
-};
-
-var toISO = Date.prototype.toISOString;
-
-var defaults = {
- delimiter: '&',
- encode: true,
- encoder: utils.encode,
- encodeValuesOnly: false,
- serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
- return toISO.call(date);
- },
- skipNulls: false,
- strictNullHandling: false
-};
-
-var stringify = function stringify( // eslint-disable-line func-name-matching
- object,
- prefix,
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encoder,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
-) {
- var obj = object;
- if (typeof filter === 'function') {
- obj = filter(prefix, obj);
- } else if (obj instanceof Date) {
- obj = serializeDate(obj);
- } else if (obj === null) {
- if (strictNullHandling) {
- return encoder && !encodeValuesOnly ? encoder(prefix) : prefix;
- }
-
- obj = '';
- }
-
- if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
- if (encoder) {
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix);
- return [formatter(keyValue) + '=' + formatter(encoder(obj))];
- }
- return [formatter(prefix) + '=' + formatter(String(obj))];
- }
-
- var values = [];
-
- if (typeof obj === 'undefined') {
- return values;
- }
-
- var objKeys;
- if (Array.isArray(filter)) {
- objKeys = filter;
- } else {
- var keys = Object.keys(obj);
- objKeys = sort ? keys.sort(sort) : keys;
- }
-
- for (var i = 0; i < objKeys.length; ++i) {
- var key = objKeys[i];
-
- if (skipNulls && obj[key] === null) {
- continue;
- }
-
- if (Array.isArray(obj)) {
- values = values.concat(stringify(
- obj[key],
- generateArrayPrefix(prefix, key),
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encoder,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
- ));
- } else {
- values = values.concat(stringify(
- obj[key],
- prefix + (allowDots ? '.' + key : '[' + key + ']'),
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encoder,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
- ));
- }
- }
-
- return values;
-};
-
-module.exports = function (object, opts) {
- var obj = object;
- var options = opts || {};
-
- if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
- throw new TypeError('Encoder has to be a function.');
- }
-
- var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
- var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
- var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
- var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
- var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
- var sort = typeof options.sort === 'function' ? options.sort : null;
- var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
- var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
- var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
- if (typeof options.format === 'undefined') {
- options.format = formats.default;
- } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
- throw new TypeError('Unknown format option provided.');
- }
- var formatter = formats.formatters[options.format];
- var objKeys;
- var filter;
-
- if (typeof options.filter === 'function') {
- filter = options.filter;
- obj = filter('', obj);
- } else if (Array.isArray(options.filter)) {
- filter = options.filter;
- objKeys = filter;
- }
-
- var keys = [];
-
- if (typeof obj !== 'object' || obj === null) {
- return '';
- }
-
- var arrayFormat;
- if (options.arrayFormat in arrayPrefixGenerators) {
- arrayFormat = options.arrayFormat;
- } else if ('indices' in options) {
- arrayFormat = options.indices ? 'indices' : 'repeat';
- } else {
- arrayFormat = 'indices';
- }
-
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
-
- if (!objKeys) {
- objKeys = Object.keys(obj);
- }
-
- if (sort) {
- objKeys.sort(sort);
- }
-
- for (var i = 0; i < objKeys.length; ++i) {
- var key = objKeys[i];
-
- if (skipNulls && obj[key] === null) {
- continue;
- }
-
- keys = keys.concat(stringify(
- obj[key],
- key,
- generateArrayPrefix,
- strictNullHandling,
- skipNulls,
- encode ? encoder : null,
- filter,
- sort,
- allowDots,
- serializeDate,
- formatter,
- encodeValuesOnly
- ));
- }
-
- return keys.join(delimiter);
-};
diff --git a/node_modules/node-gyp/node_modules/qs/lib/utils.js b/node_modules/node-gyp/node_modules/qs/lib/utils.js
deleted file mode 100644
index b21433237..000000000
--- a/node_modules/node-gyp/node_modules/qs/lib/utils.js
+++ /dev/null
@@ -1,182 +0,0 @@
-'use strict';
-
-var has = Object.prototype.hasOwnProperty;
-
-var hexTable = (function () {
- var array = [];
- for (var i = 0; i < 256; ++i) {
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
- }
-
- return array;
-}());
-
-exports.arrayToObject = function (source, options) {
- var obj = options && options.plainObjects ? Object.create(null) : {};
- for (var i = 0; i < source.length; ++i) {
- if (typeof source[i] !== 'undefined') {
- obj[i] = source[i];
- }
- }
-
- return obj;
-};
-
-exports.merge = function (target, source, options) {
- if (!source) {
- return target;
- }
-
- if (typeof source !== 'object') {
- if (Array.isArray(target)) {
- target.push(source);
- } else if (typeof target === 'object') {
- if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
- target[source] = true;
- }
- } else {
- return [target, source];
- }
-
- return target;
- }
-
- if (typeof target !== 'object') {
- return [target].concat(source);
- }
-
- var mergeTarget = target;
- if (Array.isArray(target) && !Array.isArray(source)) {
- mergeTarget = exports.arrayToObject(target, options);
- }
-
- if (Array.isArray(target) && Array.isArray(source)) {
- source.forEach(function (item, i) {
- if (has.call(target, i)) {
- if (target[i] && typeof target[i] === 'object') {
- target[i] = exports.merge(target[i], item, options);
- } else {
- target.push(item);
- }
- } else {
- target[i] = item;
- }
- });
- return target;
- }
-
- return Object.keys(source).reduce(function (acc, key) {
- var value = source[key];
-
- if (Object.prototype.hasOwnProperty.call(acc, key)) {
- acc[key] = exports.merge(acc[key], value, options);
- } else {
- acc[key] = value;
- }
- return acc;
- }, mergeTarget);
-};
-
-exports.decode = function (str) {
- try {
- return decodeURIComponent(str.replace(/\+/g, ' '));
- } catch (e) {
- return str;
- }
-};
-
-exports.encode = function (str) {
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
- // It has been adapted here for stricter adherence to RFC 3986
- if (str.length === 0) {
- return str;
- }
-
- var string = typeof str === 'string' ? str : String(str);
-
- var out = '';
- for (var i = 0; i < string.length; ++i) {
- var c = string.charCodeAt(i);
-
- if (
- c === 0x2D || // -
- c === 0x2E || // .
- c === 0x5F || // _
- c === 0x7E || // ~
- (c >= 0x30 && c <= 0x39) || // 0-9
- (c >= 0x41 && c <= 0x5A) || // a-z
- (c >= 0x61 && c <= 0x7A) // A-Z
- ) {
- out += string.charAt(i);
- continue;
- }
-
- if (c < 0x80) {
- out = out + hexTable[c];
- continue;
- }
-
- if (c < 0x800) {
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
- continue;
- }
-
- if (c < 0xD800 || c >= 0xE000) {
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
- continue;
- }
-
- i += 1;
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
- out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; // eslint-disable-line max-len
- }
-
- return out;
-};
-
-exports.compact = function (obj, references) {
- if (typeof obj !== 'object' || obj === null) {
- return obj;
- }
-
- var refs = references || [];
- var lookup = refs.indexOf(obj);
- if (lookup !== -1) {
- return refs[lookup];
- }
-
- refs.push(obj);
-
- if (Array.isArray(obj)) {
- var compacted = [];
-
- for (var i = 0; i < obj.length; ++i) {
- if (obj[i] && typeof obj[i] === 'object') {
- compacted.push(exports.compact(obj[i], refs));
- } else if (typeof obj[i] !== 'undefined') {
- compacted.push(obj[i]);
- }
- }
-
- return compacted;
- }
-
- var keys = Object.keys(obj);
- keys.forEach(function (key) {
- obj[key] = exports.compact(obj[key], refs);
- });
-
- return obj;
-};
-
-exports.isRegExp = function (obj) {
- return Object.prototype.toString.call(obj) === '[object RegExp]';
-};
-
-exports.isBuffer = function (obj) {
- if (obj === null || typeof obj === 'undefined') {
- return false;
- }
-
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
-};
diff --git a/node_modules/node-gyp/node_modules/qs/package.json b/node_modules/node-gyp/node_modules/qs/package.json
deleted file mode 100644
index 12a440a67..000000000
--- a/node_modules/node-gyp/node_modules/qs/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "_from": "qs@~6.4.0",
- "_id": "qs@6.4.0",
- "_inBundle": false,
- "_integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
- "_location": "/node-gyp/qs",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "qs@~6.4.0",
- "name": "qs",
- "escapedName": "qs",
- "rawSpec": "~6.4.0",
- "saveSpec": null,
- "fetchSpec": "~6.4.0"
- },
- "_requiredBy": [
- "/node-gyp/request"
- ],
- "_resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz",
- "_shasum": "13e26d28ad6b0ffaa91312cd3bf708ed351e7233",
- "_spec": "qs@~6.4.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp/node_modules/request",
- "bugs": {
- "url": "https://github.com/ljharb/qs/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Jordan Harband",
- "email": "ljharb@gmail.com",
- "url": "http://ljharb.codes"
- }
- ],
- "dependencies": {},
- "deprecated": false,
- "description": "A querystring parser that supports nesting and arrays, with a depth limit",
- "devDependencies": {
- "@ljharb/eslint-config": "^11.0.0",
- "browserify": "^14.1.0",
- "covert": "^1.1.0",
- "eslint": "^3.17.0",
- "evalmd": "^0.0.17",
- "iconv-lite": "^0.4.15",
- "mkdirp": "^0.5.1",
- "parallelshell": "^2.0.0",
- "qs-iconv": "^1.0.4",
- "safe-publish-latest": "^1.1.1",
- "tape": "^4.6.3"
- },
- "engines": {
- "node": ">=0.6"
- },
- "homepage": "https://github.com/ljharb/qs",
- "keywords": [
- "querystring",
- "qs"
- ],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
- "name": "qs",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/ljharb/qs.git"
- },
- "scripts": {
- "coverage": "covert test",
- "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js",
- "lint": "eslint lib/*.js test/*.js",
- "prepublish": "safe-publish-latest && npm run dist",
- "pretest": "npm run --silent readme && npm run --silent lint",
- "readme": "evalmd README.md",
- "test": "npm run --silent coverage",
- "tests-only": "node test"
- },
- "version": "6.4.0"
-}
diff --git a/node_modules/node-gyp/node_modules/qs/test/index.js b/node_modules/node-gyp/node_modules/qs/test/index.js
deleted file mode 100644
index 5e6bc8fbd..000000000
--- a/node_modules/node-gyp/node_modules/qs/test/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-require('./parse');
-
-require('./stringify');
-
-require('./utils');
diff --git a/node_modules/node-gyp/node_modules/qs/test/parse.js b/node_modules/node-gyp/node_modules/qs/test/parse.js
deleted file mode 100644
index e451e91fe..000000000
--- a/node_modules/node-gyp/node_modules/qs/test/parse.js
+++ /dev/null
@@ -1,519 +0,0 @@
-'use strict';
-
-var test = require('tape');
-var qs = require('../');
-var iconv = require('iconv-lite');
-
-test('parse()', function (t) {
- t.test('parses a simple string', function (st) {
- st.deepEqual(qs.parse('0=foo'), { 0: 'foo' });
- st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' });
- st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } });
- st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } });
- st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } });
- st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null });
- st.deepEqual(qs.parse('foo'), { foo: '' });
- st.deepEqual(qs.parse('foo='), { foo: '' });
- st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' });
- st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' });
- st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' });
- st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' });
- st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' });
- st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null });
- st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' });
- st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), {
- cht: 'p3',
- chd: 't:60,40',
- chs: '250x100',
- chl: 'Hello|World'
- });
- st.end();
- });
-
- t.test('allows enabling dot notation', function (st) {
- st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' });
- st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } });
- st.end();
- });
-
- t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string');
- t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string');
- t.deepEqual(
- qs.parse('a[b][c][d][e][f][g][h]=i'),
- { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } },
- 'defaults to a depth of 5'
- );
-
- t.test('only parses one level when depth = 1', function (st) {
- st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } });
- st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } });
- st.end();
- });
-
- t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array');
-
- t.test('parses an explicit array', function (st) {
- st.deepEqual(qs.parse('a[]=b'), { a: ['b'] });
- st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] });
- st.end();
- });
-
- t.test('parses a mix of simple and explicit arrays', function (st) {
- st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] });
-
- st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
-
- st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] });
-
- st.end();
- });
-
- t.test('parses a nested array', function (st) {
- st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } });
- st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } });
- st.end();
- });
-
- t.test('allows to specify array indices', function (st) {
- st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] });
- st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] });
- st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } });
- st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] });
- st.end();
- });
-
- t.test('limits specific array indices to arrayLimit', function (st) {
- st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] });
- st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } });
- st.end();
- });
-
- t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number');
-
- t.test('supports encoded = signs', function (st) {
- st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' });
- st.end();
- });
-
- t.test('is ok with url encoded strings', function (st) {
- st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } });
- st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } });
- st.end();
- });
-
- t.test('allows brackets in the value', function (st) {
- st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' });
- st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' });
- st.end();
- });
-
- t.test('allows empty values', function (st) {
- st.deepEqual(qs.parse(''), {});
- st.deepEqual(qs.parse(null), {});
- st.deepEqual(qs.parse(undefined), {});
- st.end();
- });
-
- t.test('transforms arrays to objects', function (st) {
- st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } });
- st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } });
- st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } });
- st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } });
- st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } });
- st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
-
- st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } });
- st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } });
- st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } });
- st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } });
- st.end();
- });
-
- t.test('transforms arrays to objects (dot notation)', function (st) {
- st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } });
- st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } });
- st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } });
- st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] });
- st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] });
- st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } });
- st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } });
- st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } });
- st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } });
- st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
- st.end();
- });
-
- t.test('correctly prunes undefined values when converting an array to an object', function (st) {
- st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } });
- st.end();
- });
-
- t.test('supports malformed uri characters', function (st) {
- st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null });
- st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' });
- st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' });
- st.end();
- });
-
- t.test('doesn\'t produce empty keys', function (st) {
- st.deepEqual(qs.parse('_r=1&'), { _r: '1' });
- st.end();
- });
-
- t.test('cannot access Object prototype', function (st) {
- qs.parse('constructor[prototype][bad]=bad');
- qs.parse('bad[constructor][prototype][bad]=bad');
- st.equal(typeof Object.prototype.bad, 'undefined');
- st.end();
- });
-
- t.test('parses arrays of objects', function (st) {
- st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
- st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] });
- st.end();
- });
-
- t.test('allows for empty strings in arrays', function (st) {
- st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] });
-
- st.deepEqual(
- qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }),
- { a: ['b', null, 'c', ''] },
- 'with arrayLimit 20 + array indices: null then empty string works'
- );
- st.deepEqual(
- qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }),
- { a: ['b', null, 'c', ''] },
- 'with arrayLimit 0 + array brackets: null then empty string works'
- );
-
- st.deepEqual(
- qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }),
- { a: ['b', '', 'c', null] },
- 'with arrayLimit 20 + array indices: empty string then null works'
- );
- st.deepEqual(
- qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }),
- { a: ['b', '', 'c', null] },
- 'with arrayLimit 0 + array brackets: empty string then null works'
- );
-
- st.deepEqual(
- qs.parse('a[]=&a[]=b&a[]=c'),
- { a: ['', 'b', 'c'] },
- 'array brackets: empty strings work'
- );
- st.end();
- });
-
- t.test('compacts sparse arrays', function (st) {
- st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] });
- st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] });
- st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] });
- st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] });
- st.end();
- });
-
- t.test('parses semi-parsed strings', function (st) {
- st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } });
- st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } });
- st.end();
- });
-
- t.test('parses buffers correctly', function (st) {
- var b = new Buffer('test');
- st.deepEqual(qs.parse({ a: b }), { a: b });
- st.end();
- });
-
- t.test('continues parsing when no parent is found', function (st) {
- st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' });
- st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' });
- st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' });
- st.end();
- });
-
- t.test('does not error when parsing a very long array', function (st) {
- var str = 'a[]=a';
- while (Buffer.byteLength(str) < 128 * 1024) {
- str = str + '&' + str;
- }
-
- st.doesNotThrow(function () {
- qs.parse(str);
- });
-
- st.end();
- });
-
- t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) {
- Object.prototype.crash = '';
- Array.prototype.crash = '';
- st.doesNotThrow(qs.parse.bind(null, 'a=b'));
- st.deepEqual(qs.parse('a=b'), { a: 'b' });
- st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c'));
- st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
- delete Object.prototype.crash;
- delete Array.prototype.crash;
- st.end();
- });
-
- t.test('parses a string with an alternative string delimiter', function (st) {
- st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' });
- st.end();
- });
-
- t.test('parses a string with an alternative RegExp delimiter', function (st) {
- st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' });
- st.end();
- });
-
- t.test('does not use non-splittable objects as delimiters', function (st) {
- st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' });
- st.end();
- });
-
- t.test('allows overriding parameter limit', function (st) {
- st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' });
- st.end();
- });
-
- t.test('allows setting the parameter limit to Infinity', function (st) {
- st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' });
- st.end();
- });
-
- t.test('allows overriding array limit', function (st) {
- st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } });
- st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } });
- st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } });
- st.end();
- });
-
- t.test('allows disabling array parsing', function (st) {
- st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { 0: 'b', 1: 'c' } });
- st.end();
- });
-
- t.test('parses an object', function (st) {
- var input = {
- 'user[name]': { 'pop[bob]': 3 },
- 'user[email]': null
- };
-
- var expected = {
- user: {
- name: { 'pop[bob]': 3 },
- email: null
- }
- };
-
- var result = qs.parse(input);
-
- st.deepEqual(result, expected);
- st.end();
- });
-
- t.test('parses an object in dot notation', function (st) {
- var input = {
- 'user.name': { 'pop[bob]': 3 },
- 'user.email.': null
- };
-
- var expected = {
- user: {
- name: { 'pop[bob]': 3 },
- email: null
- }
- };
-
- var result = qs.parse(input, { allowDots: true });
-
- st.deepEqual(result, expected);
- st.end();
- });
-
- t.test('parses an object and not child values', function (st) {
- var input = {
- 'user[name]': { 'pop[bob]': { test: 3 } },
- 'user[email]': null
- };
-
- var expected = {
- user: {
- name: { 'pop[bob]': { test: 3 } },
- email: null
- }
- };
-
- var result = qs.parse(input);
-
- st.deepEqual(result, expected);
- st.end();
- });
-
- t.test('does not blow up when Buffer global is missing', function (st) {
- var tempBuffer = global.Buffer;
- delete global.Buffer;
- var result = qs.parse('a=b&c=d');
- global.Buffer = tempBuffer;
- st.deepEqual(result, { a: 'b', c: 'd' });
- st.end();
- });
-
- t.test('does not crash when parsing circular references', function (st) {
- var a = {};
- a.b = a;
-
- var parsed;
-
- st.doesNotThrow(function () {
- parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
- });
-
- st.equal('foo' in parsed, true, 'parsed has "foo" property');
- st.equal('bar' in parsed.foo, true);
- st.equal('baz' in parsed.foo, true);
- st.equal(parsed.foo.bar, 'baz');
- st.deepEqual(parsed.foo.baz, a);
- st.end();
- });
-
- t.test('parses null objects correctly', { skip: !Object.create }, function (st) {
- var a = Object.create(null);
- a.b = 'c';
-
- st.deepEqual(qs.parse(a), { b: 'c' });
- var result = qs.parse({ a: a });
- st.equal('a' in result, true, 'result has "a" property');
- st.deepEqual(result.a, a);
- st.end();
- });
-
- t.test('parses dates correctly', function (st) {
- var now = new Date();
- st.deepEqual(qs.parse({ a: now }), { a: now });
- st.end();
- });
-
- t.test('parses regular expressions correctly', function (st) {
- var re = /^test$/;
- st.deepEqual(qs.parse({ a: re }), { a: re });
- st.end();
- });
-
- t.test('does not allow overwriting prototype properties', function (st) {
- st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {});
- st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {});
-
- st.deepEqual(
- qs.parse('toString', { allowPrototypes: false }),
- {},
- 'bare "toString" results in {}'
- );
-
- st.end();
- });
-
- t.test('can allow overwriting prototype properties', function (st) {
- st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } });
- st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' });
-
- st.deepEqual(
- qs.parse('toString', { allowPrototypes: true }),
- { toString: '' },
- 'bare "toString" results in { toString: "" }'
- );
-
- st.end();
- });
-
- t.test('params starting with a closing bracket', function (st) {
- st.deepEqual(qs.parse(']=toString'), { ']': 'toString' });
- st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' });
- st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' });
- st.end();
- });
-
- t.test('params starting with a starting bracket', function (st) {
- st.deepEqual(qs.parse('[=toString'), { '[': 'toString' });
- st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' });
- st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' });
- st.end();
- });
-
- t.test('add keys to objects', function (st) {
- st.deepEqual(
- qs.parse('a[b]=c&a=d'),
- { a: { b: 'c', d: true } },
- 'can add keys to objects'
- );
-
- st.deepEqual(
- qs.parse('a[b]=c&a=toString'),
- { a: { b: 'c' } },
- 'can not overwrite prototype'
- );
-
- st.deepEqual(
- qs.parse('a[b]=c&a=toString', { allowPrototypes: true }),
- { a: { b: 'c', toString: true } },
- 'can overwrite prototype with allowPrototypes true'
- );
-
- st.deepEqual(
- qs.parse('a[b]=c&a=toString', { plainObjects: true }),
- { a: { b: 'c', toString: true } },
- 'can overwrite prototype with plainObjects true'
- );
-
- st.end();
- });
-
- t.test('can return null objects', { skip: !Object.create }, function (st) {
- var expected = Object.create(null);
- expected.a = Object.create(null);
- expected.a.b = 'c';
- expected.a.hasOwnProperty = 'd';
- st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected);
- st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null));
- var expectedArray = Object.create(null);
- expectedArray.a = Object.create(null);
- expectedArray.a[0] = 'b';
- expectedArray.a.c = 'd';
- st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray);
- st.end();
- });
-
- t.test('can parse with custom encoding', function (st) {
- st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', {
- decoder: function (str) {
- var reg = /%([0-9A-F]{2})/ig;
- var result = [];
- var parts = reg.exec(str);
- while (parts) {
- result.push(parseInt(parts[1], 16));
- parts = reg.exec(str);
- }
- return iconv.decode(new Buffer(result), 'shift_jis').toString();
- }
- }), { 県: '大阪府' });
- st.end();
- });
-
- t.test('throws error with wrong decoder', function (st) {
- st.throws(function () {
- qs.parse({}, { decoder: 'string' });
- }, new TypeError('Decoder has to be a function.'));
- st.end();
- });
-});
diff --git a/node_modules/node-gyp/node_modules/qs/test/stringify.js b/node_modules/node-gyp/node_modules/qs/test/stringify.js
deleted file mode 100644
index 711dae507..000000000
--- a/node_modules/node-gyp/node_modules/qs/test/stringify.js
+++ /dev/null
@@ -1,567 +0,0 @@
-'use strict';
-
-var test = require('tape');
-var qs = require('../');
-var iconv = require('iconv-lite');
-
-test('stringify()', function (t) {
- t.test('stringifies a querystring object', function (st) {
- st.equal(qs.stringify({ a: 'b' }), 'a=b');
- st.equal(qs.stringify({ a: 1 }), 'a=1');
- st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2');
- st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z');
- st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC');
- st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80');
- st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90');
- st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7');
- st.end();
- });
-
- t.test('stringifies a nested object', function (st) {
- st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
- st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e');
- st.end();
- });
-
- t.test('stringifies a nested object with dots notation', function (st) {
- st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c');
- st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e');
- st.end();
- });
-
- t.test('stringifies an array value', function (st) {
- st.equal(
- qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }),
- 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d',
- 'indices => indices'
- );
- st.equal(
- qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }),
- 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d',
- 'brackets => brackets'
- );
- st.equal(
- qs.stringify({ a: ['b', 'c', 'd'] }),
- 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d',
- 'default => indices'
- );
- st.end();
- });
-
- t.test('omits nulls when asked', function (st) {
- st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b');
- st.end();
- });
-
- t.test('omits nested nulls when asked', function (st) {
- st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c');
- st.end();
- });
-
- t.test('omits array indices when asked', function (st) {
- st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d');
- st.end();
- });
-
- t.test('stringifies a nested array value', function (st) {
- st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'indices' }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
- st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'brackets' }), 'a%5Bb%5D%5B%5D=c&a%5Bb%5D%5B%5D=d');
- st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
- st.end();
- });
-
- t.test('stringifies a nested array value with dots notation', function (st) {
- st.equal(
- qs.stringify(
- { a: { b: ['c', 'd'] } },
- { allowDots: true, encode: false, arrayFormat: 'indices' }
- ),
- 'a.b[0]=c&a.b[1]=d',
- 'indices: stringifies with dots + indices'
- );
- st.equal(
- qs.stringify(
- { a: { b: ['c', 'd'] } },
- { allowDots: true, encode: false, arrayFormat: 'brackets' }
- ),
- 'a.b[]=c&a.b[]=d',
- 'brackets: stringifies with dots + brackets'
- );
- st.equal(
- qs.stringify(
- { a: { b: ['c', 'd'] } },
- { allowDots: true, encode: false }
- ),
- 'a.b[0]=c&a.b[1]=d',
- 'default: stringifies with dots + indices'
- );
- st.end();
- });
-
- t.test('stringifies an object inside an array', function (st) {
- st.equal(
- qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices' }),
- 'a%5B0%5D%5Bb%5D=c',
- 'indices => brackets'
- );
- st.equal(
- qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets' }),
- 'a%5B%5D%5Bb%5D=c',
- 'brackets => brackets'
- );
- st.equal(
- qs.stringify({ a: [{ b: 'c' }] }),
- 'a%5B0%5D%5Bb%5D=c',
- 'default => indices'
- );
-
- st.equal(
- qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices' }),
- 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1',
- 'indices => indices'
- );
-
- st.equal(
- qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets' }),
- 'a%5B%5D%5Bb%5D%5Bc%5D%5B%5D=1',
- 'brackets => brackets'
- );
-
- st.equal(
- qs.stringify({ a: [{ b: { c: [1] } }] }),
- 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1',
- 'default => indices'
- );
-
- st.end();
- });
-
- t.test('stringifies an array with mixed objects and primitives', function (st) {
- st.equal(
- qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'indices' }),
- 'a[0][b]=1&a[1]=2&a[2]=3',
- 'indices => indices'
- );
- st.equal(
- qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'brackets' }),
- 'a[][b]=1&a[]=2&a[]=3',
- 'brackets => brackets'
- );
- st.equal(
- qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }),
- 'a[0][b]=1&a[1]=2&a[2]=3',
- 'default => indices'
- );
-
- st.end();
- });
-
- t.test('stringifies an object inside an array with dots notation', function (st) {
- st.equal(
- qs.stringify(
- { a: [{ b: 'c' }] },
- { allowDots: true, encode: false, arrayFormat: 'indices' }
- ),
- 'a[0].b=c',
- 'indices => indices'
- );
- st.equal(
- qs.stringify(
- { a: [{ b: 'c' }] },
- { allowDots: true, encode: false, arrayFormat: 'brackets' }
- ),
- 'a[].b=c',
- 'brackets => brackets'
- );
- st.equal(
- qs.stringify(
- { a: [{ b: 'c' }] },
- { allowDots: true, encode: false }
- ),
- 'a[0].b=c',
- 'default => indices'
- );
-
- st.equal(
- qs.stringify(
- { a: [{ b: { c: [1] } }] },
- { allowDots: true, encode: false, arrayFormat: 'indices' }
- ),
- 'a[0].b.c[0]=1',
- 'indices => indices'
- );
- st.equal(
- qs.stringify(
- { a: [{ b: { c: [1] } }] },
- { allowDots: true, encode: false, arrayFormat: 'brackets' }
- ),
- 'a[].b.c[]=1',
- 'brackets => brackets'
- );
- st.equal(
- qs.stringify(
- { a: [{ b: { c: [1] } }] },
- { allowDots: true, encode: false }
- ),
- 'a[0].b.c[0]=1',
- 'default => indices'
- );
-
- st.end();
- });
-
- t.test('does not omit object keys when indices = false', function (st) {
- st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c');
- st.end();
- });
-
- t.test('uses indices notation for arrays when indices=true', function (st) {
- st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c');
- st.end();
- });
-
- t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) {
- st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c');
- st.end();
- });
-
- t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) {
- st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c');
- st.end();
- });
-
- t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) {
- st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c');
- st.end();
- });
-
- t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) {
- st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c');
- st.end();
- });
-
- t.test('stringifies a complicated object', function (st) {
- st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e');
- st.end();
- });
-
- t.test('stringifies an empty value', function (st) {
- st.equal(qs.stringify({ a: '' }), 'a=');
- st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a');
-
- st.equal(qs.stringify({ a: '', b: '' }), 'a=&b=');
- st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b=');
-
- st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D=');
- st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D');
- st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D=');
-
- st.end();
- });
-
- t.test('stringifies a null object', { skip: !Object.create }, function (st) {
- var obj = Object.create(null);
- obj.a = 'b';
- st.equal(qs.stringify(obj), 'a=b');
- st.end();
- });
-
- t.test('returns an empty string for invalid input', function (st) {
- st.equal(qs.stringify(undefined), '');
- st.equal(qs.stringify(false), '');
- st.equal(qs.stringify(null), '');
- st.equal(qs.stringify(''), '');
- st.end();
- });
-
- t.test('stringifies an object with a null object as a child', { skip: !Object.create }, function (st) {
- var obj = { a: Object.create(null) };
-
- obj.a.b = 'c';
- st.equal(qs.stringify(obj), 'a%5Bb%5D=c');
- st.end();
- });
-
- t.test('drops keys with a value of undefined', function (st) {
- st.equal(qs.stringify({ a: undefined }), '');
-
- st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D');
- st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D=');
- st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D=');
- st.end();
- });
-
- t.test('url encodes values', function (st) {
- st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
- st.end();
- });
-
- t.test('stringifies a date', function (st) {
- var now = new Date();
- var str = 'a=' + encodeURIComponent(now.toISOString());
- st.equal(qs.stringify({ a: now }), str);
- st.end();
- });
-
- t.test('stringifies the weird object from qs', function (st) {
- st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F');
- st.end();
- });
-
- t.test('skips properties that are part of the object prototype', function (st) {
- Object.prototype.crash = 'test';
- st.equal(qs.stringify({ a: 'b' }), 'a=b');
- st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
- delete Object.prototype.crash;
- st.end();
- });
-
- t.test('stringifies boolean values', function (st) {
- st.equal(qs.stringify({ a: true }), 'a=true');
- st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true');
- st.equal(qs.stringify({ b: false }), 'b=false');
- st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false');
- st.end();
- });
-
- t.test('stringifies buffer values', function (st) {
- st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test');
- st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test');
- st.end();
- });
-
- t.test('stringifies an object using an alternative delimiter', function (st) {
- st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
- st.end();
- });
-
- t.test('doesn\'t blow up when Buffer global is missing', function (st) {
- var tempBuffer = global.Buffer;
- delete global.Buffer;
- var result = qs.stringify({ a: 'b', c: 'd' });
- global.Buffer = tempBuffer;
- st.equal(result, 'a=b&c=d');
- st.end();
- });
-
- t.test('selects properties when filter=array', function (st) {
- st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b');
- st.equal(qs.stringify({ a: 1 }, { filter: [] }), '');
-
- st.equal(
- qs.stringify(
- { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
- { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' }
- ),
- 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3',
- 'indices => indices'
- );
- st.equal(
- qs.stringify(
- { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
- { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' }
- ),
- 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3',
- 'brackets => brackets'
- );
- st.equal(
- qs.stringify(
- { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
- { filter: ['a', 'b', 0, 2] }
- ),
- 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3',
- 'default => indices'
- );
-
- st.end();
- });
-
- t.test('supports custom representations when filter=function', function (st) {
- var calls = 0;
- var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } };
- var filterFunc = function (prefix, value) {
- calls += 1;
- if (calls === 1) {
- st.equal(prefix, '', 'prefix is empty');
- st.equal(value, obj);
- } else if (prefix === 'c') {
- return void 0;
- } else if (value instanceof Date) {
- st.equal(prefix, 'e[f]');
- return value.getTime();
- }
- return value;
- };
-
- st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000');
- st.equal(calls, 5);
- st.end();
- });
-
- t.test('can disable uri encoding', function (st) {
- st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b');
- st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c');
- st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c');
- st.end();
- });
-
- t.test('can sort the keys', function (st) {
- var sort = function (a, b) {
- return a.localeCompare(b);
- };
- st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y');
- st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a');
- st.end();
- });
-
- t.test('can sort the keys at depth 3 or more too', function (st) {
- var sort = function (a, b) {
- return a.localeCompare(b);
- };
- st.equal(
- qs.stringify(
- { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' },
- { sort: sort, encode: false }
- ),
- 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb'
- );
- st.equal(
- qs.stringify(
- { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' },
- { sort: null, encode: false }
- ),
- 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b'
- );
- st.end();
- });
-
- t.test('can stringify with custom encoding', function (st) {
- st.equal(qs.stringify({ 県: '大阪府', '': '' }, {
- encoder: function (str) {
- if (str.length === 0) {
- return '';
- }
- var buf = iconv.encode(str, 'shiftjis');
- var result = [];
- for (var i = 0; i < buf.length; ++i) {
- result.push(buf.readUInt8(i).toString(16));
- }
- return '%' + result.join('%');
- }
- }), '%8c%a7=%91%e5%8d%e3%95%7b&=');
- st.end();
- });
-
- t.test('throws error with wrong encoder', function (st) {
- st.throws(function () {
- qs.stringify({}, { encoder: 'string' });
- }, new TypeError('Encoder has to be a function.'));
- st.end();
- });
-
- t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) {
- st.equal(qs.stringify({ a: new Buffer([1]) }, {
- encoder: function (buffer) {
- if (typeof buffer === 'string') {
- return buffer;
- }
- return String.fromCharCode(buffer.readUInt8(0) + 97);
- }
- }), 'a=b');
- st.end();
- });
-
- t.test('serializeDate option', function (st) {
- var date = new Date();
- st.equal(
- qs.stringify({ a: date }),
- 'a=' + date.toISOString().replace(/:/g, '%3A'),
- 'default is toISOString'
- );
-
- var mutatedDate = new Date();
- mutatedDate.toISOString = function () {
- throw new SyntaxError();
- };
- st.throws(function () {
- mutatedDate.toISOString();
- }, SyntaxError);
- st.equal(
- qs.stringify({ a: mutatedDate }),
- 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'),
- 'toISOString works even when method is not locally present'
- );
-
- var specificDate = new Date(6);
- st.equal(
- qs.stringify(
- { a: specificDate },
- { serializeDate: function (d) { return d.getTime() * 7; } }
- ),
- 'a=42',
- 'custom serializeDate function called'
- );
-
- st.end();
- });
-
- t.test('RFC 1738 spaces serialization', function (st) {
- st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c');
- st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d');
- st.end();
- });
-
- t.test('RFC 3986 spaces serialization', function (st) {
- st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c');
- st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d');
- st.end();
- });
-
- t.test('Backward compatibility to RFC 3986', function (st) {
- st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
- st.end();
- });
-
- t.test('Edge cases and unknown formats', function (st) {
- ['UFO1234', false, 1234, null, {}, []].forEach(
- function (format) {
- st.throws(
- function () {
- qs.stringify({ a: 'b c' }, { format: format });
- },
- new TypeError('Unknown format option provided.')
- );
- }
- );
- st.end();
- });
-
- t.test('encodeValuesOnly', function (st) {
- st.equal(
- qs.stringify(
- { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
- { encodeValuesOnly: true }
- ),
- 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h'
- );
- st.equal(
- qs.stringify(
- { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }
- ),
- 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h'
- );
- st.end();
- });
-
- t.test('encodeValuesOnly - strictNullHandling', function (st) {
- st.equal(
- qs.stringify(
- { a: { b: null } },
- { encodeValuesOnly: true, strictNullHandling: true }
- ),
- 'a[b]'
- );
- st.end();
- });
-
-});
diff --git a/node_modules/node-gyp/node_modules/qs/test/utils.js b/node_modules/node-gyp/node_modules/qs/test/utils.js
deleted file mode 100644
index 0721dd8ec..000000000
--- a/node_modules/node-gyp/node_modules/qs/test/utils.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var test = require('tape');
-var utils = require('../lib/utils');
-
-test('merge()', function (t) {
- t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key');
-
- var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } });
- t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array');
-
- var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } });
- t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array');
-
- var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' });
- t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array');
-
- var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] });
- t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] });
-
- t.end();
-});
diff --git a/node_modules/node-gyp/node_modules/request/CHANGELOG.md b/node_modules/node-gyp/node_modules/request/CHANGELOG.md
deleted file mode 100644
index af76719b4..000000000
--- a/node_modules/node-gyp/node_modules/request/CHANGELOG.md
+++ /dev/null
@@ -1,674 +0,0 @@
-## Change Log
-
-### v2.81.0 (2017/03/09)
-- [#2584](https://github.com/request/request/pull/2584) Security issue: Upgrade qs to version 6.4.0 (@sergejmueller)
-- [#2574](https://github.com/request/request/pull/2574) Migrating to safe-buffer for improved security. (@mikeal)
-- [#2573](https://github.com/request/request/pull/2573) fixes #2572 (@ahmadnassri)
-
-### v2.80.0 (2017/03/04)
-- [#2571](https://github.com/request/request/pull/2571) Correctly format the Host header for IPv6 addresses (@JamesMGreene)
-- [#2558](https://github.com/request/request/pull/2558) Update README.md example snippet (@FredKSchott)
-- [#2221](https://github.com/request/request/pull/2221) Adding a simple Response object reference in argument specification (@calamarico)
-- [#2452](https://github.com/request/request/pull/2452) Adds .timings array with DNC, TCP, request and response times (@nicjansma)
-- [#2553](https://github.com/request/request/pull/2553) add ISSUE_TEMPLATE, move PR template (@FredKSchott)
-- [#2539](https://github.com/request/request/pull/2539) Create PULL_REQUEST_TEMPLATE.md (@FredKSchott)
-- [#2524](https://github.com/request/request/pull/2524) Update caseless to version 0.12.0 🚀 (@greenkeeperio-bot)
-- [#2460](https://github.com/request/request/pull/2460) Fix wrong MIME type in example (@OwnageIsMagic)
-- [#2514](https://github.com/request/request/pull/2514) Change tags to keywords in package.json (@humphd)
-- [#2492](https://github.com/request/request/pull/2492) More lenient gzip decompression (@addaleax)
-
-### v2.79.0 (2016/11/18)
-- [#2368](https://github.com/request/request/pull/2368) Fix typeof check in test-pool.js (@forivall)
-- [#2394](https://github.com/request/request/pull/2394) Use `files` in package.json (@SimenB)
-- [#2463](https://github.com/request/request/pull/2463) AWS support for session tokens for temporary credentials (@simov)
-- [#2467](https://github.com/request/request/pull/2467) Migrate to uuid (@simov, @antialias)
-- [#2459](https://github.com/request/request/pull/2459) Update taper to version 0.5.0 🚀 (@greenkeeperio-bot)
-- [#2448](https://github.com/request/request/pull/2448) Make other connect timeout test more reliable too (@mscdex)
-
-### v2.78.0 (2016/11/03)
-- [#2447](https://github.com/request/request/pull/2447) Always set request timeout on keep-alive connections (@mscdex)
-
-### v2.77.0 (2016/11/03)
-- [#2439](https://github.com/request/request/pull/2439) Fix socket 'connect' listener handling (@mscdex)
-- [#2442](https://github.com/request/request/pull/2442) 👻😱 Node.js 0.10 is unmaintained 😱👻 (@greenkeeperio-bot)
-- [#2435](https://github.com/request/request/pull/2435) Add followOriginalHttpMethod to redirect to original HTTP method (@kirrg001)
-- [#2414](https://github.com/request/request/pull/2414) Improve test-timeout reliability (@mscdex)
-
-### v2.76.0 (2016/10/25)
-- [#2424](https://github.com/request/request/pull/2424) Handle buffers directly instead of using "bl" (@zertosh)
-- [#2415](https://github.com/request/request/pull/2415) Re-enable timeout tests on Travis + other fixes (@mscdex)
-- [#2431](https://github.com/request/request/pull/2431) Improve timeouts accuracy and node v6.8.0+ compatibility (@mscdex, @greenkeeperio-bot)
-- [#2428](https://github.com/request/request/pull/2428) Update qs to version 6.3.0 🚀 (@greenkeeperio-bot)
-- [#2420](https://github.com/request/request/pull/2420) change .on to .once, remove possible memory leaks (@duereg)
-- [#2426](https://github.com/request/request/pull/2426) Remove "isFunction" helper in favor of "typeof" check (@zertosh)
-- [#2425](https://github.com/request/request/pull/2425) Simplify "defer" helper creation (@zertosh)
-- [#2402](https://github.com/request/request/pull/2402) form-data@2.1.1 breaks build 🚨 (@greenkeeperio-bot)
-- [#2393](https://github.com/request/request/pull/2393) Update form-data to version 2.1.0 🚀 (@greenkeeperio-bot)
-
-### v2.75.0 (2016/09/17)
-- [#2381](https://github.com/request/request/pull/2381) Drop support for Node 0.10 (@simov)
-- [#2377](https://github.com/request/request/pull/2377) Update form-data to version 2.0.0 🚀 (@greenkeeperio-bot)
-- [#2353](https://github.com/request/request/pull/2353) Add greenkeeper ignored packages (@simov)
-- [#2351](https://github.com/request/request/pull/2351) Update karma-tap to version 3.0.1 🚀 (@greenkeeperio-bot)
-- [#2348](https://github.com/request/request/pull/2348) form-data@1.0.1 breaks build 🚨 (@greenkeeperio-bot)
-- [#2349](https://github.com/request/request/pull/2349) Check error type instead of string (@scotttrinh)
-
-### v2.74.0 (2016/07/22)
-- [#2295](https://github.com/request/request/pull/2295) Update tough-cookie to 2.3.0 (@stash-sfdc)
-- [#2280](https://github.com/request/request/pull/2280) Update karma-tap to version 2.0.1 🚀 (@greenkeeperio-bot)
-
-### v2.73.0 (2016/07/09)
-- [#2240](https://github.com/request/request/pull/2240) Remove connectionErrorHandler to fix #1903 (@zarenner)
-- [#2251](https://github.com/request/request/pull/2251) tape@4.6.0 breaks build 🚨 (@greenkeeperio-bot)
-- [#2225](https://github.com/request/request/pull/2225) Update docs (@ArtskydJ)
-- [#2203](https://github.com/request/request/pull/2203) Update browserify to version 13.0.1 🚀 (@greenkeeperio-bot)
-- [#2275](https://github.com/request/request/pull/2275) Update karma to version 1.1.1 🚀 (@greenkeeperio-bot)
-- [#2204](https://github.com/request/request/pull/2204) Add codecov.yml and disable PR comments (@simov)
-- [#2212](https://github.com/request/request/pull/2212) Fix link to http.IncomingMessage documentation (@nazieb)
-- [#2208](https://github.com/request/request/pull/2208) Update to form-data RC4 and pass null values to it (@simov)
-- [#2207](https://github.com/request/request/pull/2207) Move aws4 require statement to the top (@simov)
-- [#2199](https://github.com/request/request/pull/2199) Update karma-coverage to version 1.0.0 🚀 (@greenkeeperio-bot)
-- [#2206](https://github.com/request/request/pull/2206) Update qs to version 6.2.0 🚀 (@greenkeeperio-bot)
-- [#2205](https://github.com/request/request/pull/2205) Use server-destory to close hanging sockets in tests (@simov)
-- [#2200](https://github.com/request/request/pull/2200) Update karma-cli to version 1.0.0 🚀 (@greenkeeperio-bot)
-
-### v2.72.0 (2016/04/17)
-- [#2176](https://github.com/request/request/pull/2176) Do not try to pipe Gzip responses with no body (@simov)
-- [#2175](https://github.com/request/request/pull/2175) Add 'delete' alias for the 'del' API method (@simov, @MuhanZou)
-- [#2172](https://github.com/request/request/pull/2172) Add support for deflate content encoding (@czardoz)
-- [#2169](https://github.com/request/request/pull/2169) Add callback option (@simov)
-- [#2165](https://github.com/request/request/pull/2165) Check for self.req existence inside the write method (@simov)
-- [#2167](https://github.com/request/request/pull/2167) Fix TravisCI badge reference master branch (@a0viedo)
-
-### v2.71.0 (2016/04/12)
-- [#2164](https://github.com/request/request/pull/2164) Catch errors from the underlying http module (@simov)
-
-### v2.70.0 (2016/04/05)
-- [#2147](https://github.com/request/request/pull/2147) Update eslint to version 2.5.3 🚀 (@simov, @greenkeeperio-bot)
-- [#2009](https://github.com/request/request/pull/2009) Support JSON stringify replacer argument. (@elyobo)
-- [#2142](https://github.com/request/request/pull/2142) Update eslint to version 2.5.1 🚀 (@greenkeeperio-bot)
-- [#2128](https://github.com/request/request/pull/2128) Update browserify-istanbul to version 2.0.0 🚀 (@greenkeeperio-bot)
-- [#2115](https://github.com/request/request/pull/2115) Update eslint to version 2.3.0 🚀 (@simov, @greenkeeperio-bot)
-- [#2089](https://github.com/request/request/pull/2089) Fix badges (@simov)
-- [#2092](https://github.com/request/request/pull/2092) Update browserify-istanbul to version 1.0.0 🚀 (@greenkeeperio-bot)
-- [#2079](https://github.com/request/request/pull/2079) Accept read stream as body option (@simov)
-- [#2070](https://github.com/request/request/pull/2070) Update bl to version 1.1.2 🚀 (@greenkeeperio-bot)
-- [#2063](https://github.com/request/request/pull/2063) Up bluebird and oauth-sign (@simov)
-- [#2058](https://github.com/request/request/pull/2058) Karma fixes for latest versions (@eiriksm)
-- [#2057](https://github.com/request/request/pull/2057) Update contributing guidelines (@simov)
-- [#2054](https://github.com/request/request/pull/2054) Update qs to version 6.1.0 🚀 (@greenkeeperio-bot)
-
-### v2.69.0 (2016/01/27)
-- [#2041](https://github.com/request/request/pull/2041) restore aws4 as regular dependency (@rmg)
-
-### v2.68.0 (2016/01/27)
-- [#2036](https://github.com/request/request/pull/2036) Add AWS Signature Version 4 (@simov, @mirkods)
-- [#2022](https://github.com/request/request/pull/2022) Convert numeric multipart bodies to string (@simov, @feross)
-- [#2024](https://github.com/request/request/pull/2024) Update har-validator dependency for nsp advisory #76 (@TylerDixon)
-- [#2016](https://github.com/request/request/pull/2016) Update qs to version 6.0.2 🚀 (@greenkeeperio-bot)
-- [#2007](https://github.com/request/request/pull/2007) Use the `extend` module instead of util._extend (@simov)
-- [#2003](https://github.com/request/request/pull/2003) Update browserify to version 13.0.0 🚀 (@greenkeeperio-bot)
-- [#1989](https://github.com/request/request/pull/1989) Update buffer-equal to version 1.0.0 🚀 (@greenkeeperio-bot)
-- [#1956](https://github.com/request/request/pull/1956) Check form-data content-length value before setting up the header (@jongyoonlee)
-- [#1958](https://github.com/request/request/pull/1958) Use IncomingMessage.destroy method (@simov)
-- [#1952](https://github.com/request/request/pull/1952) Adds example for Tor proxy (@prometheansacrifice)
-- [#1943](https://github.com/request/request/pull/1943) Update eslint to version 1.10.3 🚀 (@simov, @greenkeeperio-bot)
-- [#1924](https://github.com/request/request/pull/1924) Update eslint to version 1.10.1 🚀 (@greenkeeperio-bot)
-- [#1915](https://github.com/request/request/pull/1915) Remove content-length and transfer-encoding headers from defaultProxyHeaderWhiteList (@yaxia)
-
-### v2.67.0 (2015/11/19)
-- [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot)
-
-### v2.66.0 (2015/11/18)
-- [#1906](https://github.com/request/request/pull/1906) Update README URLs based on HTTP redirects (@ReadmeCritic)
-- [#1905](https://github.com/request/request/pull/1905) Convert typed arrays into regular buffers (@simov)
-- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot)
-- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms)
-- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot)
-- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @nsklkn, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @KoltesDigital)
-- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov)
-- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot)
-- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot)
-- [#1866](https://github.com/request/request/pull/1866) Add missing quotes on x-token property in README (@miguelmota)
-- [#1874](https://github.com/request/request/pull/1874) Fix typo in README.md (@gswalden)
-- [#1860](https://github.com/request/request/pull/1860) Improve referer header tests and docs (@simov)
-- [#1861](https://github.com/request/request/pull/1861) Remove redundant call to Stream constructor (@watson)
-- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov)
-- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot)
-- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov)
-- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@KoltesDigital)
-- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu)
-- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot)
-- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot)
-
-### v2.65.0 (2015/10/11)
-- [#1833](https://github.com/request/request/pull/1833) Update aws-sign2 to version 0.6.0 🚀 (@greenkeeperio-bot)
-- [#1811](https://github.com/request/request/pull/1811) Enable loose cookie parsing in tough-cookie (@Sebmaster)
-- [#1830](https://github.com/request/request/pull/1830) Bring back tilde ranges for all dependencies (@simov)
-- [#1821](https://github.com/request/request/pull/1821) Implement support for RFC 2617 MD5-sess algorithm. (@BigDSK)
-- [#1828](https://github.com/request/request/pull/1828) Updated qs dependency to 5.2.0 (@acroca)
-- [#1818](https://github.com/request/request/pull/1818) Extract `readResponseBody` method out of `onRequestResponse` (@pvoisin)
-- [#1819](https://github.com/request/request/pull/1819) Run stringify once (@mgenereu)
-- [#1814](https://github.com/request/request/pull/1814) Updated har-validator to version 2.0.2 (@greenkeeperio-bot)
-- [#1807](https://github.com/request/request/pull/1807) Updated tough-cookie to version 2.1.0 (@greenkeeperio-bot)
-- [#1800](https://github.com/request/request/pull/1800) Add caret ranges for devDependencies, except eslint (@simov)
-- [#1799](https://github.com/request/request/pull/1799) Updated karma-browserify to version 4.4.0 (@greenkeeperio-bot)
-- [#1797](https://github.com/request/request/pull/1797) Updated tape to version 4.2.0 (@greenkeeperio-bot)
-- [#1788](https://github.com/request/request/pull/1788) Pinned all dependencies (@greenkeeperio-bot)
-
-### v2.64.0 (2015/09/25)
-- [#1787](https://github.com/request/request/pull/1787) npm ignore examples, release.sh and disabled.appveyor.yml (@thisconnect)
-- [#1775](https://github.com/request/request/pull/1775) Fix typo in README.md (@djchie)
-- [#1776](https://github.com/request/request/pull/1776) Changed word 'conjuction' to read 'conjunction' in README.md (@ryanwholey)
-- [#1785](https://github.com/request/request/pull/1785) Revert: Set default application/json content-type when using json option #1772 (@simov)
-
-### v2.63.0 (2015/09/21)
-- [#1772](https://github.com/request/request/pull/1772) Set default application/json content-type when using json option (@jzaefferer)
-
-### v2.62.0 (2015/09/15)
-- [#1768](https://github.com/request/request/pull/1768) Add node 4.0 to the list of build targets (@simov)
-- [#1767](https://github.com/request/request/pull/1767) Query strings now cooperate with unix sockets (@JoshWillik)
-- [#1750](https://github.com/request/request/pull/1750) Revert doc about installation of tough-cookie added in #884 (@LoicMahieu)
-- [#1746](https://github.com/request/request/pull/1746) Missed comma in Readme (@nsklkn)
-- [#1743](https://github.com/request/request/pull/1743) Fix options not being initialized in defaults method (@simov)
-
-### v2.61.0 (2015/08/19)
-- [#1721](https://github.com/request/request/pull/1721) Minor fix in README.md (@arbaaz)
-- [#1733](https://github.com/request/request/pull/1733) Avoid useless Buffer transformation (@michelsalib)
-- [#1726](https://github.com/request/request/pull/1726) Update README.md (@paulomcnally)
-- [#1715](https://github.com/request/request/pull/1715) Fix forever option in node > 0.10 #1709 (@calibr)
-- [#1716](https://github.com/request/request/pull/1716) Do not create Buffer from Object in setContentLength(iojs v3.0 issue) (@calibr)
-- [#1711](https://github.com/request/request/pull/1711) Add ability to detect connect timeouts (@kevinburke)
-- [#1712](https://github.com/request/request/pull/1712) Set certificate expiration to August 2, 2018 (@kevinburke)
-- [#1700](https://github.com/request/request/pull/1700) debug() when JSON.parse() on a response body fails (@phillipj)
-
-### v2.60.0 (2015/07/21)
-- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews)
-
-### v2.59.0 (2015/07/20)
-- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options. Forever option defaults to using http(s).Agent in node 0.12+ (@simov)
-- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman)
-- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme)
-- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov)
-- [#1651](https://github.com/request/request/pull/1651) Preserve HEAD method when using followAllRedirects (@simov)
-- [#1652](https://github.com/request/request/pull/1652) Update `encoding` option documentation in README.md (@daniel347x)
-- [#1650](https://github.com/request/request/pull/1650) Allow content-type overriding when using the `form` option (@simov)
-- [#1646](https://github.com/request/request/pull/1646) Clarify the nature of setting `ca` in `agentOptions` (@jeffcharles)
-
-### v2.58.0 (2015/06/16)
-- [#1638](https://github.com/request/request/pull/1638) Use the `extend` module to deep extend in the defaults method (@simov)
-- [#1631](https://github.com/request/request/pull/1631) Move tunnel logic into separate module (@simov)
-- [#1634](https://github.com/request/request/pull/1634) Fix OAuth query transport_method (@simov)
-- [#1603](https://github.com/request/request/pull/1603) Add codecov (@simov)
-
-### v2.57.0 (2015/05/31)
-- [#1615](https://github.com/request/request/pull/1615) Replace '.client' with '.socket' as the former was deprecated in 2.2.0. (@ChALkeR)
-
-### v2.56.0 (2015/05/28)
-- [#1610](https://github.com/request/request/pull/1610) Bump module dependencies (@simov)
-- [#1600](https://github.com/request/request/pull/1600) Extract the querystring logic into separate module (@simov)
-- [#1607](https://github.com/request/request/pull/1607) Re-generate certificates (@simov)
-- [#1599](https://github.com/request/request/pull/1599) Move getProxyFromURI logic below the check for Invaild URI (#1595) (@simov)
-- [#1598](https://github.com/request/request/pull/1598) Fix the way http verbs are defined in order to please intellisense IDEs (@simov, @flannelJesus)
-- [#1591](https://github.com/request/request/pull/1591) A few minor fixes: (@simov)
-- [#1584](https://github.com/request/request/pull/1584) Refactor test-default tests (according to comments in #1430) (@simov)
-- [#1585](https://github.com/request/request/pull/1585) Fixing documentation regarding TLS options (#1583) (@mainakae)
-- [#1574](https://github.com/request/request/pull/1574) Refresh the oauth_nonce on redirect (#1573) (@simov)
-- [#1570](https://github.com/request/request/pull/1570) Discovered tests that weren't properly running (@seanstrom)
-- [#1569](https://github.com/request/request/pull/1569) Fix pause before response arrives (@kevinoid)
-- [#1558](https://github.com/request/request/pull/1558) Emit error instead of throw (@simov)
-- [#1568](https://github.com/request/request/pull/1568) Fix stall when piping gzipped response (@kevinoid)
-- [#1560](https://github.com/request/request/pull/1560) Update combined-stream (@apechimp)
-- [#1543](https://github.com/request/request/pull/1543) Initial support for oauth_body_hash on json payloads (@simov, @aesopwolf)
-- [#1541](https://github.com/request/request/pull/1541) Fix coveralls (@simov)
-- [#1540](https://github.com/request/request/pull/1540) Fix recursive defaults for convenience methods (@simov)
-- [#1536](https://github.com/request/request/pull/1536) More eslint style rules (@froatsnook)
-- [#1533](https://github.com/request/request/pull/1533) Adding dependency status bar to README.md (@YasharF)
-- [#1539](https://github.com/request/request/pull/1539) ensure the latest version of har-validator is included (@ahmadnassri)
-- [#1516](https://github.com/request/request/pull/1516) forever+pool test (@devTristan)
-
-### v2.55.0 (2015/04/05)
-- [#1520](https://github.com/request/request/pull/1520) Refactor defaults (@simov)
-- [#1525](https://github.com/request/request/pull/1525) Delete request headers with undefined value. (@froatsnook)
-- [#1521](https://github.com/request/request/pull/1521) Add promise tests (@simov)
-- [#1518](https://github.com/request/request/pull/1518) Fix defaults (@simov)
-- [#1515](https://github.com/request/request/pull/1515) Allow static invoking of convenience methods (@simov)
-- [#1505](https://github.com/request/request/pull/1505) Fix multipart boundary extraction regexp (@simov)
-- [#1510](https://github.com/request/request/pull/1510) Fix basic auth form data (@simov)
-
-### v2.54.0 (2015/03/24)
-- [#1501](https://github.com/request/request/pull/1501) HTTP Archive 1.2 support (@ahmadnassri)
-- [#1486](https://github.com/request/request/pull/1486) Add a test for the forever agent (@akshayp)
-- [#1500](https://github.com/request/request/pull/1500) Adding handling for no auth method and null bearer (@philberg)
-- [#1498](https://github.com/request/request/pull/1498) Add table of contents in readme (@simov)
-- [#1477](https://github.com/request/request/pull/1477) Add support for qs options via qsOptions key (@simov)
-- [#1496](https://github.com/request/request/pull/1496) Parameters encoded to base 64 should be decoded as UTF-8, not ASCII. (@albanm)
-- [#1494](https://github.com/request/request/pull/1494) Update eslint (@froatsnook)
-- [#1474](https://github.com/request/request/pull/1474) Require Colon in Basic Auth (@erykwalder)
-- [#1481](https://github.com/request/request/pull/1481) Fix baseUrl and redirections. (@burningtree)
-- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook)
-- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em)
-- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB)
-- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nickmccurdy, @demohi, @simov, @0x4139)
-- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139)
-- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nickmccurdy, @demohi)
-- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal)
-- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimon)
-- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen)
-- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky)
-- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack)
-- [#1423](https://github.com/request/request/pull/1423) Allow fully qualified multipart content-type header (@simov)
-- [#1430](https://github.com/request/request/pull/1430) Fix recursive requester (@tikotzky)
-- [#1429](https://github.com/request/request/pull/1429) Throw error when making HEAD request with a body (@tikotzky)
-- [#1419](https://github.com/request/request/pull/1419) Add note that the project is broken in 0.12.x (@nylen)
-- [#1413](https://github.com/request/request/pull/1413) Fix basic auth (@simov)
-- [#1397](https://github.com/request/request/pull/1397) Improve pipe-from-file tests (@nylen)
-
-### v2.53.0 (2015/02/02)
-- [#1396](https://github.com/request/request/pull/1396) Do not rfc3986 escape JSON bodies (@nylen, @simov)
-- [#1392](https://github.com/request/request/pull/1392) Improve `timeout` option description (@watson)
-
-### v2.52.0 (2015/02/02)
-- [#1383](https://github.com/request/request/pull/1383) Add missing HTTPS options that were not being passed to tunnel (@brichard19) (@nylen)
-- [#1388](https://github.com/request/request/pull/1388) Upgrade mime-types package version (@roderickhsiao)
-- [#1389](https://github.com/request/request/pull/1389) Revise Setup Tunnel Function (@seanstrom)
-- [#1374](https://github.com/request/request/pull/1374) Allow explicitly disabling tunneling for proxied https destinations (@nylen)
-- [#1376](https://github.com/request/request/pull/1376) Use karma-browserify for tests. Add browser test coverage reporter. (@eiriksm)
-- [#1366](https://github.com/request/request/pull/1366) Refactor OAuth into separate module (@simov)
-- [#1373](https://github.com/request/request/pull/1373) Rewrite tunnel test to be pure Node.js (@nylen)
-- [#1371](https://github.com/request/request/pull/1371) Upgrade test reporter (@nylen)
-- [#1360](https://github.com/request/request/pull/1360) Refactor basic, bearer, digest auth logic into separate class (@simov)
-- [#1354](https://github.com/request/request/pull/1354) Remove circular dependency from debugging code (@nylen)
-- [#1351](https://github.com/request/request/pull/1351) Move digest auth into private prototype method (@simov)
-- [#1352](https://github.com/request/request/pull/1352) Update hawk dependency to ~2.3.0 (@mridgway)
-- [#1353](https://github.com/request/request/pull/1353) Correct travis-ci badge (@dogancelik)
-- [#1349](https://github.com/request/request/pull/1349) Make sure we return on errored browser requests. (@eiriksm)
-- [#1346](https://github.com/request/request/pull/1346) getProxyFromURI Extraction Refactor (@seanstrom)
-- [#1337](https://github.com/request/request/pull/1337) Standardize test ports on 6767 (@nylen)
-- [#1341](https://github.com/request/request/pull/1341) Emit FormData error events as Request error events (@nylen, @rwky)
-- [#1343](https://github.com/request/request/pull/1343) Clean up readme badges, and add Travis and Coveralls badges (@nylen)
-- [#1345](https://github.com/request/request/pull/1345) Update README.md (@Aaron-Hartwig)
-- [#1338](https://github.com/request/request/pull/1338) Always wait for server.close() callback in tests (@nylen)
-- [#1342](https://github.com/request/request/pull/1342) Add mock https server and redo start of browser tests for this purpose. (@eiriksm)
-- [#1339](https://github.com/request/request/pull/1339) Improve auth docs (@nylen)
-- [#1335](https://github.com/request/request/pull/1335) Add support for OAuth plaintext signature method (@simov)
-- [#1332](https://github.com/request/request/pull/1332) Add clean script to remove test-browser.js after the tests run (@seanstrom)
-- [#1327](https://github.com/request/request/pull/1327) Fix errors generating coverage reports. (@nylen)
-- [#1330](https://github.com/request/request/pull/1330) Return empty buffer upon empty response body and encoding is set to null (@seanstrom)
-- [#1326](https://github.com/request/request/pull/1326) Use faster container-based infrastructure on Travis (@nylen)
-- [#1315](https://github.com/request/request/pull/1315) Implement rfc3986 option (@simov, @nylen, @apoco, @DullReferenceException, @mmalecki, @oliamb, @cliffcrosland, @LewisJEllis, @eiriksm, @poislagarde)
-- [#1314](https://github.com/request/request/pull/1314) Detect urlencoded form data header via regex (@simov)
-- [#1317](https://github.com/request/request/pull/1317) Improve OAuth1.0 server side flow example (@simov)
-
-### v2.51.0 (2014/12/10)
-- [#1310](https://github.com/request/request/pull/1310) Revert changes introduced in https://github.com/request/request/pull/1282 (@simov)
-
-### v2.50.0 (2014/12/09)
-- [#1308](https://github.com/request/request/pull/1308) Add browser test to keep track of browserify compability. (@eiriksm)
-- [#1299](https://github.com/request/request/pull/1299) Add optional support for jsonReviver (@poislagarde)
-- [#1277](https://github.com/request/request/pull/1277) Add Coveralls configuration (@simov)
-- [#1307](https://github.com/request/request/pull/1307) Upgrade form-data, add back browserify compability. Fixes #455. (@eiriksm)
-- [#1305](https://github.com/request/request/pull/1305) Fix typo in README.md (@LewisJEllis)
-- [#1288](https://github.com/request/request/pull/1288) Update README.md to explain custom file use case (@cliffcrosland)
-
-### v2.49.0 (2014/11/28)
-- [#1295](https://github.com/request/request/pull/1295) fix(proxy): no-proxy false positive (@oliamb)
-- [#1292](https://github.com/request/request/pull/1292) Upgrade `caseless` to 0.8.1 (@mmalecki)
-- [#1276](https://github.com/request/request/pull/1276) Set transfer encoding for multipart/related to chunked by default (@simov)
-- [#1275](https://github.com/request/request/pull/1275) Fix multipart content-type headers detection (@simov)
-- [#1269](https://github.com/request/request/pull/1269) adds streams example for review (@tbuchok)
-- [#1238](https://github.com/request/request/pull/1238) Add examples README.md (@simov)
-
-### v2.48.0 (2014/11/12)
-- [#1263](https://github.com/request/request/pull/1263) Fixed a syntax error / typo in README.md (@xna2)
-- [#1253](https://github.com/request/request/pull/1253) Add multipart chunked flag (@simov, @nylen)
-- [#1251](https://github.com/request/request/pull/1251) Clarify that defaults() does not modify global defaults (@nylen)
-- [#1250](https://github.com/request/request/pull/1250) Improve documentation for pool and maxSockets options (@nylen)
-- [#1237](https://github.com/request/request/pull/1237) Documenting error handling when using streams (@vmattos)
-- [#1244](https://github.com/request/request/pull/1244) Finalize changelog command (@nylen)
-- [#1241](https://github.com/request/request/pull/1241) Fix typo (@alexanderGugel)
-- [#1223](https://github.com/request/request/pull/1223) Show latest version number instead of "upcoming" in changelog (@nylen)
-- [#1236](https://github.com/request/request/pull/1236) Document how to use custom CA in README (#1229) (@hypesystem)
-- [#1228](https://github.com/request/request/pull/1228) Support for oauth with RSA-SHA1 signing (@nylen)
-- [#1216](https://github.com/request/request/pull/1216) Made json and multipart options coexist (@nylen, @simov)
-- [#1225](https://github.com/request/request/pull/1225) Allow header white/exclusive lists in any case. (@RReverser)
-
-### v2.47.0 (2014/10/26)
-- [#1222](https://github.com/request/request/pull/1222) Move from mikeal/request to request/request (@nylen)
-- [#1220](https://github.com/request/request/pull/1220) update qs dependency to 2.3.1 (@FredKSchott)
-- [#1212](https://github.com/request/request/pull/1212) Improve tests/test-timeout.js (@nylen)
-- [#1219](https://github.com/request/request/pull/1219) remove old globalAgent workaround for node 0.4 (@request)
-- [#1214](https://github.com/request/request/pull/1214) Remove cruft left over from optional dependencies (@nylen)
-- [#1215](https://github.com/request/request/pull/1215) Add proxyHeaderExclusiveList option for proxy-only headers. (@RReverser)
-- [#1211](https://github.com/request/request/pull/1211) Allow 'Host' header instead of 'host' and remember case across redirects (@nylen)
-- [#1208](https://github.com/request/request/pull/1208) Improve release script (@nylen)
-- [#1213](https://github.com/request/request/pull/1213) Support for custom cookie store (@nylen, @mitsuru)
-- [#1197](https://github.com/request/request/pull/1197) Clean up some code around setting the agent (@FredKSchott)
-- [#1209](https://github.com/request/request/pull/1209) Improve multipart form append test (@simov)
-- [#1207](https://github.com/request/request/pull/1207) Update changelog (@nylen)
-- [#1185](https://github.com/request/request/pull/1185) Stream multipart/related bodies (@simov)
-
-### v2.46.0 (2014/10/23)
-- [#1198](https://github.com/request/request/pull/1198) doc for TLS/SSL protocol options (@shawnzhu)
-- [#1200](https://github.com/request/request/pull/1200) Add a Gitter chat badge to README.md (@gitter-badger)
-- [#1196](https://github.com/request/request/pull/1196) Upgrade taper test reporter to v0.3.0 (@nylen)
-- [#1199](https://github.com/request/request/pull/1199) Fix lint error: undeclared var i (@nylen)
-- [#1191](https://github.com/request/request/pull/1191) Move self.proxy decision logic out of init and into a helper (@FredKSchott)
-- [#1190](https://github.com/request/request/pull/1190) Move _buildRequest() logic back into init (@FredKSchott)
-- [#1186](https://github.com/request/request/pull/1186) Support Smarter Unix URL Scheme (@FredKSchott)
-- [#1178](https://github.com/request/request/pull/1178) update form documentation for new usage (@FredKSchott)
-- [#1180](https://github.com/request/request/pull/1180) Enable no-mixed-requires linting rule (@nylen)
-- [#1184](https://github.com/request/request/pull/1184) Don't forward authorization header across redirects to different hosts (@nylen)
-- [#1183](https://github.com/request/request/pull/1183) Correct README about pre and postamble CRLF using multipart and not mult... (@netpoetica)
-- [#1179](https://github.com/request/request/pull/1179) Lint tests directory (@nylen)
-- [#1169](https://github.com/request/request/pull/1169) add metadata for form-data file field (@dotcypress)
-- [#1173](https://github.com/request/request/pull/1173) remove optional dependencies (@seanstrom)
-- [#1165](https://github.com/request/request/pull/1165) Cleanup event listeners and remove function creation from init (@FredKSchott)
-- [#1174](https://github.com/request/request/pull/1174) update the request.cookie docs to have a valid cookie example (@seanstrom)
-- [#1168](https://github.com/request/request/pull/1168) create a detach helper and use detach helper in replace of nextTick (@seanstrom)
-- [#1171](https://github.com/request/request/pull/1171) in post can send form data and use callback (@MiroRadenovic)
-- [#1159](https://github.com/request/request/pull/1159) accept charset for x-www-form-urlencoded content-type (@seanstrom)
-- [#1157](https://github.com/request/request/pull/1157) Update README.md: body with json=true (@Rob--W)
-- [#1164](https://github.com/request/request/pull/1164) Disable tests/test-timeout.js on Travis (@nylen)
-- [#1153](https://github.com/request/request/pull/1153) Document how to run a single test (@nylen)
-- [#1144](https://github.com/request/request/pull/1144) adds documentation for the "response" event within the streaming section (@tbuchok)
-- [#1162](https://github.com/request/request/pull/1162) Update eslintrc file to no longer allow past errors (@FredKSchott)
-- [#1155](https://github.com/request/request/pull/1155) Support/use self everywhere (@seanstrom)
-- [#1161](https://github.com/request/request/pull/1161) fix no-use-before-define lint warnings (@emkay)
-- [#1156](https://github.com/request/request/pull/1156) adding curly brackets to get rid of lint errors (@emkay)
-- [#1151](https://github.com/request/request/pull/1151) Fix localAddress test on OS X (@nylen)
-- [#1145](https://github.com/request/request/pull/1145) documentation: fix outdated reference to setCookieSync old name in README (@FredKSchott)
-- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott)
-- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen)
-- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund)
-- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@cappslock)
-- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey)
-- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott)
-- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom)
-- [#1129](https://github.com/request/request/pull/1129) linting fix: convert double quote strings to use single quotes (@FredKSchott)
-- [#1124](https://github.com/request/request/pull/1124) linting fix: remove unneccesary semi-colons (@FredKSchott)
-
-### v2.45.0 (2014/10/06)
-- [#1128](https://github.com/request/request/pull/1128) Add test for setCookie regression (@nylen)
-- [#1127](https://github.com/request/request/pull/1127) added tests around using objects as values in a query string (@bcoe)
-- [#1103](https://github.com/request/request/pull/1103) Support/refactor request constructor (@nylen, @seanstrom)
-- [#1119](https://github.com/request/request/pull/1119) add basic linting to request library (@FredKSchott)
-- [#1121](https://github.com/request/request/pull/1121) Revert "Explicitly use sync versions of cookie functions" (@nylen)
-- [#1118](https://github.com/request/request/pull/1118) linting fix: Restructure bad empty if statement (@FredKSchott)
-- [#1117](https://github.com/request/request/pull/1117) Fix a bad check for valid URIs (@FredKSchott)
-- [#1113](https://github.com/request/request/pull/1113) linting fix: space out operators (@FredKSchott)
-- [#1116](https://github.com/request/request/pull/1116) Fix typo in `noProxyHost` definition (@FredKSchott)
-- [#1114](https://github.com/request/request/pull/1114) linting fix: Added a `new` operator that was missing when creating and throwing a new error (@FredKSchott)
-- [#1096](https://github.com/request/request/pull/1096) No_proxy support (@samcday)
-- [#1107](https://github.com/request/request/pull/1107) linting-fix: remove unused variables (@FredKSchott)
-- [#1112](https://github.com/request/request/pull/1112) linting fix: Make return values consistent and more straitforward (@FredKSchott)
-- [#1111](https://github.com/request/request/pull/1111) linting fix: authPieces was getting redeclared (@FredKSchott)
-- [#1105](https://github.com/request/request/pull/1105) Use strict mode in request (@FredKSchott)
-- [#1110](https://github.com/request/request/pull/1110) linting fix: replace lazy '==' with more strict '===' (@FredKSchott)
-- [#1109](https://github.com/request/request/pull/1109) linting fix: remove function call from if-else conditional statement (@FredKSchott)
-- [#1102](https://github.com/request/request/pull/1102) Fix to allow setting a `requester` on recursive calls to `request.defaults` (@tikotzky)
-- [#1095](https://github.com/request/request/pull/1095) Tweaking engines in package.json (@pdehaan)
-- [#1082](https://github.com/request/request/pull/1082) Forward the socket event from the httpModule request (@seanstrom)
-- [#972](https://github.com/request/request/pull/972) Clarify gzip handling in the README (@kevinoid)
-- [#1089](https://github.com/request/request/pull/1089) Mention that encoding defaults to utf8, not Buffer (@stuartpb)
-- [#1088](https://github.com/request/request/pull/1088) Fix cookie example in README.md and make it more clear (@pipi32167)
-- [#1027](https://github.com/request/request/pull/1027) Add support for multipart form data in request options. (@crocket)
-- [#1076](https://github.com/request/request/pull/1076) use Request.abort() to abort the request when the request has timed-out (@seanstrom)
-- [#1068](https://github.com/request/request/pull/1068) add optional postamble required by .NET multipart requests (@netpoetica)
-
-### v2.43.0 (2014/09/18)
-- [#1057](https://github.com/request/request/pull/1057) Defaults should not overwrite defined options (@davidwood)
-- [#1046](https://github.com/request/request/pull/1046) Propagate datastream errors, useful in case gzip fails. (@ZJONSSON, @Janpot)
-- [#1063](https://github.com/request/request/pull/1063) copy the input headers object #1060 (@finnp)
-- [#1031](https://github.com/request/request/pull/1031) Explicitly use sync versions of cookie functions (@ZJONSSON)
-- [#1056](https://github.com/request/request/pull/1056) Fix redirects when passing url.parse(x) as URL to convenience method (@nylen)
-
-### v2.42.0 (2014/09/04)
-- [#1053](https://github.com/request/request/pull/1053) Fix #1051 Parse auth properly when using non-tunneling proxy (@isaacs)
-
-### v2.41.0 (2014/09/04)
-- [#1050](https://github.com/request/request/pull/1050) Pass whitelisted headers to tunneling proxy. Organize all tunneling logic. (@isaacs, @Feldhacker)
-- [#1035](https://github.com/request/request/pull/1035) souped up nodei.co badge (@rvagg)
-- [#1048](https://github.com/request/request/pull/1048) Aws is now possible over a proxy (@steven-aerts)
-- [#1039](https://github.com/request/request/pull/1039) extract out helper functions to a helper file (@seanstrom)
-- [#1021](https://github.com/request/request/pull/1021) Support/refactor indexjs (@seanstrom)
-- [#1033](https://github.com/request/request/pull/1033) Improve and document debug options (@nylen)
-- [#1034](https://github.com/request/request/pull/1034) Fix readme headings (@nylen)
-- [#1030](https://github.com/request/request/pull/1030) Allow recursive request.defaults (@tikotzky)
-- [#1029](https://github.com/request/request/pull/1029) Fix a couple of typos (@nylen)
-- [#675](https://github.com/request/request/pull/675) Checking for SSL fault on connection before reading SSL properties (@VRMink)
-- [#989](https://github.com/request/request/pull/989) Added allowRedirect function. Should return true if redirect is allowed or false otherwise (@doronin)
-- [#1025](https://github.com/request/request/pull/1025) [fixes #1023] Set self._ended to true once response has ended (@mridgway)
-- [#1020](https://github.com/request/request/pull/1020) Add back removed debug metadata (@FredKSchott)
-- [#1008](https://github.com/request/request/pull/1008) Moving to module instead of cutomer buffer concatenation. (@mikeal)
-- [#770](https://github.com/request/request/pull/770) Added dependency badge for README file; (@timgluz, @mafintosh, @lalitkapoor, @stash, @bobyrizov)
-- [#1016](https://github.com/request/request/pull/1016) toJSON no longer results in an infinite loop, returns simple objects (@FredKSchott)
-- [#1018](https://github.com/request/request/pull/1018) Remove pre-0.4.4 HTTPS fix (@mmalecki)
-- [#1006](https://github.com/request/request/pull/1006) Migrate to caseless, fixes #1001 (@mikeal)
-- [#995](https://github.com/request/request/pull/995) Fix parsing array of objects (@sjonnet19)
-- [#999](https://github.com/request/request/pull/999) Fix fallback for browserify for optional modules. (@eiriksm)
-- [#996](https://github.com/request/request/pull/996) Wrong oauth signature when multiple same param keys exist [updated] (@bengl)
-
-### v2.40.0 (2014/08/06)
-- [#992](https://github.com/request/request/pull/992) Fix security vulnerability. Update qs (@poeticninja)
-- [#988](https://github.com/request/request/pull/988) “--” -> “—” (@upisfree)
-- [#987](https://github.com/request/request/pull/987) Show optional modules as being loaded by the module that reqeusted them (@iarna)
-
-### v2.39.0 (2014/07/24)
-- [#976](https://github.com/request/request/pull/976) Update README.md (@pvoznenko)
-
-### v2.38.0 (2014/07/22)
-- [#952](https://github.com/request/request/pull/952) Adding support to client certificate with proxy use case (@ofirshaked)
-- [#884](https://github.com/request/request/pull/884) Documented tough-cookie installation. (@wbyoung)
-- [#935](https://github.com/request/request/pull/935) Correct repository url (@fritx)
-- [#963](https://github.com/request/request/pull/963) Update changelog (@nylen)
-- [#960](https://github.com/request/request/pull/960) Support gzip with encoding on node pre-v0.9.4 (@kevinoid)
-- [#953](https://github.com/request/request/pull/953) Add async Content-Length computation when using form-data (@LoicMahieu)
-- [#844](https://github.com/request/request/pull/844) Add support for HTTP[S]_PROXY environment variables. Fixes #595. (@jvmccarthy)
-- [#946](https://github.com/request/request/pull/946) defaults: merge headers (@aj0strow)
-
-### v2.37.0 (2014/07/07)
-- [#957](https://github.com/request/request/pull/957) Silence EventEmitter memory leak warning #311 (@watson)
-- [#955](https://github.com/request/request/pull/955) check for content-length header before setting it in nextTick (@camilleanne)
-- [#951](https://github.com/request/request/pull/951) Add support for gzip content decoding (@kevinoid)
-- [#949](https://github.com/request/request/pull/949) Manually enter querystring in form option (@charlespwd)
-- [#944](https://github.com/request/request/pull/944) Make request work with browserify (@eiriksm)
-- [#943](https://github.com/request/request/pull/943) New mime module (@eiriksm)
-- [#927](https://github.com/request/request/pull/927) Bump version of hawk dep. (@samccone)
-- [#907](https://github.com/request/request/pull/907) append secureOptions to poolKey (@medovob)
-
-### v2.35.0 (2014/05/17)
-- [#901](https://github.com/request/request/pull/901) Fixes #555 (@pigulla)
-- [#897](https://github.com/request/request/pull/897) merge with default options (@vohof)
-- [#891](https://github.com/request/request/pull/891) fixes 857 - options object is mutated by calling request (@lalitkapoor)
-- [#869](https://github.com/request/request/pull/869) Pipefilter test (@tgohn)
-- [#866](https://github.com/request/request/pull/866) Fix typo (@dandv)
-- [#861](https://github.com/request/request/pull/861) Add support for RFC 6750 Bearer Tokens (@phedny)
-- [#809](https://github.com/request/request/pull/809) upgrade tunnel-proxy to 0.4.0 (@ksato9700)
-- [#850](https://github.com/request/request/pull/850) Fix word consistency in readme (@0xNobody)
-- [#810](https://github.com/request/request/pull/810) add some exposition to mpu example in README.md (@mikermcneil)
-- [#840](https://github.com/request/request/pull/840) improve error reporting for invalid protocols (@FND)
-- [#821](https://github.com/request/request/pull/821) added secureOptions back (@nw)
-- [#815](https://github.com/request/request/pull/815) Create changelog based on pull requests (@lalitkapoor)
-
-### v2.34.0 (2014/02/18)
-- [#516](https://github.com/request/request/pull/516) UNIX Socket URL Support (@lyuzashi)
-- [#801](https://github.com/request/request/pull/801) 794 ignore cookie parsing and domain errors (@lalitkapoor)
-- [#802](https://github.com/request/request/pull/802) Added the Apache license to the package.json. (@keskival)
-- [#793](https://github.com/request/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul)
-- [#785](https://github.com/request/request/pull/785) Provide ability to override content-type when `json` option used (@vvo)
-- [#781](https://github.com/request/request/pull/781) simpler isReadStream function (@joaojeronimo)
-
-### v2.32.0 (2014/01/16)
-- [#767](https://github.com/request/request/pull/767) Use tough-cookie CookieJar sync API (@stash)
-- [#764](https://github.com/request/request/pull/764) Case-insensitive authentication scheme (@bobyrizov)
-- [#763](https://github.com/request/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash)
-- [#744](https://github.com/request/request/pull/744) Use Cookie.parse (@lalitkapoor)
-- [#757](https://github.com/request/request/pull/757) require aws-sign2 (@mafintosh)
-
-### v2.31.0 (2014/01/08)
-- [#645](https://github.com/request/request/pull/645) update twitter api url to v1.1 (@mick)
-- [#746](https://github.com/request/request/pull/746) README: Markdown code highlight (@weakish)
-- [#745](https://github.com/request/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay)
-- [#742](https://github.com/request/request/pull/742) Add note about JSON output body type (@iansltx)
-- [#741](https://github.com/request/request/pull/741) README example is using old cookie jar api (@emkay)
-- [#736](https://github.com/request/request/pull/736) Fix callback arguments documentation (@mmalecki)
-- [#732](https://github.com/request/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium)
-- [#730](https://github.com/request/request/pull/730) better HTTP DIGEST support (@dai-shi)
-- [#728](https://github.com/request/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow)
-- [#727](https://github.com/request/request/pull/727) fix requester bug (@jchris)
-- [#724](https://github.com/request/request/pull/724) README.md: add custom HTTP Headers example. (@tcort)
-- [#719](https://github.com/request/request/pull/719) Made a comment gender neutral. (@unsetbit)
-- [#715](https://github.com/request/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub)
-- [#710](https://github.com/request/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak)
-- [#696](https://github.com/request/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin)
-- [#694](https://github.com/request/request/pull/694) Typo in README (@VRMink)
-- [#690](https://github.com/request/request/pull/690) Handle blank password in basic auth. (@diversario)
-- [#682](https://github.com/request/request/pull/682) Optional dependencies (@Turbo87)
-- [#683](https://github.com/request/request/pull/683) Travis CI support (@Turbo87)
-- [#674](https://github.com/request/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren)
-- [#666](https://github.com/request/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong)
-- [#656](https://github.com/request/request/pull/656) Test case for #304. (@diversario)
-- [#662](https://github.com/request/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar)
-- [#659](https://github.com/request/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm)
-- [#630](https://github.com/request/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl)
-- [#619](https://github.com/request/request/pull/619) decouple things a bit (@joaojeronimo)
-- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander)
-- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker)
-- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath)
-- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK)
-- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko)
-- [#589](https://github.com/request/request/pull/589) Prevent setting headers after they are sent (@geek)
-- [#587](https://github.com/request/request/pull/587) Global cookie jar disabled by default (@threepointone)
-- [#544](https://github.com/request/request/pull/544) Update http-signature version. (@davidlehn)
-- [#581](https://github.com/request/request/pull/581) Fix spelling of "ignoring." (@bigeasy)
-- [#568](https://github.com/request/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette)
-- [#564](https://github.com/request/request/pull/564) Fix redirections (@criloz)
-- [#541](https://github.com/request/request/pull/541) The exported request function doesn't have an auth method (@tschaub)
-- [#542](https://github.com/request/request/pull/542) Expose Request class (@regality)
-- [#536](https://github.com/request/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando)
-- [#532](https://github.com/request/request/pull/532) fix typo (@fredericosilva)
-- [#497](https://github.com/request/request/pull/497) Added redirect event (@Cauldrath)
-- [#503](https://github.com/request/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi)
-- [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway)
-- [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka)
-- [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway)
-- [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway)
-- [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun)
-- [#510](https://github.com/request/request/pull/510) Add HTTP Signature support. (@davidlehn)
-- [#502](https://github.com/request/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen)
-- [#508](https://github.com/request/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs)
-- [#512](https://github.com/request/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1)
-- [#513](https://github.com/request/request/pull/513) add 'localAddress' support (@yyfrankyy)
-- [#498](https://github.com/request/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins)
-- [#490](https://github.com/request/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas)
-- [#479](https://github.com/request/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH)
-- [#475](https://github.com/request/request/pull/475) Use `unescape` from `querystring` (@shimaore)
-- [#473](https://github.com/request/request/pull/473) V0.10 compat (@isaacs)
-- [#471](https://github.com/request/request/pull/471) Using querystring library from visionmedia (@kbackowski)
-- [#461](https://github.com/request/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin)
-- [#460](https://github.com/request/request/pull/460) hawk 0.10.0 (@hueniverse)
-- [#462](https://github.com/request/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya)
-- [#456](https://github.com/request/request/pull/456) hawk 0.9.0 (@hueniverse)
-- [#429](https://github.com/request/request/pull/429) Copy options before adding callback. (@nrn, @nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki)
-- [#454](https://github.com/request/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh)
-- [#310](https://github.com/request/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann, @isaacs, @mscdex)
-- [#413](https://github.com/request/request/pull/413) rename googledoodle.png to .jpg (@nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki)
-- [#448](https://github.com/request/request/pull/448) Convenience method for PATCH (@mloar)
-- [#444](https://github.com/request/request/pull/444) protect against double callbacks on error path (@spollack)
-- [#433](https://github.com/request/request/pull/433) Added support for HTTPS cert & key (@mmalecki)
-- [#430](https://github.com/request/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf)
-- [#415](https://github.com/request/request/pull/415) Fixed a typo. (@jerem)
-- [#338](https://github.com/request/request/pull/338) Add more auth options, including digest support (@nylen)
-- [#403](https://github.com/request/request/pull/403) Optimize environment lookup to happen once only (@mmalecki)
-- [#398](https://github.com/request/request/pull/398) Add more reporting to tests (@mmalecki)
-- [#388](https://github.com/request/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23)
-- [#381](https://github.com/request/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro)
-- [#380](https://github.com/request/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-)
-- [#376](https://github.com/request/request/pull/376) Headers lost on redirect (@kapetan)
-- [#375](https://github.com/request/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock)
-- [#374](https://github.com/request/request/pull/374) Correct Host header for proxy tunnel CONNECT (@youurayy)
-- [#370](https://github.com/request/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge)
-- [#369](https://github.com/request/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge)
-- [#344](https://github.com/request/request/pull/344) Make AWS auth signing find headers correctly (@nlf)
-- [#363](https://github.com/request/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall)
-- [#362](https://github.com/request/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall)
-- [#361](https://github.com/request/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins)
-- [#360](https://github.com/request/request/pull/360) Delete self._form along with everything else on redirect (@jgautier)
-- [#355](https://github.com/request/request/pull/355) stop sending erroneous headers on redirected requests (@azylman)
-- [#332](https://github.com/request/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup)
-- [#343](https://github.com/request/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf)
-- [#320](https://github.com/request/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris)
-- [#322](https://github.com/request/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo)
-- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@CartoDB)
-- [#318](https://github.com/request/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs)
-- [#317](https://github.com/request/request/pull/317) Workaround for #313 (@isaacs)
-- [#293](https://github.com/request/request/pull/293) Allow parser errors to bubble up to request (@mscdex)
-- [#290](https://github.com/request/request/pull/290) A test for #289 (@isaacs)
-- [#280](https://github.com/request/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1)
-- [#207](https://github.com/request/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs)
-- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas, @vpulim)
-- [#272](https://github.com/request/request/pull/272) Boundary begins with CRLF? (@elspoono, @timshadel, @naholyr, @nanodocumet, @TehShrike)
-- [#284](https://github.com/request/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry)
-- [#241](https://github.com/request/request/pull/241) Composability updates suggested by issue #239 (@polotek)
-- [#282](https://github.com/request/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock)
-- [#279](https://github.com/request/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin)
-- [#273](https://github.com/request/request/pull/273) Pipe back pressure issue (@mafintosh)
-- [#268](https://github.com/request/request/pull/268) I'm not OCD seriously (@TehShrike)
-- [#263](https://github.com/request/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet)
-- [#265](https://github.com/request/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr)
-- [#262](https://github.com/request/request/pull/262) JSON test should check for equality (@timshadel)
-- [#261](https://github.com/request/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel)
-- [#249](https://github.com/request/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges, @polotek, @zephrax, @jeromegn)
-- [#255](https://github.com/request/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1)
-- [#260](https://github.com/request/request/pull/260) fixed just another leak of 'i' (@sreuter)
-- [#246](https://github.com/request/request/pull/246) Fixing the set-cookie header (@jeromegn)
-- [#243](https://github.com/request/request/pull/243) Dynamic boundary (@zephrax)
-- [#240](https://github.com/request/request/pull/240) don't error when null is passed for options (@polotek)
-- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso, @vpulim)
-- [#224](https://github.com/request/request/pull/224) Multipart content-type change (@janjongboom)
-- [#217](https://github.com/request/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup)
-- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@vpulim)
-- [#199](https://github.com/request/request/pull/199) Tunnel (@isaacs)
-- [#198](https://github.com/request/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs)
-- [#197](https://github.com/request/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs)
-- [#193](https://github.com/request/request/pull/193) Fixes GH-119 (@goatslacker)
-- [#188](https://github.com/request/request/pull/188) Add abort support to the returned request (@itay)
-- [#176](https://github.com/request/request/pull/176) Querystring option (@csainty)
-- [#182](https://github.com/request/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63)
-- [#180](https://github.com/request/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63)
-- [#179](https://github.com/request/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack)
-- [#177](https://github.com/request/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63)
-- [#170](https://github.com/request/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes)
-- [#168](https://github.com/request/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby)
-- [#161](https://github.com/request/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou)
-- [#162](https://github.com/request/request/pull/162) Fix issue #159 (@dpetukhov)
-- [#90](https://github.com/request/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes)
-- [#148](https://github.com/request/request/pull/148) Retry Agent (@thejh)
-- [#146](https://github.com/request/request/pull/146) Multipart should respect content-type if previously set (@apeace)
-- [#144](https://github.com/request/request/pull/144) added "form" option to readme (@petejkim)
-- [#133](https://github.com/request/request/pull/133) Fixed cookies parsing (@afanasy)
-- [#135](https://github.com/request/request/pull/135) host vs hostname (@iangreenleaf)
-- [#132](https://github.com/request/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson)
-- [#112](https://github.com/request/request/pull/112) Support using a custom http-like module (@jhs)
-- [#104](https://github.com/request/request/pull/104) Cookie handling contains bugs (@janjongboom)
-- [#121](https://github.com/request/request/pull/121) Another patch for cookie handling regression (@jhurliman)
-- [#117](https://github.com/request/request/pull/117) Remove the global `i` (@3rd-Eden)
-- [#110](https://github.com/request/request/pull/110) Update to Iris Couch URL (@jhs)
-- [#86](https://github.com/request/request/pull/86) Can't post binary to multipart requests (@kkaefer)
-- [#105](https://github.com/request/request/pull/105) added test for proxy option. (@dominictarr)
-- [#102](https://github.com/request/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex)
-- [#97](https://github.com/request/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs)
-- [#96](https://github.com/request/request/pull/96) Authless parsed url host support (@isaacs)
-- [#81](https://github.com/request/request/pull/81) Enhance redirect handling (@danmactough)
-- [#78](https://github.com/request/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs)
-- [#76](https://github.com/request/request/pull/76) Bug when a request fails and a timeout is set (@Marsup)
-- [#70](https://github.com/request/request/pull/70) add test script to package.json (@isaacs, @aheckmann)
-- [#73](https://github.com/request/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs)
-- [#69](https://github.com/request/request/pull/69) Flatten chunked requests properly (@isaacs)
-- [#67](https://github.com/request/request/pull/67) fixed global variable leaks (@aheckmann)
-- [#66](https://github.com/request/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod)
-- [#53](https://github.com/request/request/pull/53) Parse json: Issue #51 (@benatkin)
-- [#45](https://github.com/request/request/pull/45) Added timeout option (@mbrevoort)
-- [#35](https://github.com/request/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli)
-- [#31](https://github.com/request/request/pull/31) Error on piping a request to a destination (@tobowers) \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/request/LICENSE b/node_modules/node-gyp/node_modules/request/LICENSE
deleted file mode 100644
index a4a9aee0c..000000000
--- a/node_modules/node-gyp/node_modules/request/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/node-gyp/node_modules/request/README.md b/node_modules/node-gyp/node_modules/request/README.md
deleted file mode 100644
index 231739114..000000000
--- a/node_modules/node-gyp/node_modules/request/README.md
+++ /dev/null
@@ -1,1115 +0,0 @@
-
-# Request - Simplified HTTP client
-
-[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)
-
-[![Build status](https://img.shields.io/travis/request/request/master.svg?style=flat-square)](https://travis-ci.org/request/request)
-[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master)
-[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request)
-[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request)
-[![Known Vulnerabilities](https://snyk.io/test/npm/request/badge.svg?style=flat-square)](https://snyk.io/test/npm/request)
-[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge)
-
-
-## Super simple to use
-
-Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.
-
-```js
-var request = require('request');
-request('http://www.google.com', function (error, response, body) {
- console.log('error:', error); // Print the error if one occurred
- console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
- console.log('body:', body); // Print the HTML for the Google homepage.
-});
-```
-
-
-## Table of contents
-
-- [Streaming](#streaming)
-- [Forms](#forms)
-- [HTTP Authentication](#http-authentication)
-- [Custom HTTP Headers](#custom-http-headers)
-- [OAuth Signing](#oauth-signing)
-- [Proxies](#proxies)
-- [Unix Domain Sockets](#unix-domain-sockets)
-- [TLS/SSL Protocol](#tlsssl-protocol)
-- [Support for HAR 1.2](#support-for-har-12)
-- [**All Available Options**](#requestoptions-callback)
-
-Request also offers [convenience methods](#convenience-methods) like
-`request.defaults` and `request.post`, and there are
-lots of [usage examples](#examples) and several
-[debugging techniques](#debugging).
-
-
----
-
-
-## Streaming
-
-You can stream any response to a file stream.
-
-```js
-request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
-```
-
-You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).
-
-```js
-fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
-```
-
-Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.
-
-```js
-request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))
-```
-
-Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
-
-```js
-request
- .get('http://google.com/img.png')
- .on('response', function(response) {
- console.log(response.statusCode) // 200
- console.log(response.headers['content-type']) // 'image/png'
- })
- .pipe(request.put('http://mysite.com/img.png'))
-```
-
-To easily handle errors when streaming requests, listen to the `error` event before piping:
-
-```js
-request
- .get('http://mysite.com/doodle.png')
- .on('error', function(err) {
- console.log(err)
- })
- .pipe(fs.createWriteStream('doodle.png'))
-```
-
-Now let’s get fancy.
-
-```js
-http.createServer(function (req, resp) {
- if (req.url === '/doodle.png') {
- if (req.method === 'PUT') {
- req.pipe(request.put('http://mysite.com/doodle.png'))
- } else if (req.method === 'GET' || req.method === 'HEAD') {
- request.get('http://mysite.com/doodle.png').pipe(resp)
- }
- }
-})
-```
-
-You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:
-
-```js
-http.createServer(function (req, resp) {
- if (req.url === '/doodle.png') {
- var x = request('http://mysite.com/doodle.png')
- req.pipe(x)
- x.pipe(resp)
- }
-})
-```
-
-And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)
-
-```js
-req.pipe(request('http://mysite.com/doodle.png')).pipe(resp)
-```
-
-Also, none of this new functionality conflicts with requests previous features, it just expands them.
-
-```js
-var r = request.defaults({'proxy':'http://localproxy.com'})
-
-http.createServer(function (req, resp) {
- if (req.url === '/doodle.png') {
- r.get('http://google.com/doodle.png').pipe(resp)
- }
-})
-```
-
-You can still use intermediate proxies, the requests will still follow HTTP forwards, etc.
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## Forms
-
-`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.
-
-
-#### application/x-www-form-urlencoded (URL-Encoded Forms)
-
-URL-encoded forms are simple.
-
-```js
-request.post('http://service.com/upload', {form:{key:'value'}})
-// or
-request.post('http://service.com/upload').form({key:'value'})
-// or
-request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ })
-```
-
-
-#### multipart/form-data (Multipart Form Uploads)
-
-For `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option.
-
-
-```js
-var formData = {
- // Pass a simple key-value pair
- my_field: 'my_value',
- // Pass data via Buffers
- my_buffer: new Buffer([1, 2, 3]),
- // Pass data via Streams
- my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
- // Pass multiple values /w an Array
- attachments: [
- fs.createReadStream(__dirname + '/attachment1.jpg'),
- fs.createReadStream(__dirname + '/attachment2.jpg')
- ],
- // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS}
- // Use case: for some types of streams, you'll need to provide "file"-related information manually.
- // See the `form-data` README for more information about options: https://github.com/form-data/form-data
- custom_file: {
- value: fs.createReadStream('/dev/urandom'),
- options: {
- filename: 'topsecret.jpg',
- contentType: 'image/jpeg'
- }
- }
-};
-request.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) {
- if (err) {
- return console.error('upload failed:', err);
- }
- console.log('Upload successful! Server responded with:', body);
-});
-```
-
-For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)
-
-```js
-// NOTE: Advanced use-case, for normal use see 'formData' usage above
-var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...})
-var form = r.form();
-form.append('my_field', 'my_value');
-form.append('my_buffer', new Buffer([1, 2, 3]));
-form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'});
-```
-See the [form-data README](https://github.com/form-data/form-data) for more information & examples.
-
-
-#### multipart/related
-
-Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options.
-
-```js
- request({
- method: 'PUT',
- preambleCRLF: true,
- postambleCRLF: true,
- uri: 'http://service.com/upload',
- multipart: [
- {
- 'content-type': 'application/json',
- body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
- },
- { body: 'I am an attachment' },
- { body: fs.createReadStream('image.png') }
- ],
- // alternatively pass an object containing additional options
- multipart: {
- chunked: false,
- data: [
- {
- 'content-type': 'application/json',
- body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
- },
- { body: 'I am an attachment' }
- ]
- }
- },
- function (error, response, body) {
- if (error) {
- return console.error('upload failed:', error);
- }
- console.log('Upload successful! Server responded with:', body);
- })
-```
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## HTTP Authentication
-
-```js
-request.get('http://some.server.com/').auth('username', 'password', false);
-// or
-request.get('http://some.server.com/', {
- 'auth': {
- 'user': 'username',
- 'pass': 'password',
- 'sendImmediately': false
- }
-});
-// or
-request.get('http://some.server.com/').auth(null, null, true, 'bearerToken');
-// or
-request.get('http://some.server.com/', {
- 'auth': {
- 'bearer': 'bearerToken'
- }
-});
-```
-
-If passed as an option, `auth` should be a hash containing values:
-
-- `user` || `username`
-- `pass` || `password`
-- `sendImmediately` (optional)
-- `bearer` (optional)
-
-The method form takes parameters
-`auth(username, password, sendImmediately, bearer)`.
-
-`sendImmediately` defaults to `true`, which causes a basic or bearer
-authentication header to be sent. If `sendImmediately` is `false`, then
-`request` will retry with a proper authentication header after receiving a
-`401` response from the server (which must contain a `WWW-Authenticate` header
-indicating the required authentication method).
-
-Note that you can also specify basic authentication using the URL itself, as
-detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the
-`user:password` before the host with an `@` sign:
-
-```js
-var username = 'username',
- password = 'password',
- url = 'http://' + username + ':' + password + '@some.server.com';
-
-request({url: url}, function (error, response, body) {
- // Do more stuff with 'body' here
-});
-```
-
-Digest authentication is supported, but it only works with `sendImmediately`
-set to `false`; otherwise `request` will send basic authentication on the
-initial request, which will probably cause the request to fail.
-
-Bearer authentication is supported, and is activated when the `bearer` value is
-available. The value may be either a `String` or a `Function` returning a
-`String`. Using a function to supply the bearer token is particularly useful if
-used in conjunction with `defaults` to allow a single function to supply the
-last known token at the time of sending a request, or to compute one on the fly.
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## Custom HTTP Headers
-
-HTTP Headers, such as `User-Agent`, can be set in the `options` object.
-In the example below, we call the github API to find out the number
-of stars and forks for the request repository. This requires a
-custom `User-Agent` header as well as https.
-
-```js
-var request = require('request');
-
-var options = {
- url: 'https://api.github.com/repos/request/request',
- headers: {
- 'User-Agent': 'request'
- }
-};
-
-function callback(error, response, body) {
- if (!error && response.statusCode == 200) {
- var info = JSON.parse(body);
- console.log(info.stargazers_count + " Stars");
- console.log(info.forks_count + " Forks");
- }
-}
-
-request(options, callback);
-```
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## OAuth Signing
-
-[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The
-default signing algorithm is
-[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2):
-
-```js
-// OAuth1.0 - 3-legged server side flow (Twitter example)
-// step 1
-var qs = require('querystring')
- , oauth =
- { callback: 'http://mysite.com/callback/'
- , consumer_key: CONSUMER_KEY
- , consumer_secret: CONSUMER_SECRET
- }
- , url = 'https://api.twitter.com/oauth/request_token'
- ;
-request.post({url:url, oauth:oauth}, function (e, r, body) {
- // Ideally, you would take the body in the response
- // and construct a URL that a user clicks on (like a sign in button).
- // The verifier is only available in the response after a user has
- // verified with twitter that they are authorizing your app.
-
- // step 2
- var req_data = qs.parse(body)
- var uri = 'https://api.twitter.com/oauth/authenticate'
- + '?' + qs.stringify({oauth_token: req_data.oauth_token})
- // redirect the user to the authorize uri
-
- // step 3
- // after the user is redirected back to your server
- var auth_data = qs.parse(body)
- , oauth =
- { consumer_key: CONSUMER_KEY
- , consumer_secret: CONSUMER_SECRET
- , token: auth_data.oauth_token
- , token_secret: req_data.oauth_token_secret
- , verifier: auth_data.oauth_verifier
- }
- , url = 'https://api.twitter.com/oauth/access_token'
- ;
- request.post({url:url, oauth:oauth}, function (e, r, body) {
- // ready to make signed requests on behalf of the user
- var perm_data = qs.parse(body)
- , oauth =
- { consumer_key: CONSUMER_KEY
- , consumer_secret: CONSUMER_SECRET
- , token: perm_data.oauth_token
- , token_secret: perm_data.oauth_token_secret
- }
- , url = 'https://api.twitter.com/1.1/users/show.json'
- , qs =
- { screen_name: perm_data.screen_name
- , user_id: perm_data.user_id
- }
- ;
- request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) {
- console.log(user)
- })
- })
-})
-```
-
-For [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make
-the following changes to the OAuth options object:
-* Pass `signature_method : 'RSA-SHA1'`
-* Instead of `consumer_secret`, specify a `private_key` string in
- [PEM format](http://how2ssl.com/articles/working_with_pem_files/)
-
-For [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make
-the following changes to the OAuth options object:
-* Pass `signature_method : 'PLAINTEXT'`
-
-To send OAuth parameters via query params or in a post body as described in The
-[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param)
-section of the oauth1 spec:
-* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth
- options object.
-* `transport_method` defaults to `'header'`
-
-To use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either
-* Manually generate the body hash and pass it as a string `body_hash: '...'`
-* Automatically generate the body hash by passing `body_hash: true`
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## Proxies
-
-If you specify a `proxy` option, then the request (and any subsequent
-redirects) will be sent via a connection to the proxy server.
-
-If your endpoint is an `https` url, and you are using a proxy, then
-request will send a `CONNECT` request to the proxy server *first*, and
-then use the supplied connection to connect to the endpoint.
-
-That is, first it will make a request like:
-
-```
-HTTP/1.1 CONNECT endpoint-server.com:80
-Host: proxy-server.com
-User-Agent: whatever user agent you specify
-```
-
-and then the proxy server make a TCP connection to `endpoint-server`
-on port `80`, and return a response that looks like:
-
-```
-HTTP/1.1 200 OK
-```
-
-At this point, the connection is left open, and the client is
-communicating directly with the `endpoint-server.com` machine.
-
-See [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel)
-for more information.
-
-By default, when proxying `http` traffic, request will simply make a
-standard proxied `http` request. This is done by making the `url`
-section of the initial line of the request a fully qualified url to
-the endpoint.
-
-For example, it will make a single request that looks like:
-
-```
-HTTP/1.1 GET http://endpoint-server.com/some-url
-Host: proxy-server.com
-Other-Headers: all go here
-
-request body or whatever
-```
-
-Because a pure "http over http" tunnel offers no additional security
-or other features, it is generally simpler to go with a
-straightforward HTTP proxy in this case. However, if you would like
-to force a tunneling proxy, you may set the `tunnel` option to `true`.
-
-You can also make a standard proxied `http` request by explicitly setting
-`tunnel : false`, but **note that this will allow the proxy to see the traffic
-to/from the destination server**.
-
-If you are using a tunneling proxy, you may set the
-`proxyHeaderWhiteList` to share certain headers with the proxy.
-
-You can also set the `proxyHeaderExclusiveList` to share certain
-headers only with the proxy and not with destination host.
-
-By default, this set is:
-
-```
-accept
-accept-charset
-accept-encoding
-accept-language
-accept-ranges
-cache-control
-content-encoding
-content-language
-content-length
-content-location
-content-md5
-content-range
-content-type
-connection
-date
-expect
-max-forwards
-pragma
-proxy-authorization
-referer
-te
-transfer-encoding
-user-agent
-via
-```
-
-Note that, when using a tunneling proxy, the `proxy-authorization`
-header and any headers from custom `proxyHeaderExclusiveList` are
-*never* sent to the endpoint server, but only to the proxy server.
-
-
-### Controlling proxy behaviour using environment variables
-
-The following environment variables are respected by `request`:
-
- * `HTTP_PROXY` / `http_proxy`
- * `HTTPS_PROXY` / `https_proxy`
- * `NO_PROXY` / `no_proxy`
-
-When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request.
-
-`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables.
-
-Here's some examples of valid `no_proxy` values:
-
- * `google.com` - don't proxy HTTP/HTTPS requests to Google.
- * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google.
- * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo!
- * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether.
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## UNIX Domain Sockets
-
-`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme:
-
-```js
-/* Pattern */ 'http://unix:SOCKET:PATH'
-/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path')
-```
-
-Note: The `SOCKET` path is assumed to be absolute to the root of the host file system.
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## TLS/SSL Protocol
-
-TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be
-set directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent).
-
-```js
-var fs = require('fs')
- , path = require('path')
- , certFile = path.resolve(__dirname, 'ssl/client.crt')
- , keyFile = path.resolve(__dirname, 'ssl/client.key')
- , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem')
- , request = require('request');
-
-var options = {
- url: 'https://api.some-server.com/',
- cert: fs.readFileSync(certFile),
- key: fs.readFileSync(keyFile),
- passphrase: 'password',
- ca: fs.readFileSync(caFile)
-};
-
-request.get(options);
-```
-
-### Using `options.agentOptions`
-
-In the example below, we call an API requires client side SSL certificate
-(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol:
-
-```js
-var fs = require('fs')
- , path = require('path')
- , certFile = path.resolve(__dirname, 'ssl/client.crt')
- , keyFile = path.resolve(__dirname, 'ssl/client.key')
- , request = require('request');
-
-var options = {
- url: 'https://api.some-server.com/',
- agentOptions: {
- cert: fs.readFileSync(certFile),
- key: fs.readFileSync(keyFile),
- // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format:
- // pfx: fs.readFileSync(pfxFilePath),
- passphrase: 'password',
- securityOptions: 'SSL_OP_NO_SSLv3'
- }
-};
-
-request.get(options);
-```
-
-It is able to force using SSLv3 only by specifying `secureProtocol`:
-
-```js
-request.get({
- url: 'https://api.some-server.com/',
- agentOptions: {
- secureProtocol: 'SSLv3_method'
- }
-});
-```
-
-It is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs).
-This can be useful, for example, when using self-signed certificates.
-To require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`.
-The certificate the domain presents must be signed by the root certificate specified:
-
-```js
-request.get({
- url: 'https://api.some-server.com/',
- agentOptions: {
- ca: fs.readFileSync('ca.cert.pem')
- }
-});
-```
-
-[back to top](#table-of-contents)
-
-
----
-
-## Support for HAR 1.2
-
-The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`.
-
-a validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching.
-
-```js
- var request = require('request')
- request({
- // will be ignored
- method: 'GET',
- uri: 'http://www.google.com',
-
- // HTTP Archive Request Object
- har: {
- url: 'http://www.mockbin.com/har',
- method: 'POST',
- headers: [
- {
- name: 'content-type',
- value: 'application/x-www-form-urlencoded'
- }
- ],
- postData: {
- mimeType: 'application/x-www-form-urlencoded',
- params: [
- {
- name: 'foo',
- value: 'bar'
- },
- {
- name: 'hello',
- value: 'world'
- }
- ]
- }
- }
- })
-
- // a POST request will be sent to http://www.mockbin.com
- // with body an application/x-www-form-urlencoded body:
- // foo=bar&hello=world
-```
-
-[back to top](#table-of-contents)
-
-
----
-
-## request(options, callback)
-
-The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.
-
-- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`
-- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string.
-- `method` - http method (default: `"GET"`)
-- `headers` - http headers (default: `{}`)
-
----
-
-- `qs` - object containing querystring values to be appended to the `uri`
-- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`
-- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat`
-- `useQuerystring` - If true, use `querystring` to stringify and parse
- querystrings, otherwise use `qs` (default: `false`). Set this option to
- `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the
- default `foo[0]=bar&foo[1]=baz`.
-
----
-
-- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object.
-- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
-- `formData` - Data to pass for a `multipart/form-data` request. See
- [Forms](#forms) section above.
-- `multipart` - array of objects which contain their own headers and `body`
- attributes. Sends a `multipart/related` request. See [Forms](#forms) section
- above.
- - Alternatively you can pass in an object `{chunked: false, data: []}` where
- `chunked` is used to specify whether the request is sent in
- [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding)
- In non-chunked requests, data items with body streams are not allowed.
-- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.
-- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.
-- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
-- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.
-- `jsonReplacer` - a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that will be passed to `JSON.stringify()` when stringifying a JSON request body.
-
----
-
-- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
-- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
-- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
-- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first.
-- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
-
----
-
-- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.
-- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)
-- `followOriginalHttpMethod` - by default we redirect to HTTP method GET. you can enable this property to redirect to the original HTTP method (default: `false`)
-- `maxRedirects` - the maximum number of redirects to follow (default: `10`)
-- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain.
-
----
-
-- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.)
-- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
-- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)
-
----
-
-- `agent` - `http(s).Agent` instance to use
-- `agentClass` - alternatively specify your agent's class name
-- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions).
-- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+
-- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified.
- - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).
- - Note that if you are sending multiple requests in a loop and creating
- multiple new `pool` objects, `maxSockets` will not work as intended. To
- work around this, either use [`request.defaults`](#requestdefaultsoptions)
- with your pool options or create the pool object with the `maxSockets`
- property outside of the loop.
-- `timeout` - Integer containing the number of milliseconds to wait for a
-server to send response headers (and start the response body) before aborting
-the request. Note that if the underlying TCP connection cannot be established,
-the OS-wide TCP connection timeout will overrule the `timeout` option ([the
-default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
-
-[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout
-
----
-
-- `localAddress` - Local interface to bind for network connections.
-- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)
-- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.
-- `tunnel` - controls the behavior of
- [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling)
- as follows:
- - `undefined` (default) - `true` if the destination is `https`, `false` otherwise
- - `true` - always tunnel to the destination by making a `CONNECT` request to
- the proxy
- - `false` - request the destination as a `GET` request.
-- `proxyHeaderWhiteList` - A whitelist of headers to send to a
- tunneling proxy.
-- `proxyHeaderExclusiveList` - A whitelist of headers to send
- exclusively to a tunneling proxy and not to destination.
-
----
-
-- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution. When set, the following properties are added to the response object:
- - `elapsedTime` Duration of the entire request/response in milliseconds (*deprecated*).
- - `responseStartTime` Timestamp when the response began (in Unix Epoch milliseconds) (*deprecated*).
- - `timingStart` Timestamp of the start of the request (in Unix Epoch milliseconds).
- - `timings` Contains event timestamps in millisecond resolution relative to `timingStart`. If there were redirects, the properties reflect the timings of the final request in the redirect chain:
- - `socket` Relative timestamp when the [`http`](https://nodejs.org/api/http.html#http_event_socket) module's `socket` event fires. This happens when the socket is assigned to the request.
- - `lookup` Relative timestamp when the [`net`](https://nodejs.org/api/net.html#net_event_lookup) module's `lookup` event fires. This happens when the DNS has been resolved.
- - `connect`: Relative timestamp when the [`net`](https://nodejs.org/api/net.html#net_event_connect) module's `connect` event fires. This happens when the server acknowledges the TCP connection.
- - `response`: Relative timestamp when the [`http`](https://nodejs.org/api/http.html#http_event_response) module's `response` event fires. This happens when the first bytes are received from the server.
- - `end`: Relative timestamp when the last bytes of the response are received.
- - `timingPhases` Contains the durations of each request phase. If there were redirects, the properties reflect the timings of the final request in the redirect chain:
- - `wait`: Duration of socket initialization (`timings.socket`)
- - `dns`: Duration of DNS lookup (`timings.lookup` - `timings.socket`)
- - `tcp`: Duration of TCP connection (`timings.connect` - `timings.socket`)
- - `firstByte`: Duration of HTTP server response (`timings.response` - `timings.connect`)
- - `download`: Duration of HTTP download (`timings.end` - `timings.response`)
- - `total`: Duration entire HTTP round-trip (`timings.end`)
-
-- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)*
-- `callback` - alternatively pass the request's callback in the options object
-
-The callback argument gets 3 arguments:
-
-1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)
-2. An [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object (Response object)
-3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)
-
-[back to top](#table-of-contents)
-
-
----
-
-## Convenience methods
-
-There are also shorthand methods for different HTTP METHODs and some other conveniences.
-
-
-### request.defaults(options)
-
-This method **returns a wrapper** around the normal request API that defaults
-to whatever options you pass to it.
-
-**Note:** `request.defaults()` **does not** modify the global request API;
-instead, it **returns a wrapper** that has your default settings applied to it.
-
-**Note:** You can call `.defaults()` on the wrapper that is returned from
-`request.defaults` to add/override defaults that were previously defaulted.
-
-For example:
-```js
-//requests using baseRequest() will set the 'x-token' header
-var baseRequest = request.defaults({
- headers: {'x-token': 'my-token'}
-})
-
-//requests using specialRequest() will include the 'x-token' header set in
-//baseRequest and will also include the 'special' header
-var specialRequest = baseRequest.defaults({
- headers: {special: 'special value'}
-})
-```
-
-### request.put
-
-Same as `request()`, but defaults to `method: "PUT"`.
-
-```js
-request.put(url)
-```
-
-### request.patch
-
-Same as `request()`, but defaults to `method: "PATCH"`.
-
-```js
-request.patch(url)
-```
-
-### request.post
-
-Same as `request()`, but defaults to `method: "POST"`.
-
-```js
-request.post(url)
-```
-
-### request.head
-
-Same as `request()`, but defaults to `method: "HEAD"`.
-
-```js
-request.head(url)
-```
-
-### request.del / request.delete
-
-Same as `request()`, but defaults to `method: "DELETE"`.
-
-```js
-request.del(url)
-request.delete(url)
-```
-
-### request.get
-
-Same as `request()` (for uniformity).
-
-```js
-request.get(url)
-```
-### request.cookie
-
-Function that creates a new cookie.
-
-```js
-request.cookie('key1=value1')
-```
-### request.jar()
-
-Function that creates a new cookie jar.
-
-```js
-request.jar()
-```
-
-[back to top](#table-of-contents)
-
-
----
-
-
-## Debugging
-
-There are at least three ways to debug the operation of `request`:
-
-1. Launch the node process like `NODE_DEBUG=request node script.js`
- (`lib,request,otherlib` works too).
-
-2. Set `require('request').debug = true` at any time (this does the same thing
- as #1).
-
-3. Use the [request-debug module](https://github.com/request/request-debug) to
- view request and response headers and bodies.
-
-[back to top](#table-of-contents)
-
-
----
-
-## Timeouts
-
-Most requests to external servers should have a timeout attached, in case the
-server is not responding in a timely manner. Without a timeout, your code may
-have a socket open/consume resources for minutes or more.
-
-There are two main types of timeouts: **connection timeouts** and **read
-timeouts**. A connect timeout occurs if the timeout is hit while your client is
-attempting to establish a connection to a remote machine (corresponding to the
-[connect() call][connect] on the socket). A read timeout occurs any time the
-server is too slow to send back a part of the response.
-
-These two situations have widely different implications for what went wrong
-with the request, so it's useful to be able to distinguish them. You can detect
-timeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you
-can detect whether the timeout was a connection timeout by checking if the
-`err.connect` property is set to `true`.
-
-```js
-request.get('http://10.255.255.1', {timeout: 1500}, function(err) {
- console.log(err.code === 'ETIMEDOUT');
- // Set to `true` if the timeout was a connection timeout, `false` or
- // `undefined` otherwise.
- console.log(err.connect === true);
- process.exit(0);
-});
-```
-
-[connect]: http://linux.die.net/man/2/connect
-
-## Examples:
-
-```js
- var request = require('request')
- , rand = Math.floor(Math.random()*100000000).toString()
- ;
- request(
- { method: 'PUT'
- , uri: 'http://mikeal.iriscouch.com/testjs/' + rand
- , multipart:
- [ { 'content-type': 'application/json'
- , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
- }
- , { body: 'I am an attachment' }
- ]
- }
- , function (error, response, body) {
- if(response.statusCode == 201){
- console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)
- } else {
- console.log('error: '+ response.statusCode)
- console.log(body)
- }
- }
- )
-```
-
-For backwards-compatibility, response compression is not supported by default.
-To accept gzip-compressed responses, set the `gzip` option to `true`. Note
-that the body data passed through `request` is automatically decompressed
-while the response object is unmodified and will contain compressed data if
-the server sent a compressed response.
-
-```js
- var request = require('request')
- request(
- { method: 'GET'
- , uri: 'http://www.google.com'
- , gzip: true
- }
- , function (error, response, body) {
- // body is the decompressed response body
- console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))
- console.log('the decoded data is: ' + body)
- }
- ).on('data', function(data) {
- // decompressed data as it is received
- console.log('decoded chunk: ' + data)
- })
- .on('response', function(response) {
- // unmodified http.IncomingMessage object
- response.on('data', function(data) {
- // compressed data as it is received
- console.log('received ' + data.length + ' bytes of compressed data')
- })
- })
-```
-
-Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).
-
-```js
-var request = request.defaults({jar: true})
-request('http://www.google.com', function () {
- request('http://images.google.com')
-})
-```
-
-To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)
-
-```js
-var j = request.jar()
-var request = request.defaults({jar:j})
-request('http://www.google.com', function () {
- request('http://images.google.com')
-})
-```
-
-OR
-
-```js
-var j = request.jar();
-var cookie = request.cookie('key1=value1');
-var url = 'http://www.google.com';
-j.setCookie(cookie, url);
-request({url: url, jar: j}, function () {
- request('http://images.google.com')
-})
-```
-
-To use a custom cookie store (such as a
-[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore)
-which supports saving to and restoring from JSON files), pass it as a parameter
-to `request.jar()`:
-
-```js
-var FileCookieStore = require('tough-cookie-filestore');
-// NOTE - currently the 'cookies.json' file must already exist!
-var j = request.jar(new FileCookieStore('cookies.json'));
-request = request.defaults({ jar : j })
-request('http://www.google.com', function() {
- request('http://images.google.com')
-})
-```
-
-The cookie store must be a
-[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie)
-store and it must support synchronous operations; see the
-[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api)
-for details.
-
-To inspect your cookie jar after a request:
-
-```js
-var j = request.jar()
-request({url: 'http://www.google.com', jar: j}, function () {
- var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..."
- var cookies = j.getCookies(url);
- // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...]
-})
-```
-
-[back to top](#table-of-contents)
diff --git a/node_modules/node-gyp/node_modules/request/index.js b/node_modules/node-gyp/node_modules/request/index.js
deleted file mode 100755
index 9ec65ea26..000000000
--- a/node_modules/node-gyp/node_modules/request/index.js
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2010-2012 Mikeal Rogers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-'use strict'
-
-var extend = require('extend')
- , cookies = require('./lib/cookies')
- , helpers = require('./lib/helpers')
-
-var paramsHaveRequestBody = helpers.paramsHaveRequestBody
-
-
-// organize params for patch, post, put, head, del
-function initParams(uri, options, callback) {
- if (typeof options === 'function') {
- callback = options
- }
-
- var params = {}
- if (typeof options === 'object') {
- extend(params, options, {uri: uri})
- } else if (typeof uri === 'string') {
- extend(params, {uri: uri})
- } else {
- extend(params, uri)
- }
-
- params.callback = callback || params.callback
- return params
-}
-
-function request (uri, options, callback) {
- if (typeof uri === 'undefined') {
- throw new Error('undefined is not a valid uri or options object.')
- }
-
- var params = initParams(uri, options, callback)
-
- if (params.method === 'HEAD' && paramsHaveRequestBody(params)) {
- throw new Error('HTTP HEAD requests MUST NOT include a request body.')
- }
-
- return new request.Request(params)
-}
-
-function verbFunc (verb) {
- var method = verb.toUpperCase()
- return function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.method = method
- return request(params, params.callback)
- }
-}
-
-// define like this to please codeintel/intellisense IDEs
-request.get = verbFunc('get')
-request.head = verbFunc('head')
-request.post = verbFunc('post')
-request.put = verbFunc('put')
-request.patch = verbFunc('patch')
-request.del = verbFunc('delete')
-request['delete'] = verbFunc('delete')
-
-request.jar = function (store) {
- return cookies.jar(store)
-}
-
-request.cookie = function (str) {
- return cookies.parse(str)
-}
-
-function wrapRequestMethod (method, options, requester, verb) {
-
- return function (uri, opts, callback) {
- var params = initParams(uri, opts, callback)
-
- var target = {}
- extend(true, target, options, params)
-
- target.pool = params.pool || options.pool
-
- if (verb) {
- target.method = verb.toUpperCase()
- }
-
- if (typeof requester === 'function') {
- method = requester
- }
-
- return method(target, target.callback)
- }
-}
-
-request.defaults = function (options, requester) {
- var self = this
-
- options = options || {}
-
- if (typeof options === 'function') {
- requester = options
- options = {}
- }
-
- var defaults = wrapRequestMethod(self, options, requester)
-
- var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete']
- verbs.forEach(function(verb) {
- defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb)
- })
-
- defaults.cookie = wrapRequestMethod(self.cookie, options, requester)
- defaults.jar = self.jar
- defaults.defaults = self.defaults
- return defaults
-}
-
-request.forever = function (agentOptions, optionsArg) {
- var options = {}
- if (optionsArg) {
- extend(options, optionsArg)
- }
- if (agentOptions) {
- options.agentOptions = agentOptions
- }
-
- options.forever = true
- return request.defaults(options)
-}
-
-// Exports
-
-module.exports = request
-request.Request = require('./request')
-request.initParams = initParams
-
-// Backwards compatibility for request.debug
-Object.defineProperty(request, 'debug', {
- enumerable : true,
- get : function() {
- return request.Request.debug
- },
- set : function(debug) {
- request.Request.debug = debug
- }
-})
diff --git a/node_modules/node-gyp/node_modules/request/lib/auth.js b/node_modules/node-gyp/node_modules/request/lib/auth.js
deleted file mode 100644
index 559ca57be..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/auth.js
+++ /dev/null
@@ -1,168 +0,0 @@
-'use strict'
-
-var caseless = require('caseless')
- , uuid = require('uuid')
- , helpers = require('./helpers')
-
-var md5 = helpers.md5
- , toBase64 = helpers.toBase64
-
-
-function Auth (request) {
- // define all public properties here
- this.request = request
- this.hasAuth = false
- this.sentAuth = false
- this.bearerToken = null
- this.user = null
- this.pass = null
-}
-
-Auth.prototype.basic = function (user, pass, sendImmediately) {
- var self = this
- if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
- self.request.emit('error', new Error('auth() received invalid user or password'))
- }
- self.user = user
- self.pass = pass
- self.hasAuth = true
- var header = user + ':' + (pass || '')
- if (sendImmediately || typeof sendImmediately === 'undefined') {
- var authHeader = 'Basic ' + toBase64(header)
- self.sentAuth = true
- return authHeader
- }
-}
-
-Auth.prototype.bearer = function (bearer, sendImmediately) {
- var self = this
- self.bearerToken = bearer
- self.hasAuth = true
- if (sendImmediately || typeof sendImmediately === 'undefined') {
- if (typeof bearer === 'function') {
- bearer = bearer()
- }
- var authHeader = 'Bearer ' + (bearer || '')
- self.sentAuth = true
- return authHeader
- }
-}
-
-Auth.prototype.digest = function (method, path, authHeader) {
- // TODO: More complete implementation of RFC 2617.
- // - handle challenge.domain
- // - support qop="auth-int" only
- // - handle Authentication-Info (not necessarily?)
- // - check challenge.stale (not necessarily?)
- // - increase nc (not necessarily?)
- // For reference:
- // http://tools.ietf.org/html/rfc2617#section-3
- // https://github.com/bagder/curl/blob/master/lib/http_digest.c
-
- var self = this
-
- var challenge = {}
- var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
- for (;;) {
- var match = re.exec(authHeader)
- if (!match) {
- break
- }
- challenge[match[1]] = match[2] || match[3]
- }
-
- /**
- * RFC 2617: handle both MD5 and MD5-sess algorithms.
- *
- * If the algorithm directive's value is "MD5" or unspecified, then HA1 is
- * HA1=MD5(username:realm:password)
- * If the algorithm directive's value is "MD5-sess", then HA1 is
- * HA1=MD5(MD5(username:realm:password):nonce:cnonce)
- */
- var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) {
- var ha1 = md5(user + ':' + realm + ':' + pass)
- if (algorithm && algorithm.toLowerCase() === 'md5-sess') {
- return md5(ha1 + ':' + nonce + ':' + cnonce)
- } else {
- return ha1
- }
- }
-
- var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
- var nc = qop && '00000001'
- var cnonce = qop && uuid().replace(/-/g, '')
- var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce)
- var ha2 = md5(method + ':' + path)
- var digestResponse = qop
- ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2)
- : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
- var authValues = {
- username: self.user,
- realm: challenge.realm,
- nonce: challenge.nonce,
- uri: path,
- qop: qop,
- response: digestResponse,
- nc: nc,
- cnonce: cnonce,
- algorithm: challenge.algorithm,
- opaque: challenge.opaque
- }
-
- authHeader = []
- for (var k in authValues) {
- if (authValues[k]) {
- if (k === 'qop' || k === 'nc' || k === 'algorithm') {
- authHeader.push(k + '=' + authValues[k])
- } else {
- authHeader.push(k + '="' + authValues[k] + '"')
- }
- }
- }
- authHeader = 'Digest ' + authHeader.join(', ')
- self.sentAuth = true
- return authHeader
-}
-
-Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) {
- var self = this
- , request = self.request
-
- var authHeader
- if (bearer === undefined && user === undefined) {
- self.request.emit('error', new Error('no auth mechanism defined'))
- } else if (bearer !== undefined) {
- authHeader = self.bearer(bearer, sendImmediately)
- } else {
- authHeader = self.basic(user, pass, sendImmediately)
- }
- if (authHeader) {
- request.setHeader('authorization', authHeader)
- }
-}
-
-Auth.prototype.onResponse = function (response) {
- var self = this
- , request = self.request
-
- if (!self.hasAuth || self.sentAuth) { return null }
-
- var c = caseless(response.headers)
-
- var authHeader = c.get('www-authenticate')
- var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
- request.debug('reauth', authVerb)
-
- switch (authVerb) {
- case 'basic':
- return self.basic(self.user, self.pass, true)
-
- case 'bearer':
- return self.bearer(self.bearerToken, true)
-
- case 'digest':
- return self.digest(request.method, request.path, authHeader)
- }
-}
-
-exports.Auth = Auth
diff --git a/node_modules/node-gyp/node_modules/request/lib/cookies.js b/node_modules/node-gyp/node_modules/request/lib/cookies.js
deleted file mode 100644
index 412c07d63..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/cookies.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict'
-
-var tough = require('tough-cookie')
-
-var Cookie = tough.Cookie
- , CookieJar = tough.CookieJar
-
-
-exports.parse = function(str) {
- if (str && str.uri) {
- str = str.uri
- }
- if (typeof str !== 'string') {
- throw new Error('The cookie function only accepts STRING as param')
- }
- return Cookie.parse(str, {loose: true})
-}
-
-// Adapt the sometimes-Async api of tough.CookieJar to our requirements
-function RequestJar(store) {
- var self = this
- self._jar = new CookieJar(store, {looseMode: true})
-}
-RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) {
- var self = this
- return self._jar.setCookieSync(cookieOrStr, uri, options || {})
-}
-RequestJar.prototype.getCookieString = function(uri) {
- var self = this
- return self._jar.getCookieStringSync(uri)
-}
-RequestJar.prototype.getCookies = function(uri) {
- var self = this
- return self._jar.getCookiesSync(uri)
-}
-
-exports.jar = function(store) {
- return new RequestJar(store)
-}
diff --git a/node_modules/node-gyp/node_modules/request/lib/getProxyFromURI.js b/node_modules/node-gyp/node_modules/request/lib/getProxyFromURI.js
deleted file mode 100644
index c2013a6e1..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/getProxyFromURI.js
+++ /dev/null
@@ -1,79 +0,0 @@
-'use strict'
-
-function formatHostname(hostname) {
- // canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
- return hostname.replace(/^\.*/, '.').toLowerCase()
-}
-
-function parseNoProxyZone(zone) {
- zone = zone.trim().toLowerCase()
-
- var zoneParts = zone.split(':', 2)
- , zoneHost = formatHostname(zoneParts[0])
- , zonePort = zoneParts[1]
- , hasPort = zone.indexOf(':') > -1
-
- return {hostname: zoneHost, port: zonePort, hasPort: hasPort}
-}
-
-function uriInNoProxy(uri, noProxy) {
- var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
- , hostname = formatHostname(uri.hostname)
- , noProxyList = noProxy.split(',')
-
- // iterate through the noProxyList until it finds a match.
- return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) {
- var isMatchedAt = hostname.indexOf(noProxyZone.hostname)
- , hostnameMatched = (
- isMatchedAt > -1 &&
- (isMatchedAt === hostname.length - noProxyZone.hostname.length)
- )
-
- if (noProxyZone.hasPort) {
- return (port === noProxyZone.port) && hostnameMatched
- }
-
- return hostnameMatched
- })
-}
-
-function getProxyFromURI(uri) {
- // Decide the proper request proxy to use based on the request URI object and the
- // environmental variables (NO_PROXY, HTTP_PROXY, etc.)
- // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html)
-
- var noProxy = process.env.NO_PROXY || process.env.no_proxy || ''
-
- // if the noProxy is a wildcard then return null
-
- if (noProxy === '*') {
- return null
- }
-
- // if the noProxy is not empty and the uri is found return null
-
- if (noProxy !== '' && uriInNoProxy(uri, noProxy)) {
- return null
- }
-
- // Check for HTTP or HTTPS Proxy in environment Else default to null
-
- if (uri.protocol === 'http:') {
- return process.env.HTTP_PROXY ||
- process.env.http_proxy || null
- }
-
- if (uri.protocol === 'https:') {
- return process.env.HTTPS_PROXY ||
- process.env.https_proxy ||
- process.env.HTTP_PROXY ||
- process.env.http_proxy || null
- }
-
- // if none of that works, return null
- // (What uri protocol are you using then?)
-
- return null
-}
-
-module.exports = getProxyFromURI
diff --git a/node_modules/node-gyp/node_modules/request/lib/har.js b/node_modules/node-gyp/node_modules/request/lib/har.js
deleted file mode 100644
index 305957487..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/har.js
+++ /dev/null
@@ -1,215 +0,0 @@
-'use strict'
-
-var fs = require('fs')
-var qs = require('querystring')
-var validate = require('har-validator')
-var extend = require('extend')
-
-function Har (request) {
- this.request = request
-}
-
-Har.prototype.reducer = function (obj, pair) {
- // new property ?
- if (obj[pair.name] === undefined) {
- obj[pair.name] = pair.value
- return obj
- }
-
- // existing? convert to array
- var arr = [
- obj[pair.name],
- pair.value
- ]
-
- obj[pair.name] = arr
-
- return obj
-}
-
-Har.prototype.prep = function (data) {
- // construct utility properties
- data.queryObj = {}
- data.headersObj = {}
- data.postData.jsonObj = false
- data.postData.paramsObj = false
-
- // construct query objects
- if (data.queryString && data.queryString.length) {
- data.queryObj = data.queryString.reduce(this.reducer, {})
- }
-
- // construct headers objects
- if (data.headers && data.headers.length) {
- // loweCase header keys
- data.headersObj = data.headers.reduceRight(function (headers, header) {
- headers[header.name] = header.value
- return headers
- }, {})
- }
-
- // construct Cookie header
- if (data.cookies && data.cookies.length) {
- var cookies = data.cookies.map(function (cookie) {
- return cookie.name + '=' + cookie.value
- })
-
- if (cookies.length) {
- data.headersObj.cookie = cookies.join('; ')
- }
- }
-
- // prep body
- function some (arr) {
- return arr.some(function (type) {
- return data.postData.mimeType.indexOf(type) === 0
- })
- }
-
- if (some([
- 'multipart/mixed',
- 'multipart/related',
- 'multipart/form-data',
- 'multipart/alternative'])) {
-
- // reset values
- data.postData.mimeType = 'multipart/form-data'
- }
-
- else if (some([
- 'application/x-www-form-urlencoded'])) {
-
- if (!data.postData.params) {
- data.postData.text = ''
- } else {
- data.postData.paramsObj = data.postData.params.reduce(this.reducer, {})
-
- // always overwrite
- data.postData.text = qs.stringify(data.postData.paramsObj)
- }
- }
-
- else if (some([
- 'text/json',
- 'text/x-json',
- 'application/json',
- 'application/x-json'])) {
-
- data.postData.mimeType = 'application/json'
-
- if (data.postData.text) {
- try {
- data.postData.jsonObj = JSON.parse(data.postData.text)
- } catch (e) {
- this.request.debug(e)
-
- // force back to text/plain
- data.postData.mimeType = 'text/plain'
- }
- }
- }
-
- return data
-}
-
-Har.prototype.options = function (options) {
- // skip if no har property defined
- if (!options.har) {
- return options
- }
-
- var har = {}
- extend(har, options.har)
-
- // only process the first entry
- if (har.log && har.log.entries) {
- har = har.log.entries[0]
- }
-
- // add optional properties to make validation successful
- har.url = har.url || options.url || options.uri || options.baseUrl || '/'
- har.httpVersion = har.httpVersion || 'HTTP/1.1'
- har.queryString = har.queryString || []
- har.headers = har.headers || []
- har.cookies = har.cookies || []
- har.postData = har.postData || {}
- har.postData.mimeType = har.postData.mimeType || 'application/octet-stream'
-
- har.bodySize = 0
- har.headersSize = 0
- har.postData.size = 0
-
- if (!validate.request(har)) {
- return options
- }
-
- // clean up and get some utility properties
- var req = this.prep(har)
-
- // construct new options
- if (req.url) {
- options.url = req.url
- }
-
- if (req.method) {
- options.method = req.method
- }
-
- if (Object.keys(req.queryObj).length) {
- options.qs = req.queryObj
- }
-
- if (Object.keys(req.headersObj).length) {
- options.headers = req.headersObj
- }
-
- function test (type) {
- return req.postData.mimeType.indexOf(type) === 0
- }
- if (test('application/x-www-form-urlencoded')) {
- options.form = req.postData.paramsObj
- }
- else if (test('application/json')) {
- if (req.postData.jsonObj) {
- options.body = req.postData.jsonObj
- options.json = true
- }
- }
- else if (test('multipart/form-data')) {
- options.formData = {}
-
- req.postData.params.forEach(function (param) {
- var attachment = {}
-
- if (!param.fileName && !param.fileName && !param.contentType) {
- options.formData[param.name] = param.value
- return
- }
-
- // attempt to read from disk!
- if (param.fileName && !param.value) {
- attachment.value = fs.createReadStream(param.fileName)
- } else if (param.value) {
- attachment.value = param.value
- }
-
- if (param.fileName) {
- attachment.options = {
- filename: param.fileName,
- contentType: param.contentType ? param.contentType : null
- }
- }
-
- options.formData[param.name] = attachment
- })
- }
- else {
- if (req.postData.text) {
- options.body = req.postData.text
- }
- }
-
- return options
-}
-
-exports.Har = Har
diff --git a/node_modules/node-gyp/node_modules/request/lib/helpers.js b/node_modules/node-gyp/node_modules/request/lib/helpers.js
deleted file mode 100644
index 05c77a0bd..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/helpers.js
+++ /dev/null
@@ -1,66 +0,0 @@
-'use strict'
-
-var jsonSafeStringify = require('json-stringify-safe')
- , crypto = require('crypto')
- , Buffer = require('safe-buffer').Buffer
-
-var defer = typeof setImmediate === 'undefined'
- ? process.nextTick
- : setImmediate
-
-function paramsHaveRequestBody(params) {
- return (
- params.body ||
- params.requestBodyStream ||
- (params.json && typeof params.json !== 'boolean') ||
- params.multipart
- )
-}
-
-function safeStringify (obj, replacer) {
- var ret
- try {
- ret = JSON.stringify(obj, replacer)
- } catch (e) {
- ret = jsonSafeStringify(obj, replacer)
- }
- return ret
-}
-
-function md5 (str) {
- return crypto.createHash('md5').update(str).digest('hex')
-}
-
-function isReadStream (rs) {
- return rs.readable && rs.path && rs.mode
-}
-
-function toBase64 (str) {
- return Buffer.from(str || '', 'utf8').toString('base64')
-}
-
-function copy (obj) {
- var o = {}
- Object.keys(obj).forEach(function (i) {
- o[i] = obj[i]
- })
- return o
-}
-
-function version () {
- var numbers = process.version.replace('v', '').split('.')
- return {
- major: parseInt(numbers[0], 10),
- minor: parseInt(numbers[1], 10),
- patch: parseInt(numbers[2], 10)
- }
-}
-
-exports.paramsHaveRequestBody = paramsHaveRequestBody
-exports.safeStringify = safeStringify
-exports.md5 = md5
-exports.isReadStream = isReadStream
-exports.toBase64 = toBase64
-exports.copy = copy
-exports.version = version
-exports.defer = defer
diff --git a/node_modules/node-gyp/node_modules/request/lib/multipart.js b/node_modules/node-gyp/node_modules/request/lib/multipart.js
deleted file mode 100644
index fc7b50276..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/multipart.js
+++ /dev/null
@@ -1,113 +0,0 @@
-'use strict'
-
-var uuid = require('uuid')
- , CombinedStream = require('combined-stream')
- , isstream = require('isstream')
- , Buffer = require('safe-buffer').Buffer
-
-
-function Multipart (request) {
- this.request = request
- this.boundary = uuid()
- this.chunked = false
- this.body = null
-}
-
-Multipart.prototype.isChunked = function (options) {
- var self = this
- , chunked = false
- , parts = options.data || options
-
- if (!parts.forEach) {
- self.request.emit('error', new Error('Argument error, options.multipart.'))
- }
-
- if (options.chunked !== undefined) {
- chunked = options.chunked
- }
-
- if (self.request.getHeader('transfer-encoding') === 'chunked') {
- chunked = true
- }
-
- if (!chunked) {
- parts.forEach(function (part) {
- if (typeof part.body === 'undefined') {
- self.request.emit('error', new Error('Body attribute missing in multipart.'))
- }
- if (isstream(part.body)) {
- chunked = true
- }
- })
- }
-
- return chunked
-}
-
-Multipart.prototype.setHeaders = function (chunked) {
- var self = this
-
- if (chunked && !self.request.hasHeader('transfer-encoding')) {
- self.request.setHeader('transfer-encoding', 'chunked')
- }
-
- var header = self.request.getHeader('content-type')
-
- if (!header || header.indexOf('multipart') === -1) {
- self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary)
- } else {
- if (header.indexOf('boundary') !== -1) {
- self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1')
- } else {
- self.request.setHeader('content-type', header + '; boundary=' + self.boundary)
- }
- }
-}
-
-Multipart.prototype.build = function (parts, chunked) {
- var self = this
- var body = chunked ? new CombinedStream() : []
-
- function add (part) {
- if (typeof part === 'number') {
- part = part.toString()
- }
- return chunked ? body.append(part) : body.push(Buffer.from(part))
- }
-
- if (self.request.preambleCRLF) {
- add('\r\n')
- }
-
- parts.forEach(function (part) {
- var preamble = '--' + self.boundary + '\r\n'
- Object.keys(part).forEach(function (key) {
- if (key === 'body') { return }
- preamble += key + ': ' + part[key] + '\r\n'
- })
- preamble += '\r\n'
- add(preamble)
- add(part.body)
- add('\r\n')
- })
- add('--' + self.boundary + '--')
-
- if (self.request.postambleCRLF) {
- add('\r\n')
- }
-
- return body
-}
-
-Multipart.prototype.onRequest = function (options) {
- var self = this
-
- var chunked = self.isChunked(options)
- , parts = options.data || options
-
- self.setHeaders(chunked)
- self.chunked = chunked
- self.body = self.build(parts, chunked)
-}
-
-exports.Multipart = Multipart
diff --git a/node_modules/node-gyp/node_modules/request/lib/oauth.js b/node_modules/node-gyp/node_modules/request/lib/oauth.js
deleted file mode 100644
index 13b693773..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/oauth.js
+++ /dev/null
@@ -1,148 +0,0 @@
-'use strict'
-
-var url = require('url')
- , qs = require('qs')
- , caseless = require('caseless')
- , uuid = require('uuid')
- , oauth = require('oauth-sign')
- , crypto = require('crypto')
- , Buffer = require('safe-buffer').Buffer
-
-
-function OAuth (request) {
- this.request = request
- this.params = null
-}
-
-OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) {
- var oa = {}
- for (var i in _oauth) {
- oa['oauth_' + i] = _oauth[i]
- }
- if (!oa.oauth_version) {
- oa.oauth_version = '1.0'
- }
- if (!oa.oauth_timestamp) {
- oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
- }
- if (!oa.oauth_nonce) {
- oa.oauth_nonce = uuid().replace(/-/g, '')
- }
- if (!oa.oauth_signature_method) {
- oa.oauth_signature_method = 'HMAC-SHA1'
- }
-
- var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key
- delete oa.oauth_consumer_secret
- delete oa.oauth_private_key
-
- var token_secret = oa.oauth_token_secret
- delete oa.oauth_token_secret
-
- var realm = oa.oauth_realm
- delete oa.oauth_realm
- delete oa.oauth_transport_method
-
- var baseurl = uri.protocol + '//' + uri.host + uri.pathname
- var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&'))
-
- oa.oauth_signature = oauth.sign(
- oa.oauth_signature_method,
- method,
- baseurl,
- params,
- consumer_secret_or_private_key,
- token_secret)
-
- if (realm) {
- oa.realm = realm
- }
-
- return oa
-}
-
-OAuth.prototype.buildBodyHash = function(_oauth, body) {
- if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) {
- this.request.emit('error', new Error('oauth: ' + _oauth.signature_method +
- ' signature_method not supported with body_hash signing.'))
- }
-
- var shasum = crypto.createHash('sha1')
- shasum.update(body || '')
- var sha1 = shasum.digest('hex')
-
- return Buffer.from(sha1).toString('base64')
-}
-
-OAuth.prototype.concatParams = function (oa, sep, wrap) {
- wrap = wrap || ''
-
- var params = Object.keys(oa).filter(function (i) {
- return i !== 'realm' && i !== 'oauth_signature'
- }).sort()
-
- if (oa.realm) {
- params.splice(0, 0, 'realm')
- }
- params.push('oauth_signature')
-
- return params.map(function (i) {
- return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap
- }).join(sep)
-}
-
-OAuth.prototype.onRequest = function (_oauth) {
- var self = this
- self.params = _oauth
-
- var uri = self.request.uri || {}
- , method = self.request.method || ''
- , headers = caseless(self.request.headers)
- , body = self.request.body || ''
- , qsLib = self.request.qsLib || qs
-
- var form
- , query
- , contentType = headers.get('content-type') || ''
- , formContentType = 'application/x-www-form-urlencoded'
- , transport = _oauth.transport_method || 'header'
-
- if (contentType.slice(0, formContentType.length) === formContentType) {
- contentType = formContentType
- form = body
- }
- if (uri.query) {
- query = uri.query
- }
- if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) {
- self.request.emit('error', new Error('oauth: transport_method of body requires POST ' +
- 'and content-type ' + formContentType))
- }
-
- if (!form && typeof _oauth.body_hash === 'boolean') {
- _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString())
- }
-
- var oa = self.buildParams(_oauth, uri, method, query, form, qsLib)
-
- switch (transport) {
- case 'header':
- self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"'))
- break
-
- case 'query':
- var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&')
- self.request.uri = url.parse(href)
- self.request.path = self.request.uri.path
- break
-
- case 'body':
- self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&')
- break
-
- default:
- self.request.emit('error', new Error('oauth: transport_method invalid'))
- }
-}
-
-exports.OAuth = OAuth
diff --git a/node_modules/node-gyp/node_modules/request/lib/querystring.js b/node_modules/node-gyp/node_modules/request/lib/querystring.js
deleted file mode 100644
index baf5e8021..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/querystring.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict'
-
-var qs = require('qs')
- , querystring = require('querystring')
-
-
-function Querystring (request) {
- this.request = request
- this.lib = null
- this.useQuerystring = null
- this.parseOptions = null
- this.stringifyOptions = null
-}
-
-Querystring.prototype.init = function (options) {
- if (this.lib) {return}
-
- this.useQuerystring = options.useQuerystring
- this.lib = (this.useQuerystring ? querystring : qs)
-
- this.parseOptions = options.qsParseOptions || {}
- this.stringifyOptions = options.qsStringifyOptions || {}
-}
-
-Querystring.prototype.stringify = function (obj) {
- return (this.useQuerystring)
- ? this.rfc3986(this.lib.stringify(obj,
- this.stringifyOptions.sep || null,
- this.stringifyOptions.eq || null,
- this.stringifyOptions))
- : this.lib.stringify(obj, this.stringifyOptions)
-}
-
-Querystring.prototype.parse = function (str) {
- return (this.useQuerystring)
- ? this.lib.parse(str,
- this.parseOptions.sep || null,
- this.parseOptions.eq || null,
- this.parseOptions)
- : this.lib.parse(str, this.parseOptions)
-}
-
-Querystring.prototype.rfc3986 = function (str) {
- return str.replace(/[!'()*]/g, function (c) {
- return '%' + c.charCodeAt(0).toString(16).toUpperCase()
- })
-}
-
-Querystring.prototype.unescape = querystring.unescape
-
-exports.Querystring = Querystring
diff --git a/node_modules/node-gyp/node_modules/request/lib/redirect.js b/node_modules/node-gyp/node_modules/request/lib/redirect.js
deleted file mode 100644
index f8604491f..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/redirect.js
+++ /dev/null
@@ -1,157 +0,0 @@
-'use strict'
-
-var url = require('url')
-var isUrl = /^https?:/
-
-function Redirect (request) {
- this.request = request
- this.followRedirect = true
- this.followRedirects = true
- this.followAllRedirects = false
- this.followOriginalHttpMethod = false
- this.allowRedirect = function () {return true}
- this.maxRedirects = 10
- this.redirects = []
- this.redirectsFollowed = 0
- this.removeRefererHeader = false
-}
-
-Redirect.prototype.onRequest = function (options) {
- var self = this
-
- if (options.maxRedirects !== undefined) {
- self.maxRedirects = options.maxRedirects
- }
- if (typeof options.followRedirect === 'function') {
- self.allowRedirect = options.followRedirect
- }
- if (options.followRedirect !== undefined) {
- self.followRedirects = !!options.followRedirect
- }
- if (options.followAllRedirects !== undefined) {
- self.followAllRedirects = options.followAllRedirects
- }
- if (self.followRedirects || self.followAllRedirects) {
- self.redirects = self.redirects || []
- }
- if (options.removeRefererHeader !== undefined) {
- self.removeRefererHeader = options.removeRefererHeader
- }
- if (options.followOriginalHttpMethod !== undefined) {
- self.followOriginalHttpMethod = options.followOriginalHttpMethod
- }
-}
-
-Redirect.prototype.redirectTo = function (response) {
- var self = this
- , request = self.request
-
- var redirectTo = null
- if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) {
- var location = response.caseless.get('location')
- request.debug('redirect', location)
-
- if (self.followAllRedirects) {
- redirectTo = location
- } else if (self.followRedirects) {
- switch (request.method) {
- case 'PATCH':
- case 'PUT':
- case 'POST':
- case 'DELETE':
- // Do not follow redirects
- break
- default:
- redirectTo = location
- break
- }
- }
- } else if (response.statusCode === 401) {
- var authHeader = request._auth.onResponse(response)
- if (authHeader) {
- request.setHeader('authorization', authHeader)
- redirectTo = request.uri
- }
- }
- return redirectTo
-}
-
-Redirect.prototype.onResponse = function (response) {
- var self = this
- , request = self.request
-
- var redirectTo = self.redirectTo(response)
- if (!redirectTo || !self.allowRedirect.call(request, response)) {
- return false
- }
-
- request.debug('redirect to', redirectTo)
-
- // ignore any potential response body. it cannot possibly be useful
- // to us at this point.
- // response.resume should be defined, but check anyway before calling. Workaround for browserify.
- if (response.resume) {
- response.resume()
- }
-
- if (self.redirectsFollowed >= self.maxRedirects) {
- request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href))
- return false
- }
- self.redirectsFollowed += 1
-
- if (!isUrl.test(redirectTo)) {
- redirectTo = url.resolve(request.uri.href, redirectTo)
- }
-
- var uriPrev = request.uri
- request.uri = url.parse(redirectTo)
-
- // handle the case where we change protocol from https to http or vice versa
- if (request.uri.protocol !== uriPrev.protocol) {
- delete request.agent
- }
-
- self.redirects.push(
- { statusCode : response.statusCode
- , redirectUri: redirectTo
- }
- )
- if (self.followAllRedirects && request.method !== 'HEAD'
- && response.statusCode !== 401 && response.statusCode !== 307) {
- request.method = self.followOriginalHttpMethod ? request.method : 'GET'
- }
- // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215
- delete request.src
- delete request.req
- delete request._started
- if (response.statusCode !== 401 && response.statusCode !== 307) {
- // Remove parameters from the previous response, unless this is the second request
- // for a server that requires digest authentication.
- delete request.body
- delete request._form
- if (request.headers) {
- request.removeHeader('host')
- request.removeHeader('content-type')
- request.removeHeader('content-length')
- if (request.uri.hostname !== request.originalHost.split(':')[0]) {
- // Remove authorization if changing hostnames (but not if just
- // changing ports or protocols). This matches the behavior of curl:
- // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710
- request.removeHeader('authorization')
- }
- }
- }
-
- if (!self.removeRefererHeader) {
- request.setHeader('referer', uriPrev.href)
- }
-
- request.emit('redirect')
-
- request.init()
-
- return true
-}
-
-exports.Redirect = Redirect
diff --git a/node_modules/node-gyp/node_modules/request/lib/tunnel.js b/node_modules/node-gyp/node_modules/request/lib/tunnel.js
deleted file mode 100644
index bf96a8fec..000000000
--- a/node_modules/node-gyp/node_modules/request/lib/tunnel.js
+++ /dev/null
@@ -1,176 +0,0 @@
-'use strict'
-
-var url = require('url')
- , tunnel = require('tunnel-agent')
-
-var defaultProxyHeaderWhiteList = [
- 'accept',
- 'accept-charset',
- 'accept-encoding',
- 'accept-language',
- 'accept-ranges',
- 'cache-control',
- 'content-encoding',
- 'content-language',
- 'content-location',
- 'content-md5',
- 'content-range',
- 'content-type',
- 'connection',
- 'date',
- 'expect',
- 'max-forwards',
- 'pragma',
- 'referer',
- 'te',
- 'user-agent',
- 'via'
-]
-
-var defaultProxyHeaderExclusiveList = [
- 'proxy-authorization'
-]
-
-function constructProxyHost(uriObject) {
- var port = uriObject.port
- , protocol = uriObject.protocol
- , proxyHost = uriObject.hostname + ':'
-
- if (port) {
- proxyHost += port
- } else if (protocol === 'https:') {
- proxyHost += '443'
- } else {
- proxyHost += '80'
- }
-
- return proxyHost
-}
-
-function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) {
- var whiteList = proxyHeaderWhiteList
- .reduce(function (set, header) {
- set[header.toLowerCase()] = true
- return set
- }, {})
-
- return Object.keys(headers)
- .filter(function (header) {
- return whiteList[header.toLowerCase()]
- })
- .reduce(function (set, header) {
- set[header] = headers[header]
- return set
- }, {})
-}
-
-function constructTunnelOptions (request, proxyHeaders) {
- var proxy = request.proxy
-
- var tunnelOptions = {
- proxy : {
- host : proxy.hostname,
- port : +proxy.port,
- proxyAuth : proxy.auth,
- headers : proxyHeaders
- },
- headers : request.headers,
- ca : request.ca,
- cert : request.cert,
- key : request.key,
- passphrase : request.passphrase,
- pfx : request.pfx,
- ciphers : request.ciphers,
- rejectUnauthorized : request.rejectUnauthorized,
- secureOptions : request.secureOptions,
- secureProtocol : request.secureProtocol
- }
-
- return tunnelOptions
-}
-
-function constructTunnelFnName(uri, proxy) {
- var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http')
- var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http')
- return [uriProtocol, proxyProtocol].join('Over')
-}
-
-function getTunnelFn(request) {
- var uri = request.uri
- var proxy = request.proxy
- var tunnelFnName = constructTunnelFnName(uri, proxy)
- return tunnel[tunnelFnName]
-}
-
-
-function Tunnel (request) {
- this.request = request
- this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList
- this.proxyHeaderExclusiveList = []
- if (typeof request.tunnel !== 'undefined') {
- this.tunnelOverride = request.tunnel
- }
-}
-
-Tunnel.prototype.isEnabled = function () {
- var self = this
- , request = self.request
- // Tunnel HTTPS by default. Allow the user to override this setting.
-
- // If self.tunnelOverride is set (the user specified a value), use it.
- if (typeof self.tunnelOverride !== 'undefined') {
- return self.tunnelOverride
- }
-
- // If the destination is HTTPS, tunnel.
- if (request.uri.protocol === 'https:') {
- return true
- }
-
- // Otherwise, do not use tunnel.
- return false
-}
-
-Tunnel.prototype.setup = function (options) {
- var self = this
- , request = self.request
-
- options = options || {}
-
- if (typeof request.proxy === 'string') {
- request.proxy = url.parse(request.proxy)
- }
-
- if (!request.proxy || !request.tunnel) {
- return false
- }
-
- // Setup Proxy Header Exclusive List and White List
- if (options.proxyHeaderWhiteList) {
- self.proxyHeaderWhiteList = options.proxyHeaderWhiteList
- }
- if (options.proxyHeaderExclusiveList) {
- self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList
- }
-
- var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList)
- var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList)
-
- // Setup Proxy Headers and Proxy Headers Host
- // Only send the Proxy White Listed Header names
- var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList)
- proxyHeaders.host = constructProxyHost(request.uri)
-
- proxyHeaderExclusiveList.forEach(request.removeHeader, request)
-
- // Set Agent from Tunnel Data
- var tunnelFn = getTunnelFn(request)
- var tunnelOptions = constructTunnelOptions(request, proxyHeaders)
- request.agent = tunnelFn(tunnelOptions)
-
- return true
-}
-
-Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList
-Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList
-exports.Tunnel = Tunnel
diff --git a/node_modules/node-gyp/node_modules/request/package.json b/node_modules/node-gyp/node_modules/request/package.json
deleted file mode 100644
index 29eb35bc2..000000000
--- a/node_modules/node-gyp/node_modules/request/package.json
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- "_from": "request@>=2.9.0 <2.82.0",
- "_id": "request@2.81.0",
- "_inBundle": false,
- "_integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
- "_location": "/node-gyp/request",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "request@>=2.9.0 <2.82.0",
- "name": "request",
- "escapedName": "request",
- "rawSpec": ">=2.9.0 <2.82.0",
- "saveSpec": null,
- "fetchSpec": ">=2.9.0 <2.82.0"
- },
- "_requiredBy": [
- "/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
- "_shasum": "c6928946a0e06c5f8d6f8a9333469ffda46298a0",
- "_spec": "request@>=2.9.0 <2.82.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/node-gyp",
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com"
- },
- "bugs": {
- "url": "http://github.com/request/request/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "aws-sign2": "~0.6.0",
- "aws4": "^1.2.1",
- "caseless": "~0.12.0",
- "combined-stream": "~1.0.5",
- "extend": "~3.0.0",
- "forever-agent": "~0.6.1",
- "form-data": "~2.1.1",
- "har-validator": "~4.2.1",
- "hawk": "~3.1.3",
- "http-signature": "~1.1.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.7",
- "oauth-sign": "~0.8.1",
- "performance-now": "^0.2.0",
- "qs": "~6.4.0",
- "safe-buffer": "^5.0.1",
- "stringstream": "~0.0.4",
- "tough-cookie": "~2.3.0",
- "tunnel-agent": "^0.6.0",
- "uuid": "^3.0.0"
- },
- "deprecated": false,
- "description": "Simplified HTTP request client.",
- "devDependencies": {
- "bluebird": "^3.2.1",
- "browserify": "^13.0.1",
- "browserify-istanbul": "^2.0.0",
- "buffer-equal": "^1.0.0",
- "codecov": "^1.0.1",
- "coveralls": "^2.11.4",
- "eslint": "^2.5.3",
- "function-bind": "^1.0.2",
- "istanbul": "^0.4.0",
- "karma": "^1.1.1",
- "karma-browserify": "^5.0.1",
- "karma-cli": "^1.0.0",
- "karma-coverage": "^1.0.0",
- "karma-phantomjs-launcher": "^1.0.0",
- "karma-tap": "^3.0.1",
- "phantomjs-prebuilt": "^2.1.3",
- "rimraf": "^2.2.8",
- "server-destroy": "^1.0.1",
- "tape": "^4.6.0",
- "taper": "^0.5.0"
- },
- "engines": {
- "node": ">= 4"
- },
- "files": [
- "lib/",
- "index.js",
- "request.js"
- ],
- "greenkeeper": {
- "ignore": [
- "eslint",
- "hawk",
- "har-validator"
- ]
- },
- "homepage": "https://github.com/request/request#readme",
- "keywords": [
- "http",
- "simple",
- "util",
- "utility"
- ],
- "license": "Apache-2.0",
- "main": "index.js",
- "name": "request",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/request/request.git"
- },
- "scripts": {
- "lint": "eslint lib/ *.js tests/ && echo Lint passed.",
- "test": "npm run lint && npm run test-ci && npm run test-browser",
- "test-browser": "node tests/browser/start.js",
- "test-ci": "taper tests/test-*.js",
- "test-cov": "istanbul cover tape tests/test-*.js"
- },
- "version": "2.81.0"
-}
diff --git a/node_modules/node-gyp/node_modules/request/request.js b/node_modules/node-gyp/node_modules/request/request.js
deleted file mode 100644
index 467524ba4..000000000
--- a/node_modules/node-gyp/node_modules/request/request.js
+++ /dev/null
@@ -1,1565 +0,0 @@
-'use strict'
-
-var http = require('http')
- , https = require('https')
- , url = require('url')
- , util = require('util')
- , stream = require('stream')
- , zlib = require('zlib')
- , hawk = require('hawk')
- , aws2 = require('aws-sign2')
- , aws4 = require('aws4')
- , httpSignature = require('http-signature')
- , mime = require('mime-types')
- , stringstream = require('stringstream')
- , caseless = require('caseless')
- , ForeverAgent = require('forever-agent')
- , FormData = require('form-data')
- , extend = require('extend')
- , isstream = require('isstream')
- , isTypedArray = require('is-typedarray').strict
- , helpers = require('./lib/helpers')
- , cookies = require('./lib/cookies')
- , getProxyFromURI = require('./lib/getProxyFromURI')
- , Querystring = require('./lib/querystring').Querystring
- , Har = require('./lib/har').Har
- , Auth = require('./lib/auth').Auth
- , OAuth = require('./lib/oauth').OAuth
- , Multipart = require('./lib/multipart').Multipart
- , Redirect = require('./lib/redirect').Redirect
- , Tunnel = require('./lib/tunnel').Tunnel
- , now = require('performance-now')
- , Buffer = require('safe-buffer').Buffer
-
-var safeStringify = helpers.safeStringify
- , isReadStream = helpers.isReadStream
- , toBase64 = helpers.toBase64
- , defer = helpers.defer
- , copy = helpers.copy
- , version = helpers.version
- , globalCookieJar = cookies.jar()
-
-
-var globalPool = {}
-
-function filterForNonReserved(reserved, options) {
- // Filter out properties that are not reserved.
- // Reserved values are passed in at call site.
-
- var object = {}
- for (var i in options) {
- var notReserved = (reserved.indexOf(i) === -1)
- if (notReserved) {
- object[i] = options[i]
- }
- }
- return object
-}
-
-function filterOutReservedFunctions(reserved, options) {
- // Filter out properties that are functions and are reserved.
- // Reserved values are passed in at call site.
-
- var object = {}
- for (var i in options) {
- var isReserved = !(reserved.indexOf(i) === -1)
- var isFunction = (typeof options[i] === 'function')
- if (!(isReserved && isFunction)) {
- object[i] = options[i]
- }
- }
- return object
-
-}
-
-// Return a simpler request object to allow serialization
-function requestToJSON() {
- var self = this
- return {
- uri: self.uri,
- method: self.method,
- headers: self.headers
- }
-}
-
-// Return a simpler response object to allow serialization
-function responseToJSON() {
- var self = this
- return {
- statusCode: self.statusCode,
- body: self.body,
- headers: self.headers,
- request: requestToJSON.call(self.request)
- }
-}
-
-function Request (options) {
- // if given the method property in options, set property explicitMethod to true
-
- // extend the Request instance with any non-reserved properties
- // remove any reserved functions from the options object
- // set Request instance to be readable and writable
- // call init
-
- var self = this
-
- // start with HAR, then override with additional options
- if (options.har) {
- self._har = new Har(self)
- options = self._har.options(options)
- }
-
- stream.Stream.call(self)
- var reserved = Object.keys(Request.prototype)
- var nonReserved = filterForNonReserved(reserved, options)
-
- extend(self, nonReserved)
- options = filterOutReservedFunctions(reserved, options)
-
- self.readable = true
- self.writable = true
- if (options.method) {
- self.explicitMethod = true
- }
- self._qs = new Querystring(self)
- self._auth = new Auth(self)
- self._oauth = new OAuth(self)
- self._multipart = new Multipart(self)
- self._redirect = new Redirect(self)
- self._tunnel = new Tunnel(self)
- self.init(options)
-}
-
-util.inherits(Request, stream.Stream)
-
-// Debugging
-Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG)
-function debug() {
- if (Request.debug) {
- console.error('REQUEST %s', util.format.apply(util, arguments))
- }
-}
-Request.prototype.debug = debug
-
-Request.prototype.init = function (options) {
- // init() contains all the code to setup the request object.
- // the actual outgoing request is not started until start() is called
- // this function is called from both the constructor and on redirect.
- var self = this
- if (!options) {
- options = {}
- }
- self.headers = self.headers ? copy(self.headers) : {}
-
- // Delete headers with value undefined since they break
- // ClientRequest.OutgoingMessage.setHeader in node 0.12
- for (var headerName in self.headers) {
- if (typeof self.headers[headerName] === 'undefined') {
- delete self.headers[headerName]
- }
- }
-
- caseless.httpify(self, self.headers)
-
- if (!self.method) {
- self.method = options.method || 'GET'
- }
- if (!self.localAddress) {
- self.localAddress = options.localAddress
- }
-
- self._qs.init(options)
-
- debug(options)
- if (!self.pool && self.pool !== false) {
- self.pool = globalPool
- }
- self.dests = self.dests || []
- self.__isRequestRequest = true
-
- // Protect against double callback
- if (!self._callback && self.callback) {
- self._callback = self.callback
- self.callback = function () {
- if (self._callbackCalled) {
- return // Print a warning maybe?
- }
- self._callbackCalled = true
- self._callback.apply(self, arguments)
- }
- self.on('error', self.callback.bind())
- self.on('complete', self.callback.bind(self, null))
- }
-
- // People use this property instead all the time, so support it
- if (!self.uri && self.url) {
- self.uri = self.url
- delete self.url
- }
-
- // If there's a baseUrl, then use it as the base URL (i.e. uri must be
- // specified as a relative path and is appended to baseUrl).
- if (self.baseUrl) {
- if (typeof self.baseUrl !== 'string') {
- return self.emit('error', new Error('options.baseUrl must be a string'))
- }
-
- if (typeof self.uri !== 'string') {
- return self.emit('error', new Error('options.uri must be a string when using options.baseUrl'))
- }
-
- if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) {
- return self.emit('error', new Error('options.uri must be a path when using options.baseUrl'))
- }
-
- // Handle all cases to make sure that there's only one slash between
- // baseUrl and uri.
- var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1
- var uriStartsWithSlash = self.uri.indexOf('/') === 0
-
- if (baseUrlEndsWithSlash && uriStartsWithSlash) {
- self.uri = self.baseUrl + self.uri.slice(1)
- } else if (baseUrlEndsWithSlash || uriStartsWithSlash) {
- self.uri = self.baseUrl + self.uri
- } else if (self.uri === '') {
- self.uri = self.baseUrl
- } else {
- self.uri = self.baseUrl + '/' + self.uri
- }
- delete self.baseUrl
- }
-
- // A URI is needed by this point, emit error if we haven't been able to get one
- if (!self.uri) {
- return self.emit('error', new Error('options.uri is a required argument'))
- }
-
- // If a string URI/URL was given, parse it into a URL object
- if (typeof self.uri === 'string') {
- self.uri = url.parse(self.uri)
- }
-
- // Some URL objects are not from a URL parsed string and need href added
- if (!self.uri.href) {
- self.uri.href = url.format(self.uri)
- }
-
- // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme
- if (self.uri.protocol === 'unix:') {
- return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`'))
- }
-
- // Support Unix Sockets
- if (self.uri.host === 'unix') {
- self.enableUnixSocket()
- }
-
- if (self.strictSSL === false) {
- self.rejectUnauthorized = false
- }
-
- if (!self.uri.pathname) {self.uri.pathname = '/'}
-
- if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) {
- // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar
- // Detect and reject it as soon as possible
- var faultyUri = url.format(self.uri)
- var message = 'Invalid URI "' + faultyUri + '"'
- if (Object.keys(options).length === 0) {
- // No option ? This can be the sign of a redirect
- // As this is a case where the user cannot do anything (they didn't call request directly with this URL)
- // they should be warned that it can be caused by a redirection (can save some hair)
- message += '. This can be caused by a crappy redirection.'
- }
- // This error was fatal
- self.abort()
- return self.emit('error', new Error(message))
- }
-
- if (!self.hasOwnProperty('proxy')) {
- self.proxy = getProxyFromURI(self.uri)
- }
-
- self.tunnel = self._tunnel.isEnabled()
- if (self.proxy) {
- self._tunnel.setup(options)
- }
-
- self._redirect.onRequest(options)
-
- self.setHost = false
- if (!self.hasHeader('host')) {
- var hostHeaderName = self.originalHostHeaderName || 'host'
- // When used with an IPv6 address, `host` will provide
- // the correct bracketed format, unlike using `hostname` and
- // optionally adding the `port` when necessary.
- self.setHeader(hostHeaderName, self.uri.host)
- self.setHost = true
- }
-
- self.jar(self._jar || options.jar)
-
- if (!self.uri.port) {
- if (self.uri.protocol === 'http:') {self.uri.port = 80}
- else if (self.uri.protocol === 'https:') {self.uri.port = 443}
- }
-
- if (self.proxy && !self.tunnel) {
- self.port = self.proxy.port
- self.host = self.proxy.hostname
- } else {
- self.port = self.uri.port
- self.host = self.uri.hostname
- }
-
- if (options.form) {
- self.form(options.form)
- }
-
- if (options.formData) {
- var formData = options.formData
- var requestForm = self.form()
- var appendFormValue = function (key, value) {
- if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
- requestForm.append(key, value.value, value.options)
- } else {
- requestForm.append(key, value)
- }
- }
- for (var formKey in formData) {
- if (formData.hasOwnProperty(formKey)) {
- var formValue = formData[formKey]
- if (formValue instanceof Array) {
- for (var j = 0; j < formValue.length; j++) {
- appendFormValue(formKey, formValue[j])
- }
- } else {
- appendFormValue(formKey, formValue)
- }
- }
- }
- }
-
- if (options.qs) {
- self.qs(options.qs)
- }
-
- if (self.uri.path) {
- self.path = self.uri.path
- } else {
- self.path = self.uri.pathname + (self.uri.search || '')
- }
-
- if (self.path.length === 0) {
- self.path = '/'
- }
-
- // Auth must happen last in case signing is dependent on other headers
- if (options.aws) {
- self.aws(options.aws)
- }
-
- if (options.hawk) {
- self.hawk(options.hawk)
- }
-
- if (options.httpSignature) {
- self.httpSignature(options.httpSignature)
- }
-
- if (options.auth) {
- if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) {
- options.auth.user = options.auth.username
- }
- if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) {
- options.auth.pass = options.auth.password
- }
-
- self.auth(
- options.auth.user,
- options.auth.pass,
- options.auth.sendImmediately,
- options.auth.bearer
- )
- }
-
- if (self.gzip && !self.hasHeader('accept-encoding')) {
- self.setHeader('accept-encoding', 'gzip, deflate')
- }
-
- if (self.uri.auth && !self.hasHeader('authorization')) {
- var uriAuthPieces = self.uri.auth.split(':').map(function(item) {return self._qs.unescape(item)})
- self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true)
- }
-
- if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) {
- var proxyAuthPieces = self.proxy.auth.split(':').map(function(item) {return self._qs.unescape(item)})
- var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':'))
- self.setHeader('proxy-authorization', authHeader)
- }
-
- if (self.proxy && !self.tunnel) {
- self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
- }
-
- if (options.json) {
- self.json(options.json)
- }
- if (options.multipart) {
- self.multipart(options.multipart)
- }
-
- if (options.time) {
- self.timing = true
-
- // NOTE: elapsedTime is deprecated in favor of .timings
- self.elapsedTime = self.elapsedTime || 0
- }
-
- function setContentLength () {
- if (isTypedArray(self.body)) {
- self.body = Buffer.from(self.body)
- }
-
- if (!self.hasHeader('content-length')) {
- var length
- if (typeof self.body === 'string') {
- length = Buffer.byteLength(self.body)
- }
- else if (Array.isArray(self.body)) {
- length = self.body.reduce(function (a, b) {return a + b.length}, 0)
- }
- else {
- length = self.body.length
- }
-
- if (length) {
- self.setHeader('content-length', length)
- } else {
- self.emit('error', new Error('Argument error, options.body.'))
- }
- }
- }
- if (self.body && !isstream(self.body)) {
- setContentLength()
- }
-
- if (options.oauth) {
- self.oauth(options.oauth)
- } else if (self._oauth.params && self.hasHeader('authorization')) {
- self.oauth(self._oauth.params)
- }
-
- var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
- , defaultModules = {'http:':http, 'https:':https}
- , httpModules = self.httpModules || {}
-
- self.httpModule = httpModules[protocol] || defaultModules[protocol]
-
- if (!self.httpModule) {
- return self.emit('error', new Error('Invalid protocol: ' + protocol))
- }
-
- if (options.ca) {
- self.ca = options.ca
- }
-
- if (!self.agent) {
- if (options.agentOptions) {
- self.agentOptions = options.agentOptions
- }
-
- if (options.agentClass) {
- self.agentClass = options.agentClass
- } else if (options.forever) {
- var v = version()
- // use ForeverAgent in node 0.10- only
- if (v.major === 0 && v.minor <= 10) {
- self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
- } else {
- self.agentClass = self.httpModule.Agent
- self.agentOptions = self.agentOptions || {}
- self.agentOptions.keepAlive = true
- }
- } else {
- self.agentClass = self.httpModule.Agent
- }
- }
-
- if (self.pool === false) {
- self.agent = false
- } else {
- self.agent = self.agent || self.getNewAgent()
- }
-
- self.on('pipe', function (src) {
- if (self.ntick && self._started) {
- self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.'))
- }
- self.src = src
- if (isReadStream(src)) {
- if (!self.hasHeader('content-type')) {
- self.setHeader('content-type', mime.lookup(src.path))
- }
- } else {
- if (src.headers) {
- for (var i in src.headers) {
- if (!self.hasHeader(i)) {
- self.setHeader(i, src.headers[i])
- }
- }
- }
- if (self._json && !self.hasHeader('content-type')) {
- self.setHeader('content-type', 'application/json')
- }
- if (src.method && !self.explicitMethod) {
- self.method = src.method
- }
- }
-
- // self.on('pipe', function () {
- // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.')
- // })
- })
-
- defer(function () {
- if (self._aborted) {
- return
- }
-
- var end = function () {
- if (self._form) {
- if (!self._auth.hasAuth) {
- self._form.pipe(self)
- }
- else if (self._auth.hasAuth && self._auth.sentAuth) {
- self._form.pipe(self)
- }
- }
- if (self._multipart && self._multipart.chunked) {
- self._multipart.body.pipe(self)
- }
- if (self.body) {
- if (isstream(self.body)) {
- self.body.pipe(self)
- } else {
- setContentLength()
- if (Array.isArray(self.body)) {
- self.body.forEach(function (part) {
- self.write(part)
- })
- } else {
- self.write(self.body)
- }
- self.end()
- }
- } else if (self.requestBodyStream) {
- console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.')
- self.requestBodyStream.pipe(self)
- } else if (!self.src) {
- if (self._auth.hasAuth && !self._auth.sentAuth) {
- self.end()
- return
- }
- if (self.method !== 'GET' && typeof self.method !== 'undefined') {
- self.setHeader('content-length', 0)
- }
- self.end()
- }
- }
-
- if (self._form && !self.hasHeader('content-length')) {
- // Before ending the request, we had to compute the length of the whole form, asyncly
- self.setHeader(self._form.getHeaders(), true)
- self._form.getLength(function (err, length) {
- if (!err && !isNaN(length)) {
- self.setHeader('content-length', length)
- }
- end()
- })
- } else {
- end()
- }
-
- self.ntick = true
- })
-
-}
-
-Request.prototype.getNewAgent = function () {
- var self = this
- var Agent = self.agentClass
- var options = {}
- if (self.agentOptions) {
- for (var i in self.agentOptions) {
- options[i] = self.agentOptions[i]
- }
- }
- if (self.ca) {
- options.ca = self.ca
- }
- if (self.ciphers) {
- options.ciphers = self.ciphers
- }
- if (self.secureProtocol) {
- options.secureProtocol = self.secureProtocol
- }
- if (self.secureOptions) {
- options.secureOptions = self.secureOptions
- }
- if (typeof self.rejectUnauthorized !== 'undefined') {
- options.rejectUnauthorized = self.rejectUnauthorized
- }
-
- if (self.cert && self.key) {
- options.key = self.key
- options.cert = self.cert
- }
-
- if (self.pfx) {
- options.pfx = self.pfx
- }
-
- if (self.passphrase) {
- options.passphrase = self.passphrase
- }
-
- var poolKey = ''
-
- // different types of agents are in different pools
- if (Agent !== self.httpModule.Agent) {
- poolKey += Agent.name
- }
-
- // ca option is only relevant if proxy or destination are https
- var proxy = self.proxy
- if (typeof proxy === 'string') {
- proxy = url.parse(proxy)
- }
- var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
-
- if (isHttps) {
- if (options.ca) {
- if (poolKey) {
- poolKey += ':'
- }
- poolKey += options.ca
- }
-
- if (typeof options.rejectUnauthorized !== 'undefined') {
- if (poolKey) {
- poolKey += ':'
- }
- poolKey += options.rejectUnauthorized
- }
-
- if (options.cert) {
- if (poolKey) {
- poolKey += ':'
- }
- poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
- }
-
- if (options.pfx) {
- if (poolKey) {
- poolKey += ':'
- }
- poolKey += options.pfx.toString('ascii')
- }
-
- if (options.ciphers) {
- if (poolKey) {
- poolKey += ':'
- }
- poolKey += options.ciphers
- }
-
- if (options.secureProtocol) {
- if (poolKey) {
- poolKey += ':'
- }
- poolKey += options.secureProtocol
- }
-
- if (options.secureOptions) {
- if (poolKey) {
- poolKey += ':'
- }
- poolKey += options.secureOptions
- }
- }
-
- if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) {
- // not doing anything special. Use the globalAgent
- return self.httpModule.globalAgent
- }
-
- // we're using a stored agent. Make sure it's protocol-specific
- poolKey = self.uri.protocol + poolKey
-
- // generate a new agent for this setting if none yet exists
- if (!self.pool[poolKey]) {
- self.pool[poolKey] = new Agent(options)
- // properly set maxSockets on new agents
- if (self.pool.maxSockets) {
- self.pool[poolKey].maxSockets = self.pool.maxSockets
- }
- }
-
- return self.pool[poolKey]
-}
-
-Request.prototype.start = function () {
- // start() is called once we are ready to send the outgoing HTTP request.
- // this is usually called on the first write(), end() or on nextTick()
- var self = this
-
- if (self.timing) {
- // All timings will be relative to this request's startTime. In order to do this,
- // we need to capture the wall-clock start time (via Date), immediately followed
- // by the high-resolution timer (via now()). While these two won't be set
- // at the _exact_ same time, they should be close enough to be able to calculate
- // high-resolution, monotonically non-decreasing timestamps relative to startTime.
- var startTime = new Date().getTime()
- var startTimeNow = now()
- }
-
- if (self._aborted) {
- return
- }
-
- self._started = true
- self.method = self.method || 'GET'
- self.href = self.uri.href
-
- if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) {
- self.setHeader('content-length', self.src.stat.size)
- }
- if (self._aws) {
- self.aws(self._aws, true)
- }
-
- // We have a method named auth, which is completely different from the http.request
- // auth option. If we don't remove it, we're gonna have a bad time.
- var reqOptions = copy(self)
- delete reqOptions.auth
-
- debug('make request', self.uri.href)
-
- // node v6.8.0 now supports a `timeout` value in `http.request()`, but we
- // should delete it for now since we handle timeouts manually for better
- // consistency with node versions before v6.8.0
- delete reqOptions.timeout
-
- try {
- self.req = self.httpModule.request(reqOptions)
- } catch (err) {
- self.emit('error', err)
- return
- }
-
- if (self.timing) {
- self.startTime = startTime
- self.startTimeNow = startTimeNow
-
- // Timing values will all be relative to startTime (by comparing to startTimeNow
- // so we have an accurate clock)
- self.timings = {}
- }
-
- var timeout
- if (self.timeout && !self.timeoutTimer) {
- if (self.timeout < 0) {
- timeout = 0
- } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) {
- timeout = self.timeout
- }
- }
-
- self.req.on('response', self.onRequestResponse.bind(self))
- self.req.on('error', self.onRequestError.bind(self))
- self.req.on('drain', function() {
- self.emit('drain')
- })
- self.req.on('socket', function(socket) {
- // `._connecting` was the old property which was made public in node v6.1.0
- var isConnecting = socket._connecting || socket.connecting
- if (self.timing) {
- self.timings.socket = now() - self.startTimeNow
-
- if (isConnecting) {
- var onLookupTiming = function() {
- self.timings.lookup = now() - self.startTimeNow
- }
-
- var onConnectTiming = function() {
- self.timings.connect = now() - self.startTimeNow
- }
-
- socket.once('lookup', onLookupTiming)
- socket.once('connect', onConnectTiming)
-
- // clean up timing event listeners if needed on error
- self.req.once('error', function() {
- socket.removeListener('lookup', onLookupTiming)
- socket.removeListener('connect', onConnectTiming)
- })
- }
- }
-
- var setReqTimeout = function() {
- // This timeout sets the amount of time to wait *between* bytes sent
- // from the server once connected.
- //
- // In particular, it's useful for erroring if the server fails to send
- // data halfway through streaming a response.
- self.req.setTimeout(timeout, function () {
- if (self.req) {
- self.abort()
- var e = new Error('ESOCKETTIMEDOUT')
- e.code = 'ESOCKETTIMEDOUT'
- e.connect = false
- self.emit('error', e)
- }
- })
- }
- if (timeout !== undefined) {
- // Only start the connection timer if we're actually connecting a new
- // socket, otherwise if we're already connected (because this is a
- // keep-alive connection) do not bother. This is important since we won't
- // get a 'connect' event for an already connected socket.
- if (isConnecting) {
- var onReqSockConnect = function() {
- socket.removeListener('connect', onReqSockConnect)
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- setReqTimeout()
- }
-
- socket.on('connect', onReqSockConnect)
-
- self.req.on('error', function(err) {
- socket.removeListener('connect', onReqSockConnect)
- })
-
- // Set a timeout in memory - this block will throw if the server takes more
- // than `timeout` to write the HTTP status and headers (corresponding to
- // the on('response') event on the client). NB: this measures wall-clock
- // time, not the time between bytes sent by the server.
- self.timeoutTimer = setTimeout(function () {
- socket.removeListener('connect', onReqSockConnect)
- self.abort()
- var e = new Error('ETIMEDOUT')
- e.code = 'ETIMEDOUT'
- e.connect = true
- self.emit('error', e)
- }, timeout)
- } else {
- // We're already connected
- setReqTimeout()
- }
- }
- self.emit('socket', socket)
- })
-
- self.emit('request', self.req)
-}
-
-Request.prototype.onRequestError = function (error) {
- var self = this
- if (self._aborted) {
- return
- }
- if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET'
- && self.agent.addRequestNoreuse) {
- self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
- self.start()
- self.req.end()
- return
- }
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- }
- self.emit('error', error)
-}
-
-Request.prototype.onRequestResponse = function (response) {
- var self = this
-
- if (self.timing) {
- self.timings.response = now() - self.startTimeNow
- }
-
- debug('onRequestResponse', self.uri.href, response.statusCode, response.headers)
- response.on('end', function() {
- if (self.timing) {
- self.timings.end = now() - self.startTimeNow
- response.timingStart = self.startTime
-
- // fill in the blanks for any periods that didn't trigger, such as
- // no lookup or connect due to keep alive
- if (!self.timings.socket) {
- self.timings.socket = 0
- }
- if (!self.timings.lookup) {
- self.timings.lookup = self.timings.socket
- }
- if (!self.timings.connect) {
- self.timings.connect = self.timings.lookup
- }
- if (!self.timings.response) {
- self.timings.response = self.timings.connect
- }
-
- debug('elapsed time', self.timings.end)
-
- // elapsedTime includes all redirects
- self.elapsedTime += Math.round(self.timings.end)
-
- // NOTE: elapsedTime is deprecated in favor of .timings
- response.elapsedTime = self.elapsedTime
-
- // timings is just for the final fetch
- response.timings = self.timings
-
- // pre-calculate phase timings as well
- response.timingPhases = {
- wait: self.timings.socket,
- dns: self.timings.lookup - self.timings.socket,
- tcp: self.timings.connect - self.timings.lookup,
- firstByte: self.timings.response - self.timings.connect,
- download: self.timings.end - self.timings.response,
- total: self.timings.end
- }
- }
- debug('response end', self.uri.href, response.statusCode, response.headers)
- })
-
- if (self._aborted) {
- debug('aborted', self.uri.href)
- response.resume()
- return
- }
-
- self.response = response
- response.request = self
- response.toJSON = responseToJSON
-
- // XXX This is different on 0.10, because SSL is strict by default
- if (self.httpModule === https &&
- self.strictSSL && (!response.hasOwnProperty('socket') ||
- !response.socket.authorized)) {
- debug('strict ssl error', self.uri.href)
- var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL'
- self.emit('error', new Error('SSL Error: ' + sslErr))
- return
- }
-
- // Save the original host before any redirect (if it changes, we need to
- // remove any authorization headers). Also remember the case of the header
- // name because lots of broken servers expect Host instead of host and we
- // want the caller to be able to specify this.
- self.originalHost = self.getHeader('host')
- if (!self.originalHostHeaderName) {
- self.originalHostHeaderName = self.hasHeader('host')
- }
- if (self.setHost) {
- self.removeHeader('host')
- }
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- }
-
- var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar
- var addCookie = function (cookie) {
- //set the cookie if it's domain in the href's domain.
- try {
- targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true})
- } catch (e) {
- self.emit('error', e)
- }
- }
-
- response.caseless = caseless(response.headers)
-
- if (response.caseless.has('set-cookie') && (!self._disableCookies)) {
- var headerName = response.caseless.has('set-cookie')
- if (Array.isArray(response.headers[headerName])) {
- response.headers[headerName].forEach(addCookie)
- } else {
- addCookie(response.headers[headerName])
- }
- }
-
- if (self._redirect.onResponse(response)) {
- return // Ignore the rest of the response
- } else {
- // Be a good stream and emit end when the response is finished.
- // Hack to emit end on close because of a core bug that never fires end
- response.on('close', function () {
- if (!self._ended) {
- self.response.emit('end')
- }
- })
-
- response.once('end', function () {
- self._ended = true
- })
-
- var noBody = function (code) {
- return (
- self.method === 'HEAD'
- // Informational
- || (code >= 100 && code < 200)
- // No Content
- || code === 204
- // Not Modified
- || code === 304
- )
- }
-
- var responseContent
- if (self.gzip && !noBody(response.statusCode)) {
- var contentEncoding = response.headers['content-encoding'] || 'identity'
- contentEncoding = contentEncoding.trim().toLowerCase()
-
- // Be more lenient with decoding compressed responses, since (very rarely)
- // servers send slightly invalid gzip responses that are still accepted
- // by common browsers.
- // Always using Z_SYNC_FLUSH is what cURL does.
- var zlibOptions = {
- flush: zlib.Z_SYNC_FLUSH
- , finishFlush: zlib.Z_SYNC_FLUSH
- }
-
- if (contentEncoding === 'gzip') {
- responseContent = zlib.createGunzip(zlibOptions)
- response.pipe(responseContent)
- } else if (contentEncoding === 'deflate') {
- responseContent = zlib.createInflate(zlibOptions)
- response.pipe(responseContent)
- } else {
- // Since previous versions didn't check for Content-Encoding header,
- // ignore any invalid values to preserve backwards-compatibility
- if (contentEncoding !== 'identity') {
- debug('ignoring unrecognized Content-Encoding ' + contentEncoding)
- }
- responseContent = response
- }
- } else {
- responseContent = response
- }
-
- if (self.encoding) {
- if (self.dests.length !== 0) {
- console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.')
- } else if (responseContent.setEncoding) {
- responseContent.setEncoding(self.encoding)
- } else {
- // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with
- // zlib streams.
- // If/When support for 0.9.4 is dropped, this should be unnecessary.
- responseContent = responseContent.pipe(stringstream(self.encoding))
- }
- }
-
- if (self._paused) {
- responseContent.pause()
- }
-
- self.responseContent = responseContent
-
- self.emit('response', response)
-
- self.dests.forEach(function (dest) {
- self.pipeDest(dest)
- })
-
- responseContent.on('data', function (chunk) {
- if (self.timing && !self.responseStarted) {
- self.responseStartTime = (new Date()).getTime()
-
- // NOTE: responseStartTime is deprecated in favor of .timings
- response.responseStartTime = self.responseStartTime
- }
- self._destdata = true
- self.emit('data', chunk)
- })
- responseContent.once('end', function (chunk) {
- self.emit('end', chunk)
- })
- responseContent.on('error', function (error) {
- self.emit('error', error)
- })
- responseContent.on('close', function () {self.emit('close')})
-
- if (self.callback) {
- self.readResponseBody(response)
- }
- //if no callback
- else {
- self.on('end', function () {
- if (self._aborted) {
- debug('aborted', self.uri.href)
- return
- }
- self.emit('complete', response)
- })
- }
- }
- debug('finish init function', self.uri.href)
-}
-
-Request.prototype.readResponseBody = function (response) {
- var self = this
- debug('reading response\'s body')
- var buffers = []
- , bufferLength = 0
- , strings = []
-
- self.on('data', function (chunk) {
- if (!Buffer.isBuffer(chunk)) {
- strings.push(chunk)
- } else if (chunk.length) {
- bufferLength += chunk.length
- buffers.push(chunk)
- }
- })
- self.on('end', function () {
- debug('end event', self.uri.href)
- if (self._aborted) {
- debug('aborted', self.uri.href)
- // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request.
- // This can lead to leaky behavior if the user retains a reference to the request object.
- buffers = []
- bufferLength = 0
- return
- }
-
- if (bufferLength) {
- debug('has body', self.uri.href, bufferLength)
- response.body = Buffer.concat(buffers, bufferLength)
- if (self.encoding !== null) {
- response.body = response.body.toString(self.encoding)
- }
- // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request.
- // This can lead to leaky behavior if the user retains a reference to the request object.
- buffers = []
- bufferLength = 0
- } else if (strings.length) {
- // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
- // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
- if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') {
- strings[0] = strings[0].substring(1)
- }
- response.body = strings.join('')
- }
-
- if (self._json) {
- try {
- response.body = JSON.parse(response.body, self._jsonReviver)
- } catch (e) {
- debug('invalid JSON received', self.uri.href)
- }
- }
- debug('emitting complete', self.uri.href)
- if (typeof response.body === 'undefined' && !self._json) {
- response.body = self.encoding === null ? Buffer.alloc(0) : ''
- }
- self.emit('complete', response, response.body)
- })
-}
-
-Request.prototype.abort = function () {
- var self = this
- self._aborted = true
-
- if (self.req) {
- self.req.abort()
- }
- else if (self.response) {
- self.response.destroy()
- }
-
- self.emit('abort')
-}
-
-Request.prototype.pipeDest = function (dest) {
- var self = this
- var response = self.response
- // Called after the response is received
- if (dest.headers && !dest.headersSent) {
- if (response.caseless.has('content-type')) {
- var ctname = response.caseless.has('content-type')
- if (dest.setHeader) {
- dest.setHeader(ctname, response.headers[ctname])
- }
- else {
- dest.headers[ctname] = response.headers[ctname]
- }
- }
-
- if (response.caseless.has('content-length')) {
- var clname = response.caseless.has('content-length')
- if (dest.setHeader) {
- dest.setHeader(clname, response.headers[clname])
- } else {
- dest.headers[clname] = response.headers[clname]
- }
- }
- }
- if (dest.setHeader && !dest.headersSent) {
- for (var i in response.headers) {
- // If the response content is being decoded, the Content-Encoding header
- // of the response doesn't represent the piped content, so don't pass it.
- if (!self.gzip || i !== 'content-encoding') {
- dest.setHeader(i, response.headers[i])
- }
- }
- dest.statusCode = response.statusCode
- }
- if (self.pipefilter) {
- self.pipefilter(response, dest)
- }
-}
-
-Request.prototype.qs = function (q, clobber) {
- var self = this
- var base
- if (!clobber && self.uri.query) {
- base = self._qs.parse(self.uri.query)
- } else {
- base = {}
- }
-
- for (var i in q) {
- base[i] = q[i]
- }
-
- var qs = self._qs.stringify(base)
-
- if (qs === '') {
- return self
- }
-
- self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs)
- self.url = self.uri
- self.path = self.uri.path
-
- if (self.uri.host === 'unix') {
- self.enableUnixSocket()
- }
-
- return self
-}
-Request.prototype.form = function (form) {
- var self = this
- if (form) {
- if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
- self.setHeader('content-type', 'application/x-www-form-urlencoded')
- }
- self.body = (typeof form === 'string')
- ? self._qs.rfc3986(form.toString('utf8'))
- : self._qs.stringify(form).toString('utf8')
- return self
- }
- // create form-data object
- self._form = new FormData()
- self._form.on('error', function(err) {
- err.message = 'form-data: ' + err.message
- self.emit('error', err)
- self.abort()
- })
- return self._form
-}
-Request.prototype.multipart = function (multipart) {
- var self = this
-
- self._multipart.onRequest(multipart)
-
- if (!self._multipart.chunked) {
- self.body = self._multipart.body
- }
-
- return self
-}
-Request.prototype.json = function (val) {
- var self = this
-
- if (!self.hasHeader('accept')) {
- self.setHeader('accept', 'application/json')
- }
-
- if (typeof self.jsonReplacer === 'function') {
- self._jsonReplacer = self.jsonReplacer
- }
-
- self._json = true
- if (typeof val === 'boolean') {
- if (self.body !== undefined) {
- if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
- self.body = safeStringify(self.body, self._jsonReplacer)
- } else {
- self.body = self._qs.rfc3986(self.body)
- }
- if (!self.hasHeader('content-type')) {
- self.setHeader('content-type', 'application/json')
- }
- }
- } else {
- self.body = safeStringify(val, self._jsonReplacer)
- if (!self.hasHeader('content-type')) {
- self.setHeader('content-type', 'application/json')
- }
- }
-
- if (typeof self.jsonReviver === 'function') {
- self._jsonReviver = self.jsonReviver
- }
-
- return self
-}
-Request.prototype.getHeader = function (name, headers) {
- var self = this
- var result, re, match
- if (!headers) {
- headers = self.headers
- }
- Object.keys(headers).forEach(function (key) {
- if (key.length !== name.length) {
- return
- }
- re = new RegExp(name, 'i')
- match = key.match(re)
- if (match) {
- result = headers[key]
- }
- })
- return result
-}
-Request.prototype.enableUnixSocket = function () {
- // Get the socket & request paths from the URL
- var unixParts = this.uri.path.split(':')
- , host = unixParts[0]
- , path = unixParts[1]
- // Apply unix properties to request
- this.socketPath = host
- this.uri.pathname = path
- this.uri.path = path
- this.uri.host = host
- this.uri.hostname = host
- this.uri.isUnix = true
-}
-
-
-Request.prototype.auth = function (user, pass, sendImmediately, bearer) {
- var self = this
-
- self._auth.onRequest(user, pass, sendImmediately, bearer)
-
- return self
-}
-Request.prototype.aws = function (opts, now) {
- var self = this
-
- if (!now) {
- self._aws = opts
- return self
- }
-
- if (opts.sign_version == 4 || opts.sign_version == '4') {
- // use aws4
- var options = {
- host: self.uri.host,
- path: self.uri.path,
- method: self.method,
- headers: {
- 'content-type': self.getHeader('content-type') || ''
- },
- body: self.body
- }
- var signRes = aws4.sign(options, {
- accessKeyId: opts.key,
- secretAccessKey: opts.secret,
- sessionToken: opts.session
- })
- self.setHeader('authorization', signRes.headers.Authorization)
- self.setHeader('x-amz-date', signRes.headers['X-Amz-Date'])
- if (signRes.headers['X-Amz-Security-Token']) {
- self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token'])
- }
- }
- else {
- // default: use aws-sign2
- var date = new Date()
- self.setHeader('date', date.toUTCString())
- var auth =
- { key: opts.key
- , secret: opts.secret
- , verb: self.method.toUpperCase()
- , date: date
- , contentType: self.getHeader('content-type') || ''
- , md5: self.getHeader('content-md5') || ''
- , amazonHeaders: aws2.canonicalizeHeaders(self.headers)
- }
- var path = self.uri.path
- if (opts.bucket && path) {
- auth.resource = '/' + opts.bucket + path
- } else if (opts.bucket && !path) {
- auth.resource = '/' + opts.bucket
- } else if (!opts.bucket && path) {
- auth.resource = path
- } else if (!opts.bucket && !path) {
- auth.resource = '/'
- }
- auth.resource = aws2.canonicalizeResource(auth.resource)
- self.setHeader('authorization', aws2.authorization(auth))
- }
-
- return self
-}
-Request.prototype.httpSignature = function (opts) {
- var self = this
- httpSignature.signRequest({
- getHeader: function(header) {
- return self.getHeader(header, self.headers)
- },
- setHeader: function(header, value) {
- self.setHeader(header, value)
- },
- method: self.method,
- path: self.path
- }, opts)
- debug('httpSignature authorization', self.getHeader('authorization'))
-
- return self
-}
-Request.prototype.hawk = function (opts) {
- var self = this
- self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field)
-}
-Request.prototype.oauth = function (_oauth) {
- var self = this
-
- self._oauth.onRequest(_oauth)
-
- return self
-}
-
-Request.prototype.jar = function (jar) {
- var self = this
- var cookies
-
- if (self._redirect.redirectsFollowed === 0) {
- self.originalCookieHeader = self.getHeader('cookie')
- }
-
- if (!jar) {
- // disable cookies
- cookies = false
- self._disableCookies = true
- } else {
- var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar
- var urihref = self.uri.href
- //fetch cookie in the Specified host
- if (targetCookieJar) {
- cookies = targetCookieJar.getCookieString(urihref)
- }
- }
-
- //if need cookie and cookie is not empty
- if (cookies && cookies.length) {
- if (self.originalCookieHeader) {
- // Don't overwrite existing Cookie header
- self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies)
- } else {
- self.setHeader('cookie', cookies)
- }
- }
- self._jar = jar
- return self
-}
-
-
-// Stream API
-Request.prototype.pipe = function (dest, opts) {
- var self = this
-
- if (self.response) {
- if (self._destdata) {
- self.emit('error', new Error('You cannot pipe after data has been emitted from the response.'))
- } else if (self._ended) {
- self.emit('error', new Error('You cannot pipe after the response has been ended.'))
- } else {
- stream.Stream.prototype.pipe.call(self, dest, opts)
- self.pipeDest(dest)
- return dest
- }
- } else {
- self.dests.push(dest)
- stream.Stream.prototype.pipe.call(self, dest, opts)
- return dest
- }
-}
-Request.prototype.write = function () {
- var self = this
- if (self._aborted) {return}
-
- if (!self._started) {
- self.start()
- }
- if (self.req) {
- return self.req.write.apply(self.req, arguments)
- }
-}
-Request.prototype.end = function (chunk) {
- var self = this
- if (self._aborted) {return}
-
- if (chunk) {
- self.write(chunk)
- }
- if (!self._started) {
- self.start()
- }
- if (self.req) {
- self.req.end()
- }
-}
-Request.prototype.pause = function () {
- var self = this
- if (!self.responseContent) {
- self._paused = true
- } else {
- self.responseContent.pause.apply(self.responseContent, arguments)
- }
-}
-Request.prototype.resume = function () {
- var self = this
- if (!self.responseContent) {
- self._paused = false
- } else {
- self.responseContent.resume.apply(self.responseContent, arguments)
- }
-}
-Request.prototype.destroy = function () {
- var self = this
- if (!self._ended) {
- self.end()
- } else if (self.response) {
- self.response.destroy()
- }
-}
-
-Request.defaultProxyHeaderWhiteList =
- Tunnel.defaultProxyHeaderWhiteList.slice()
-
-Request.defaultProxyHeaderExclusiveList =
- Tunnel.defaultProxyHeaderExclusiveList.slice()
-
-// Exports
-
-Request.prototype.toJSON = requestToJSON
-module.exports = Request
diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json
index 58e9f882f..ba6913209 100644
--- a/node_modules/node-gyp/package.json
+++ b/node_modules/node-gyp/package.json
@@ -1,8 +1,8 @@
{
"_from": "node-gyp@latest",
- "_id": "node-gyp@3.7.0",
+ "_id": "node-gyp@3.8.0",
"_inBundle": false,
- "_integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==",
+ "_integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
"_location": "/node-gyp",
"_phantomChildren": {
"abbrev": "1.1.1",
@@ -25,8 +25,8 @@
"/",
"/npm-lifecycle"
],
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz",
- "_shasum": "789478e8f6c45e277aa014f3e28f958f286f9203",
+ "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
+ "_shasum": "540304261c330e80d0d5edce253a68cb3964218c",
"_spec": "node-gyp@latest",
"_where": "/Users/zkat/Documents/code/work/npm",
"author": {
@@ -49,7 +49,7 @@
"nopt": "2 || 3",
"npmlog": "0 || 1 || 2 || 3 || 4",
"osenv": "0",
- "request": ">=2.9.0 <2.82.0",
+ "request": "^2.87.0",
"rimraf": "2",
"semver": "~5.3.0",
"tar": "^2.0.0",
@@ -88,5 +88,5 @@
"scripts": {
"test": "tape test/test-*"
},
- "version": "3.7.0"
+ "version": "3.8.0"
}
diff --git a/node_modules/node-gyp/test/process-exec-sync.js b/node_modules/node-gyp/test/process-exec-sync.js
new file mode 100644
index 000000000..859cbc1f6
--- /dev/null
+++ b/node_modules/node-gyp/test/process-exec-sync.js
@@ -0,0 +1,138 @@
+'use strict'
+
+var fs = require('graceful-fs')
+var child_process = require('child_process')
+
+if (!String.prototype.startsWith) {
+ String.prototype.startsWith = function(search, pos) {
+ return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search
+ }
+}
+
+function processExecSync(file, args, options) {
+ var child, error, timeout, tmpdir, command, quote
+ command = makeCommand(file, args)
+
+ /*
+ this function emulates child_process.execSync for legacy node <= 0.10.x
+ derived from https://github.com/gvarsanyi/sync-exec/blob/master/js/sync-exec.js
+ */
+
+ options = options || {}
+ // init timeout
+ timeout = Date.now() + options.timeout
+ // init tmpdir
+ var os_temp_base = '/tmp'
+ var os = determine_os()
+ os_temp_base = '/tmp'
+
+ if (process.env.TMP) {
+ os_temp_base = process.env.TMP
+ }
+
+ if (os_temp_base[os_temp_base.length - 1] !== '/') {
+ os_temp_base += '/'
+ }
+
+ tmpdir = os_temp_base + 'processExecSync.' + Date.now() + Math.random()
+ fs.mkdirSync(tmpdir)
+
+ // init command
+ if (os === 'linux') {
+ command = '(' + command + ' > ' + tmpdir + '/stdout 2> ' + tmpdir +
+ '/stderr); echo $? > ' + tmpdir + '/status'
+ } else {
+ command = '(' + command + ' > ' + tmpdir + '/stdout 2> ' + tmpdir +
+ '/stderr) | echo %errorlevel% > ' + tmpdir + '/status | exit'
+ }
+
+ // init child
+ child = child_process.exec(command, options)
+
+ var maxTry = 100000 // increases the test time by 6 seconds on win-2016-node-0.10
+ var tryCount = 0
+ while (tryCount < maxTry) {
+ try {
+ var x = fs.readFileSync(tmpdir + '/status')
+ if (x.toString() === '0') {
+ break
+ }
+ } catch (ignore) {}
+ tryCount++
+ if (Date.now() > timeout) {
+ error = child
+ break
+ }
+ }
+
+ ['stdout', 'stderr', 'status'].forEach(function (file) {
+ child[file] = fs.readFileSync(tmpdir + '/' + file, options.encoding)
+ setTimeout(unlinkFile, 500, tmpdir + '/' + file)
+ })
+
+ child.status = Number(child.status)
+ if (child.status !== 0) {
+ error = child
+ }
+
+ try {
+ fs.rmdirSync(tmpdir)
+ } catch (ignore) {}
+ if (error) {
+ throw error
+ }
+ return child.stdout
+}
+
+function makeCommand(file, args) {
+ var command, quote
+ command = file
+ if (args.length > 0) {
+ for(var i in args) {
+ command = command + ' '
+ if (args[i][0] === '-') {
+ command = command + args[i]
+ } else {
+ if (!quote) {
+ command = command + '\"'
+ quote = true
+ }
+ command = command + args[i]
+ if (quote) {
+ if (args.length === (parseInt(i) + 1)) {
+ command = command + '\"'
+ }
+ }
+ }
+ }
+ }
+ return command
+}
+
+function determine_os() {
+ var os = ''
+ var tmpVar = ''
+ if (process.env.OSTYPE) {
+ tmpVar = process.env.OSTYPE
+ } else if (process.env.OS) {
+ tmpVar = process.env.OS
+ } else {
+ //default is linux
+ tmpVar = 'linux'
+ }
+
+ if (tmpVar.startsWith('linux')) {
+ os = 'linux'
+ }
+ if (tmpVar.startsWith('win')) {
+ os = 'win'
+ }
+
+ return os
+}
+
+function unlinkFile(file) {
+ fs.unlinkSync(file)
+}
+
+module.exports = processExecSync
diff --git a/node_modules/node-gyp/test/test-addon.js b/node_modules/node-gyp/test/test-addon.js
index 7ace1caf6..89350effc 100644
--- a/node_modules/node-gyp/test/test-addon.js
+++ b/node_modules/node-gyp/test/test-addon.js
@@ -6,12 +6,12 @@ var fs = require('graceful-fs')
var child_process = require('child_process')
var addonPath = path.resolve(__dirname, 'node_modules', 'hello_world')
var nodeGyp = path.resolve(__dirname, '..', 'bin', 'node-gyp.js')
-var execFileSync = child_process.execFileSync
+var execFileSync = child_process.execFileSync || require('./process-exec-sync')
var execFile = child_process.execFile
function runHello() {
var testCode = "console.log(require('hello_world').hello())"
- return execFileSync('node', ['-e', testCode], { cwd: __dirname }).toString()
+ return execFileSync(process.execPath, ['-e', testCode], { cwd: __dirname }).toString()
}
function getEncoding() {
diff --git a/node_modules/node-gyp/test/test-find-python.js b/node_modules/node-gyp/test/test-find-python.js
index 2d9f171c5..570eb180d 100644
--- a/node_modules/node-gyp/test/test-find-python.js
+++ b/node_modules/node-gyp/test/test-find-python.js
@@ -62,7 +62,7 @@ test('find python - python', function (t) {
}
f.execFile = function(program, args, opts, cb) {
t.strictEqual(program, 'python')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '2.7.0')
}
f.checkPython()
@@ -83,7 +83,7 @@ test('find python - python too old', function (t) {
}
f.execFile = function(program, args, opts, cb) {
t.strictEqual(program, 'python')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '2.3.4')
}
f.checkPython()
@@ -103,7 +103,7 @@ test('find python - python too new', function (t) {
}
f.execFile = function(program, args, opts, cb) {
t.strictEqual(program, 'python')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '3.0.0')
}
f.checkPython()
@@ -142,7 +142,7 @@ test('find python - no python2', function (t) {
}
f.execFile = function(program, args, opts, cb) {
t.strictEqual(program, 'python')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '2.7.0')
}
f.checkPython()
@@ -189,7 +189,7 @@ test('find python - no python, use python launcher', function (t) {
f.execFile = function(program, args, opts, cb) {
f.execFile = function(program, args, opts, cb) {
t.strictEqual(program, 'Z:\\snake.exe')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '2.7.0')
}
t.strictEqual(program, 'py.exe')
@@ -220,7 +220,7 @@ test('find python - python 3, use python launcher', function (t) {
f.execFile = function(program, args, opts, cb) {
f.execFile = function(program, args, opts, cb) {
t.strictEqual(program, 'Z:\\snake.exe')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '2.7.0')
}
t.strictEqual(program, 'py.exe')
@@ -229,7 +229,7 @@ test('find python - python 3, use python launcher', function (t) {
cb(null, 'Z:\\snake.exe')
}
t.strictEqual(program, 'python')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '3.0.0')
}
f.checkPython()
@@ -257,7 +257,7 @@ test('find python - python 3, use python launcher, python 2 too old',
f.execFile = function(program, args, opts, cb) {
f.execFile = function(program, args, opts, cb) {
t.strictEqual(program, 'Z:\\snake.exe')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '2.3.4')
}
t.strictEqual(program, 'py.exe')
@@ -266,7 +266,7 @@ test('find python - python 3, use python launcher, python 2 too old',
cb(null, 'Z:\\snake.exe')
}
t.strictEqual(program, 'python')
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '3.0.0')
}
f.checkPython()
@@ -291,7 +291,7 @@ test('find python - no python, no python launcher, good guess', function (t) {
f.execFile = function(program, args, opts, cb) {
f.execFile = function(program, args, opts, cb) {
t.ok(re.test(program))
- t.ok(/import platform/.test(args[1]))
+ t.ok(/import sys/.test(args[1]))
cb(null, '2.7.0')
}
t.strictEqual(program, 'py.exe')
diff --git a/node_modules/node-gyp/tools/gyp/pylib/gyp/generator/compile_commands_json.py b/node_modules/node-gyp/tools/gyp/pylib/gyp/generator/compile_commands_json.py
new file mode 100644
index 000000000..575db63c4
--- /dev/null
+++ b/node_modules/node-gyp/tools/gyp/pylib/gyp/generator/compile_commands_json.py
@@ -0,0 +1,115 @@
+# Copyright (c) 2016 Ben Noordhuis <info@bnoordhuis.nl>. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import gyp.common
+import gyp.xcode_emulation
+import json
+import os
+
+generator_additional_non_configuration_keys = []
+generator_additional_path_sections = []
+generator_extra_sources_for_rules = []
+generator_filelist_paths = None
+generator_supports_multiple_toolsets = True
+generator_wants_sorted_dependencies = False
+
+# Lifted from make.py. The actual values don't matter much.
+generator_default_variables = {
+ 'CONFIGURATION_NAME': '$(BUILDTYPE)',
+ 'EXECUTABLE_PREFIX': '',
+ 'EXECUTABLE_SUFFIX': '',
+ 'INTERMEDIATE_DIR': '$(obj).$(TOOLSET)/$(TARGET)/geni',
+ 'PRODUCT_DIR': '$(builddir)',
+ 'RULE_INPUT_DIRNAME': '%(INPUT_DIRNAME)s',
+ 'RULE_INPUT_EXT': '$(suffix $<)',
+ 'RULE_INPUT_NAME': '$(notdir $<)',
+ 'RULE_INPUT_PATH': '$(abspath $<)',
+ 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s',
+ 'SHARED_INTERMEDIATE_DIR': '$(obj)/gen',
+ 'SHARED_LIB_PREFIX': 'lib',
+ 'STATIC_LIB_PREFIX': 'lib',
+ 'STATIC_LIB_SUFFIX': '.a',
+}
+
+
+def IsMac(params):
+ return 'mac' == gyp.common.GetFlavor(params)
+
+
+def CalculateVariables(default_variables, params):
+ default_variables.setdefault('OS', gyp.common.GetFlavor(params))
+
+
+def AddCommandsForTarget(cwd, target, params, per_config_commands):
+ output_dir = params['generator_flags']['output_dir']
+ for configuration_name, configuration in target['configurations'].iteritems():
+ builddir_name = os.path.join(output_dir, configuration_name)
+
+ if IsMac(params):
+ xcode_settings = gyp.xcode_emulation.XcodeSettings(target)
+ cflags = xcode_settings.GetCflags(configuration_name)
+ cflags_c = xcode_settings.GetCflagsC(configuration_name)
+ cflags_cc = xcode_settings.GetCflagsCC(configuration_name)
+ else:
+ cflags = configuration.get('cflags', [])
+ cflags_c = configuration.get('cflags_c', [])
+ cflags_cc = configuration.get('cflags_cc', [])
+
+ cflags_c = cflags + cflags_c
+ cflags_cc = cflags + cflags_cc
+
+ defines = configuration.get('defines', [])
+ defines = ['-D' + s for s in defines]
+
+ # TODO(bnoordhuis) Handle generated source files.
+ sources = target.get('sources', [])
+ sources = [s for s in sources if s.endswith('.c') or s.endswith('.cc')]
+
+ def resolve(filename):
+ return os.path.abspath(os.path.join(cwd, filename))
+
+ # TODO(bnoordhuis) Handle generated header files.
+ include_dirs = configuration.get('include_dirs', [])
+ include_dirs = [s for s in include_dirs if not s.startswith('$(obj)')]
+ includes = ['-I' + resolve(s) for s in include_dirs]
+
+ defines = gyp.common.EncodePOSIXShellList(defines)
+ includes = gyp.common.EncodePOSIXShellList(includes)
+ cflags_c = gyp.common.EncodePOSIXShellList(cflags_c)
+ cflags_cc = gyp.common.EncodePOSIXShellList(cflags_cc)
+
+ commands = per_config_commands.setdefault(configuration_name, [])
+ for source in sources:
+ file = resolve(source)
+ isc = source.endswith('.c')
+ cc = 'cc' if isc else 'c++'
+ cflags = cflags_c if isc else cflags_cc
+ command = ' '.join((cc, defines, includes, cflags,
+ '-c', gyp.common.EncodePOSIXShellArgument(file)))
+ commands.append(dict(command=command, directory=output_dir, file=file))
+
+
+def GenerateOutput(target_list, target_dicts, data, params):
+ per_config_commands = {}
+ for qualified_target, target in target_dicts.iteritems():
+ build_file, target_name, toolset = (
+ gyp.common.ParseQualifiedTarget(qualified_target))
+ if IsMac(params):
+ settings = data[build_file]
+ gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(settings, target)
+ cwd = os.path.dirname(build_file)
+ AddCommandsForTarget(cwd, target, params, per_config_commands)
+
+ output_dir = params['generator_flags']['output_dir']
+ for configuration_name, commands in per_config_commands.iteritems():
+ filename = os.path.join(output_dir,
+ configuration_name,
+ 'compile_commands.json')
+ gyp.common.EnsureDirExists(filename)
+ fp = open(filename, 'w')
+ json.dump(commands, fp=fp, indent=0, check_circular=False)
+
+
+def PerformBuild(data, configurations, params):
+ pass
diff --git a/node_modules/sntp/.npmignore b/node_modules/sntp/.npmignore
deleted file mode 100644
index 77ba16cb0..000000000
--- a/node_modules/sntp/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-
diff --git a/node_modules/sntp/.travis.yml b/node_modules/sntp/.travis.yml
deleted file mode 100755
index 047f7e3d5..000000000
--- a/node_modules/sntp/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
-
diff --git a/node_modules/sntp/LICENSE b/node_modules/sntp/LICENSE
deleted file mode 100755
index b0d877439..000000000
--- a/node_modules/sntp/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2012-2014, Eran Hammer and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hueniverse/sntp/graphs/contributors
diff --git a/node_modules/sntp/Makefile b/node_modules/sntp/Makefile
deleted file mode 100755
index 417fd9370..000000000
--- a/node_modules/sntp/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-test:
- @node node_modules/lab/bin/lab
-test-cov:
- @node node_modules/lab/bin/lab -t 100 -m 3000
-test-cov-html:
- @node node_modules/lab/bin/lab -r html -o coverage.html
-
-.PHONY: test test-cov test-cov-html
-
diff --git a/node_modules/sntp/README.md b/node_modules/sntp/README.md
deleted file mode 100755
index 98a6e025d..000000000
--- a/node_modules/sntp/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# sntp
-
-An SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time
-along with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset
-to the local time.
-
-[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp)
-
-# Usage
-
-```javascript
-var Sntp = require('sntp');
-
-// All options are optional
-
-var options = {
- host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org
- port: 123, // Defaults to 123 (NTP)
- resolveReference: true, // Default to false (not resolving)
- timeout: 1000 // Defaults to zero (no timeout)
-};
-
-// Request server time
-
-Sntp.time(options, function (err, time) {
-
- if (err) {
- console.log('Failed: ' + err.message);
- process.exit(1);
- }
-
- console.log('Local clock is off by: ' + time.t + ' milliseconds');
- process.exit(0);
-});
-```
-
-If an application needs to maintain continuous time synchronization, the module provides a stateful method for
-querying the current offset only when the last one is too old (defaults to daily).
-
-```javascript
-// Request offset once
-
-Sntp.offset(function (err, offset) {
-
- console.log(offset); // New (served fresh)
-
- // Request offset again
-
- Sntp.offset(function (err, offset) {
-
- console.log(offset); // Identical (served from cache)
- });
-});
-```
-
-To set a background offset refresh, start the interval and use the provided now() method. If for any reason the
-client fails to obtain an up-to-date offset, the current system clock is used.
-
-```javascript
-var before = Sntp.now(); // System time without offset
-
-Sntp.start(function () {
-
- var now = Sntp.now(); // With offset
- Sntp.stop();
-});
-```
-
diff --git a/node_modules/sntp/examples/offset.js b/node_modules/sntp/examples/offset.js
deleted file mode 100755
index 0303f6dcf..000000000
--- a/node_modules/sntp/examples/offset.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var Sntp = require('../lib');
-
-// Request offset once
-
-Sntp.offset(function (err, offset) {
-
- console.log(offset); // New (served fresh)
-
- // Request offset again
-
- Sntp.offset(function (err, offset) {
-
- console.log(offset); // Identical (served from cache)
- });
-});
-
diff --git a/node_modules/sntp/examples/time.js b/node_modules/sntp/examples/time.js
deleted file mode 100755
index bd70d0e6a..000000000
--- a/node_modules/sntp/examples/time.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var Sntp = require('../lib');
-
-// All options are optional
-
-var options = {
- host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org
- port: 123, // Defaults to 123 (NTP)
- resolveReference: true, // Default to false (not resolving)
- timeout: 1000 // Defaults to zero (no timeout)
-};
-
-// Request server time
-
-Sntp.time(options, function (err, time) {
-
- if (err) {
- console.log('Failed: ' + err.message);
- process.exit(1);
- }
-
- console.log(time);
- console.log('Local clock is off by: ' + time.t + ' milliseconds');
- process.exit(0);
-});
-
diff --git a/node_modules/sntp/index.js b/node_modules/sntp/index.js
deleted file mode 100755
index 4cc88b358..000000000
--- a/node_modules/sntp/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib'); \ No newline at end of file
diff --git a/node_modules/sntp/lib/index.js b/node_modules/sntp/lib/index.js
deleted file mode 100755
index e91718b4f..000000000
--- a/node_modules/sntp/lib/index.js
+++ /dev/null
@@ -1,412 +0,0 @@
-// Load modules
-
-var Dgram = require('dgram');
-var Dns = require('dns');
-var Hoek = require('hoek');
-
-
-// Declare internals
-
-var internals = {};
-
-
-exports.time = function (options, callback) {
-
- if (arguments.length !== 2) {
- callback = arguments[0];
- options = {};
- }
-
- var settings = Hoek.clone(options);
- settings.host = settings.host || 'pool.ntp.org';
- settings.port = settings.port || 123;
- settings.resolveReference = settings.resolveReference || false;
-
- // Declare variables used by callback
-
- var timeoutId = 0;
- var sent = 0;
-
- // Ensure callback is only called once
-
- var finish = function (err, result) {
-
- if (timeoutId) {
- clearTimeout(timeoutId);
- timeoutId = 0;
- }
-
- socket.removeAllListeners();
- socket.once('error', internals.ignore);
- socket.close();
- return callback(err, result);
- };
-
- finish = Hoek.once(finish);
-
- // Create UDP socket
-
- var socket = Dgram.createSocket('udp4');
-
- socket.once('error', function (err) {
-
- return finish(err);
- });
-
- // Listen to incoming messages
-
- socket.on('message', function (buffer, rinfo) {
-
- var received = Date.now();
-
- var message = new internals.NtpMessage(buffer);
- if (!message.isValid) {
- return finish(new Error('Invalid server response'), message);
- }
-
- if (message.originateTimestamp !== sent) {
- return finish(new Error('Wrong originate timestamp'), message);
- }
-
- // Timestamp Name ID When Generated
- // ------------------------------------------------------------
- // Originate Timestamp T1 time request sent by client
- // Receive Timestamp T2 time request received by server
- // Transmit Timestamp T3 time reply sent by server
- // Destination Timestamp T4 time reply received by client
- //
- // The roundtrip delay d and system clock offset t are defined as:
- //
- // d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2
-
- var T1 = message.originateTimestamp;
- var T2 = message.receiveTimestamp;
- var T3 = message.transmitTimestamp;
- var T4 = received;
-
- message.d = (T4 - T1) - (T3 - T2);
- message.t = ((T2 - T1) + (T3 - T4)) / 2;
- message.receivedLocally = received;
-
- if (!settings.resolveReference ||
- message.stratum !== 'secondary') {
-
- return finish(null, message);
- }
-
- // Resolve reference IP address
-
- Dns.reverse(message.referenceId, function (err, domains) {
-
- if (/* $lab:coverage:off$ */ !err /* $lab:coverage:on$ */) {
- message.referenceHost = domains[0];
- }
-
- return finish(null, message);
- });
- });
-
- // Set timeout
-
- if (settings.timeout) {
- timeoutId = setTimeout(function () {
-
- timeoutId = 0;
- return finish(new Error('Timeout'));
- }, settings.timeout);
- }
-
- // Construct NTP message
-
- var message = new Buffer(48);
- for (var i = 0; i < 48; i++) { // Zero message
- message[i] = 0;
- }
-
- message[0] = (0 << 6) + (4 << 3) + (3 << 0) // Set version number to 4 and Mode to 3 (client)
- sent = Date.now();
- internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate)
-
- // Send NTP request
-
- socket.send(message, 0, message.length, settings.port, settings.host, function (err, bytes) {
-
- if (err ||
- bytes !== 48) {
-
- return finish(err || new Error('Could not send entire message'));
- }
- });
-};
-
-
-internals.NtpMessage = function (buffer) {
-
- this.isValid = false;
-
- // Validate
-
- if (buffer.length !== 48) {
- return;
- }
-
- // Leap indicator
-
- var li = (buffer[0] >> 6);
- switch (li) {
- case 0: this.leapIndicator = 'no-warning'; break;
- case 1: this.leapIndicator = 'last-minute-61'; break;
- case 2: this.leapIndicator = 'last-minute-59'; break;
- case 3: this.leapIndicator = 'alarm'; break;
- }
-
- // Version
-
- var vn = ((buffer[0] & 0x38) >> 3);
- this.version = vn;
-
- // Mode
-
- var mode = (buffer[0] & 0x7);
- switch (mode) {
- case 1: this.mode = 'symmetric-active'; break;
- case 2: this.mode = 'symmetric-passive'; break;
- case 3: this.mode = 'client'; break;
- case 4: this.mode = 'server'; break;
- case 5: this.mode = 'broadcast'; break;
- case 0:
- case 6:
- case 7: this.mode = 'reserved'; break;
- }
-
- // Stratum
-
- var stratum = buffer[1];
- if (stratum === 0) {
- this.stratum = 'death';
- }
- else if (stratum === 1) {
- this.stratum = 'primary';
- }
- else if (stratum <= 15) {
- this.stratum = 'secondary';
- }
- else {
- this.stratum = 'reserved';
- }
-
- // Poll interval (msec)
-
- this.pollInterval = Math.round(Math.pow(2, buffer[2])) * 1000;
-
- // Precision (msecs)
-
- this.precision = Math.pow(2, buffer[3]) * 1000;
-
- // Root delay (msecs)
-
- var rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7];
- this.rootDelay = 1000 * (rootDelay / 0x10000);
-
- // Root dispersion (msecs)
-
- this.rootDispersion = ((buffer[8] << 8) + buffer[9] + ((buffer[10] << 8) + buffer[11]) / Math.pow(2, 16)) * 1000;
-
- // Reference identifier
-
- this.referenceId = '';
- switch (this.stratum) {
- case 'death':
- case 'primary':
- this.referenceId = String.fromCharCode(buffer[12]) + String.fromCharCode(buffer[13]) + String.fromCharCode(buffer[14]) + String.fromCharCode(buffer[15]);
- break;
- case 'secondary':
- this.referenceId = '' + buffer[12] + '.' + buffer[13] + '.' + buffer[14] + '.' + buffer[15];
- break;
- }
-
- // Reference timestamp
-
- this.referenceTimestamp = internals.toMsecs(buffer, 16);
-
- // Originate timestamp
-
- this.originateTimestamp = internals.toMsecs(buffer, 24);
-
- // Receive timestamp
-
- this.receiveTimestamp = internals.toMsecs(buffer, 32);
-
- // Transmit timestamp
-
- this.transmitTimestamp = internals.toMsecs(buffer, 40);
-
- // Validate
-
- if (this.version === 4 &&
- this.stratum !== 'reserved' &&
- this.mode === 'server' &&
- this.originateTimestamp &&
- this.receiveTimestamp &&
- this.transmitTimestamp) {
-
- this.isValid = true;
- }
-
- return this;
-};
-
-
-internals.toMsecs = function (buffer, offset) {
-
- var seconds = 0;
- var fraction = 0;
-
- for (var i = 0; i < 4; ++i) {
- seconds = (seconds * 256) + buffer[offset + i];
- }
-
- for (i = 4; i < 8; ++i) {
- fraction = (fraction * 256) + buffer[offset + i];
- }
-
- return ((seconds - 2208988800 + (fraction / Math.pow(2, 32))) * 1000);
-};
-
-
-internals.fromMsecs = function (ts, buffer, offset) {
-
- var seconds = Math.floor(ts / 1000) + 2208988800;
- var fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32));
-
- buffer[offset + 0] = (seconds & 0xFF000000) >> 24;
- buffer[offset + 1] = (seconds & 0x00FF0000) >> 16;
- buffer[offset + 2] = (seconds & 0x0000FF00) >> 8;
- buffer[offset + 3] = (seconds & 0x000000FF);
-
- buffer[offset + 4] = (fraction & 0xFF000000) >> 24;
- buffer[offset + 5] = (fraction & 0x00FF0000) >> 16;
- buffer[offset + 6] = (fraction & 0x0000FF00) >> 8;
- buffer[offset + 7] = (fraction & 0x000000FF);
-};
-
-
-// Offset singleton
-
-internals.last = {
- offset: 0,
- expires: 0,
- host: '',
- port: 0
-};
-
-
-exports.offset = function (options, callback) {
-
- if (arguments.length !== 2) {
- callback = arguments[0];
- options = {};
- }
-
- var now = Date.now();
- var clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily
-
- if (internals.last.offset &&
- internals.last.host === options.host &&
- internals.last.port === options.port &&
- now < internals.last.expires) {
-
- process.nextTick(function () {
-
- callback(null, internals.last.offset);
- });
-
- return;
- }
-
- exports.time(options, function (err, time) {
-
- if (err) {
- return callback(err, 0);
- }
-
- internals.last = {
- offset: Math.round(time.t),
- expires: now + clockSyncRefresh,
- host: options.host,
- port: options.port
- };
-
- return callback(null, internals.last.offset);
- });
-};
-
-
-// Now singleton
-
-internals.now = {
- intervalId: 0
-};
-
-
-exports.start = function (options, callback) {
-
- if (arguments.length !== 2) {
- callback = arguments[0];
- options = {};
- }
-
- if (internals.now.intervalId) {
- process.nextTick(function () {
-
- callback();
- });
-
- return;
- }
-
- exports.offset(options, function (err, offset) {
-
- internals.now.intervalId = setInterval(function () {
-
- exports.offset(options, function () { });
- }, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily
-
- return callback();
- });
-};
-
-
-exports.stop = function () {
-
- if (!internals.now.intervalId) {
- return;
- }
-
- clearInterval(internals.now.intervalId);
- internals.now.intervalId = 0;
-};
-
-
-exports.isLive = function () {
-
- return !!internals.now.intervalId;
-};
-
-
-exports.now = function () {
-
- var now = Date.now();
- if (!exports.isLive() ||
- now >= internals.last.expires) {
-
- return now;
- }
-
- return now + internals.last.offset;
-};
-
-
-internals.ignore = function () {
-
-};
diff --git a/node_modules/sntp/package.json b/node_modules/sntp/package.json
deleted file mode 100755
index 3da9843d0..000000000
--- a/node_modules/sntp/package.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "_from": "sntp@1.x.x",
- "_id": "sntp@1.0.9",
- "_inBundle": false,
- "_integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
- "_location": "/sntp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "sntp@1.x.x",
- "name": "sntp",
- "escapedName": "sntp",
- "rawSpec": "1.x.x",
- "saveSpec": null,
- "fetchSpec": "1.x.x"
- },
- "_requiredBy": [
- "/hawk"
- ],
- "_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
- "_shasum": "6541184cc90aeea6c6e7b35e2659082443c66198",
- "_spec": "sntp@1.x.x",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
- "author": {
- "name": "Eran Hammer",
- "email": "eran@hammer.io",
- "url": "http://hueniverse.com"
- },
- "bugs": {
- "url": "https://github.com/hueniverse/sntp/issues"
- },
- "bundleDependencies": false,
- "contributors": [],
- "dependencies": {
- "hoek": "2.x.x"
- },
- "deprecated": false,
- "description": "SNTP Client",
- "devDependencies": {
- "lab": "4.x.x"
- },
- "engines": {
- "node": ">=0.8.0"
- },
- "homepage": "https://github.com/hueniverse/sntp#readme",
- "keywords": [
- "sntp",
- "ntp",
- "time"
- ],
- "licenses": [
- {
- "type": "BSD",
- "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE"
- }
- ],
- "main": "index",
- "name": "sntp",
- "repository": {
- "type": "git",
- "url": "git://github.com/hueniverse/sntp.git"
- },
- "scripts": {
- "test": "make test-cov"
- },
- "version": "1.0.9"
-}
diff --git a/node_modules/sntp/test/index.js b/node_modules/sntp/test/index.js
deleted file mode 100755
index f1d1cdabf..000000000
--- a/node_modules/sntp/test/index.js
+++ /dev/null
@@ -1,435 +0,0 @@
-// Load modules
-
-var Dns = require('dns');
-var Dgram = require('dgram');
-var Lab = require('lab');
-var Sntp = require('../lib');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var before = lab.before;
-var after = lab.after;
-var describe = lab.experiment;
-var it = lab.test;
-var expect = Lab.expect;
-
-
-describe('SNTP', function () {
-
- describe('#time', function () {
-
- it('returns consistent result over multiple tries', function (done) {
-
- Sntp.time(function (err, time) {
-
- expect(err).to.not.exist;
- expect(time).to.exist;
- var t1 = time.t;
-
- Sntp.time(function (err, time) {
-
- expect(err).to.not.exist;
- expect(time).to.exist;
- var t2 = time.t;
- expect(Math.abs(t1 - t2)).is.below(200);
- done();
- });
- });
- });
-
- it('resolves reference IP', function (done) {
-
- Sntp.time({ host: 'ntp.exnet.com', resolveReference: true }, function (err, time) {
-
- expect(err).to.not.exist;
- expect(time).to.exist;
- expect(time.referenceHost).to.exist;
- done();
- });
- });
-
- it('times out on no response', function (done) {
-
- Sntp.time({ port: 124, timeout: 100 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time).to.not.exist;
- expect(err.message).to.equal('Timeout');
- done();
- });
- });
-
- it('errors on error event', { parallel: false }, function (done) {
-
- var orig = Dgram.createSocket;
- Dgram.createSocket = function (type) {
-
- Dgram.createSocket = orig;
- var socket = Dgram.createSocket(type);
- setImmediate(function () { socket.emit('error', new Error('Fake')) });
- return socket;
- };
-
- Sntp.time(function (err, time) {
-
- expect(err).to.exist;
- expect(time).to.not.exist;
- expect(err.message).to.equal('Fake');
- done();
- });
- });
-
- it('errors on incorrect sent size', { parallel: false }, function (done) {
-
- var orig = Dgram.Socket.prototype.send;
- Dgram.Socket.prototype.send = function (buf, offset, length, port, address, callback) {
-
- Dgram.Socket.prototype.send = orig;
- return callback(null, 40);
- };
-
- Sntp.time(function (err, time) {
-
- expect(err).to.exist;
- expect(time).to.not.exist;
- expect(err.message).to.equal('Could not send entire message');
- done();
- });
- });
-
- it('times out on invalid host', function (done) {
-
- Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time).to.not.exist;
- expect(err.message).to.contain('getaddrinfo');
- done();
- });
- });
-
- it('fails on bad response buffer size', function (done) {
-
- var server = Dgram.createSocket('udp4');
- server.on('message', function (message, remote) {
- var message = new Buffer(10);
- server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) {
-
- server.close();
- });
- });
-
- server.bind(49123);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('Invalid server response');
- done();
- });
- });
-
- var messup = function (bytes) {
-
- var server = Dgram.createSocket('udp4');
- server.on('message', function (message, remote) {
-
- var message = new Buffer([
- 0x24, 0x01, 0x00, 0xe3,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x41, 0x43, 0x54, 0x53,
- 0xd4, 0xa8, 0x2d, 0xc7,
- 0x1c, 0x5d, 0x49, 0x1b,
- 0xd4, 0xa8, 0x2d, 0xe6,
- 0x67, 0xef, 0x9d, 0xb2,
- 0xd4, 0xa8, 0x2d, 0xe6,
- 0x71, 0xed, 0xb5, 0xfb,
- 0xd4, 0xa8, 0x2d, 0xe6,
- 0x71, 0xee, 0x6c, 0xc5
- ]);
-
- for (var i = 0, il = bytes.length; i < il; ++i) {
- message[bytes[i][0]] = bytes[i][1];
- }
-
- server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) {
-
- server.close();
- });
- });
-
- server.bind(49123);
- };
-
- it('fails on bad version', function (done) {
-
- messup([[0, (0 << 6) + (3 << 3) + (4 << 0)]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time.version).to.equal(3);
- expect(err.message).to.equal('Invalid server response');
- done();
- });
- });
-
- it('fails on bad originateTimestamp', function (done) {
-
- messup([[24, 0x83], [25, 0xaa], [26, 0x7e], [27, 0x80], [28, 0], [29, 0], [30, 0], [31, 0]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('Invalid server response');
- done();
- });
- });
-
- it('fails on bad receiveTimestamp', function (done) {
-
- messup([[32, 0x83], [33, 0xaa], [34, 0x7e], [35, 0x80], [36, 0], [37, 0], [38, 0], [39, 0]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('Invalid server response');
- done();
- });
- });
-
- it('fails on bad originate timestamp and alarm li', function (done) {
-
- messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('Wrong originate timestamp');
- expect(time.leapIndicator).to.equal('alarm');
- done();
- });
- });
-
- it('returns time with death stratum and last61 li', function (done) {
-
- messup([[0, (1 << 6) + (4 << 3) + (4 << 0)], [1, 0]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(time.stratum).to.equal('death');
- expect(time.leapIndicator).to.equal('last-minute-61');
- done();
- });
- });
-
- it('returns time with reserved stratum and last59 li', function (done) {
-
- messup([[0, (2 << 6) + (4 << 3) + (4 << 0)], [1, 0x1f]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(time.stratum).to.equal('reserved');
- expect(time.leapIndicator).to.equal('last-minute-59');
- done();
- });
- });
-
- it('fails on bad mode (symmetric-active)', function (done) {
-
- messup([[0, (0 << 6) + (4 << 3) + (1 << 0)]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time.mode).to.equal('symmetric-active');
- done();
- });
- });
-
- it('fails on bad mode (symmetric-passive)', function (done) {
-
- messup([[0, (0 << 6) + (4 << 3) + (2 << 0)]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time.mode).to.equal('symmetric-passive');
- done();
- });
- });
-
- it('fails on bad mode (client)', function (done) {
-
- messup([[0, (0 << 6) + (4 << 3) + (3 << 0)]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time.mode).to.equal('client');
- done();
- });
- });
-
- it('fails on bad mode (broadcast)', function (done) {
-
- messup([[0, (0 << 6) + (4 << 3) + (5 << 0)]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time.mode).to.equal('broadcast');
- done();
- });
- });
-
- it('fails on bad mode (reserved)', function (done) {
-
- messup([[0, (0 << 6) + (4 << 3) + (6 << 0)]]);
-
- Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
-
- expect(err).to.exist;
- expect(time.mode).to.equal('reserved');
- done();
- });
- });
- });
-
- describe('#offset', function () {
-
- it('gets the current offset', function (done) {
-
- Sntp.offset(function (err, offset) {
-
- expect(err).to.not.exist;
- expect(offset).to.not.equal(0);
- done();
- });
- });
-
- it('gets the current offset from cache', function (done) {
-
- Sntp.offset(function (err, offset) {
-
- expect(err).to.not.exist;
- expect(offset).to.not.equal(0);
- var offset1 = offset;
- Sntp.offset({}, function (err, offset) {
-
- expect(err).to.not.exist;
- expect(offset).to.equal(offset1);
- done();
- });
- });
- });
-
- it('gets the new offset on different server', function (done) {
-
- Sntp.offset(function (err, offset) {
-
- expect(err).to.not.exist;
- expect(offset).to.not.equal(0);
- var offset1 = offset;
- Sntp.offset({ host: 'nist1-sj.ustiming.org' }, function (err, offset) {
-
- expect(err).to.not.exist;
- expect(offset).to.not.equal(offset1);
- done();
- });
- });
- });
-
- it('gets the new offset on different server', function (done) {
-
- Sntp.offset(function (err, offset) {
-
- expect(err).to.not.exist;
- expect(offset).to.not.equal(0);
- var offset1 = offset;
- Sntp.offset({ port: 123 }, function (err, offset) {
-
- expect(err).to.not.exist;
- expect(offset).to.not.equal(offset1);
- done();
- });
- });
- });
-
- it('fails getting the current offset on invalid server', function (done) {
-
- Sntp.offset({ host: 'error' }, function (err, offset) {
-
- expect(err).to.exist;
- expect(offset).to.equal(0);
- done();
- });
- });
- });
-
- describe('#now', function () {
-
- it('starts auto-sync, gets now, then stops', function (done) {
-
- Sntp.stop();
-
- var before = Sntp.now();
- expect(before).to.equal(Date.now());
-
- Sntp.start(function () {
-
- var now = Sntp.now();
- expect(now).to.not.equal(Date.now());
- Sntp.stop();
-
- done();
- });
- });
-
- it('starts twice', function (done) {
-
- Sntp.start(function () {
-
- Sntp.start(function () {
-
- var now = Sntp.now();
- expect(now).to.not.equal(Date.now());
- Sntp.stop();
-
- done();
- });
- });
- });
-
- it('starts auto-sync, gets now, waits, gets again after timeout', function (done) {
-
- Sntp.stop();
-
- var before = Sntp.now();
- expect(before).to.equal(Date.now());
-
- Sntp.start({ clockSyncRefresh: 100 }, function () {
-
- var now = Sntp.now();
- expect(now).to.not.equal(Date.now());
- expect(now).to.equal(Sntp.now());
-
- setTimeout(function () {
-
- expect(Sntp.now()).to.not.equal(now);
- Sntp.stop();
- done();
- }, 110);
- });
- });
- });
-});
-
diff --git a/node_modules/stringstream/.travis.yml b/node_modules/stringstream/.travis.yml
deleted file mode 100644
index f1d0f13c8..000000000
--- a/node_modules/stringstream/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.4
- - 0.6
diff --git a/node_modules/stringstream/LICENSE.txt b/node_modules/stringstream/LICENSE.txt
deleted file mode 100644
index ab861acdc..000000000
--- a/node_modules/stringstream/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2012 Michael Hart (michael.hart.au@gmail.com)
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/stringstream/README.md b/node_modules/stringstream/README.md
deleted file mode 100644
index 32fc98255..000000000
--- a/node_modules/stringstream/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Decode streams into strings The Right Way(tm)
-
-```javascript
-var fs = require('fs')
-var zlib = require('zlib')
-var strs = require('stringstream')
-
-var utf8Stream = fs.createReadStream('massiveLogFile.gz')
- .pipe(zlib.createGunzip())
- .pipe(strs('utf8'))
-```
-
-No need to deal with `setEncoding()` weirdness, just compose streams
-like they were supposed to be!
-
-Handles input and output encoding:
-
-```javascript
-// Stream from utf8 to hex to base64... Why not, ay.
-var hex64Stream = fs.createReadStream('myFile')
- .pipe(strs('utf8', 'hex'))
- .pipe(strs('hex', 'base64'))
-```
-
-Also deals with `base64` output correctly by aligning each emitted data
-chunk so that there are no dangling `=` characters:
-
-```javascript
-var stream = fs.createReadStream('myFile').pipe(strs('base64'))
-
-var base64Str = ''
-
-stream.on('data', function(data) { base64Str += data })
-stream.on('end', function() {
- console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding()
- console.log('Original file is: ' + new Buffer(base64Str, 'base64'))
-})
-```
diff --git a/node_modules/stringstream/example.js b/node_modules/stringstream/example.js
deleted file mode 100644
index f82b85edc..000000000
--- a/node_modules/stringstream/example.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var fs = require('fs')
-var zlib = require('zlib')
-var strs = require('stringstream')
-
-var utf8Stream = fs.createReadStream('massiveLogFile.gz')
- .pipe(zlib.createGunzip())
- .pipe(strs('utf8'))
-
-utf8Stream.pipe(process.stdout)
-
-// Stream from utf8 to hex to base64... Why not, ay.
-var hex64Stream = fs.createReadStream('myFile')
- .pipe(strs('utf8', 'hex'))
- .pipe(strs('hex', 'base64'))
-
-hex64Stream.pipe(process.stdout)
-
-// Deals with base64 correctly by aligning chunks
-var stream = fs.createReadStream('myFile').pipe(strs('base64'))
-
-var base64Str = ''
-
-stream.on('data', function(data) { base64Str += data })
-stream.on('end', function() {
- console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding()
- console.log('Original file is: ' + new Buffer(base64Str, 'base64'))
-})
diff --git a/node_modules/stringstream/package.json b/node_modules/stringstream/package.json
deleted file mode 100644
index d2c7b8f12..000000000
--- a/node_modules/stringstream/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "_from": "stringstream@~0.0.4",
- "_id": "stringstream@0.0.6",
- "_inBundle": false,
- "_integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
- "_location": "/stringstream",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "stringstream@~0.0.4",
- "name": "stringstream",
- "escapedName": "stringstream",
- "rawSpec": "~0.0.4",
- "saveSpec": null,
- "fetchSpec": "~0.0.4"
- },
- "_requiredBy": [
- "/request"
- ],
- "_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
- "_shasum": "7880225b0d4ad10e30927d167a1d6f2fd3b33a72",
- "_spec": "stringstream@~0.0.4",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
- "author": {
- "name": "Michael Hart",
- "email": "michael.hart.au@gmail.com",
- "url": "http://github.com/mhart"
- },
- "bugs": {
- "url": "https://github.com/mhart/StringStream/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Encode and decode streams into string streams",
- "homepage": "https://github.com/mhart/StringStream#readme",
- "keywords": [
- "string",
- "stream",
- "base64",
- "gzip"
- ],
- "license": "MIT",
- "main": "stringstream.js",
- "name": "stringstream",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mhart/StringStream.git"
- },
- "version": "0.0.6"
-}
diff --git a/node_modules/stringstream/stringstream.js b/node_modules/stringstream/stringstream.js
deleted file mode 100644
index 6732b9d94..000000000
--- a/node_modules/stringstream/stringstream.js
+++ /dev/null
@@ -1,102 +0,0 @@
-var util = require('util')
-var Stream = require('stream')
-var StringDecoder = require('string_decoder').StringDecoder
-
-module.exports = StringStream
-module.exports.AlignedStringDecoder = AlignedStringDecoder
-
-function StringStream(from, to) {
- if (!(this instanceof StringStream)) return new StringStream(from, to)
-
- Stream.call(this)
-
- if (from == null) from = 'utf8'
-
- this.readable = this.writable = true
- this.paused = false
- this.toEncoding = (to == null ? from : to)
- this.fromEncoding = (to == null ? '' : from)
- this.decoder = new AlignedStringDecoder(this.toEncoding)
-}
-util.inherits(StringStream, Stream)
-
-StringStream.prototype.write = function(data) {
- if (!this.writable) {
- var err = new Error('stream not writable')
- err.code = 'EPIPE'
- this.emit('error', err)
- return false
- }
- if (this.fromEncoding) {
- if (Buffer.isBuffer(data) || typeof data === 'number') data = data.toString()
- data = new Buffer(data, this.fromEncoding)
- }
- var string = this.decoder.write(data)
- if (string.length) this.emit('data', string)
- return !this.paused
-}
-
-StringStream.prototype.flush = function() {
- if (this.decoder.flush) {
- var string = this.decoder.flush()
- if (string.length) this.emit('data', string)
- }
-}
-
-StringStream.prototype.end = function() {
- if (!this.writable && !this.readable) return
- this.flush()
- this.emit('end')
- this.writable = this.readable = false
- this.destroy()
-}
-
-StringStream.prototype.destroy = function() {
- this.decoder = null
- this.writable = this.readable = false
- this.emit('close')
-}
-
-StringStream.prototype.pause = function() {
- this.paused = true
-}
-
-StringStream.prototype.resume = function () {
- if (this.paused) this.emit('drain')
- this.paused = false
-}
-
-function AlignedStringDecoder(encoding) {
- StringDecoder.call(this, encoding)
-
- switch (this.encoding) {
- case 'base64':
- this.write = alignedWrite
- this.alignedBuffer = new Buffer(3)
- this.alignedBytes = 0
- break
- }
-}
-util.inherits(AlignedStringDecoder, StringDecoder)
-
-AlignedStringDecoder.prototype.flush = function() {
- if (!this.alignedBuffer || !this.alignedBytes) return ''
- var leftover = this.alignedBuffer.toString(this.encoding, 0, this.alignedBytes)
- this.alignedBytes = 0
- return leftover
-}
-
-function alignedWrite(buffer) {
- var rem = (this.alignedBytes + buffer.length) % this.alignedBuffer.length
- if (!rem && !this.alignedBytes) return buffer.toString(this.encoding)
-
- var returnBuffer = new Buffer(this.alignedBytes + buffer.length - rem)
-
- this.alignedBuffer.copy(returnBuffer, 0, 0, this.alignedBytes)
- buffer.copy(returnBuffer, this.alignedBytes, 0, buffer.length - rem)
-
- buffer.copy(this.alignedBuffer, 0, buffer.length - rem, buffer.length)
- this.alignedBytes = rem
-
- return returnBuffer.toString(this.encoding)
-}