]:`. For example,
if the package.json has this:
```json
-{ "name" : "foo"
-, "config" : { "port" : "8080" }
-, "scripts" : { "start" : "node server.js" } }
+{
+ "name" : "foo",
+ "config" : {
+ "port" : "8080"
+ },
+ "scripts" : {
+ "start" : "node server.js"
+ }
+}
```
and the server.js is this:
@@ -206,10 +225,11 @@ process.env.npm_package_scripts_install === "foo.js"
For example, if your package.json contains this:
```json
-{ "scripts" :
- { "install" : "scripts/install.js"
- , "postinstall" : "scripts/install.js"
- , "uninstall" : "scripts/uninstall.js"
+{
+ "scripts" : {
+ "install" : "scripts/install.js",
+ "postinstall" : "scripts/install.js",
+ "uninstall" : "scripts/uninstall.js"
}
}
```
@@ -225,10 +245,11 @@ If you want to run a make command, you can do so. This works just
fine:
```json
-{ "scripts" :
- { "preinstall" : "./configure"
- , "install" : "make && make install"
- , "test" : "make test"
+{
+ "scripts" : {
+ "preinstall" : "./configure",
+ "install" : "make && make install",
+ "test" : "make test"
}
}
```
diff --git a/docs/content/using-npm/semver.md b/docs/content/using-npm/semver.md
index 92c6381b7fe85..d8d7e1453ced7 100644
--- a/docs/content/using-npm/semver.md
+++ b/docs/content/using-npm/semver.md
@@ -1,3 +1,9 @@
+---
+section: using-npm
+title: semver
+description: The semantic versioner for npm
+---
+
semver(7) -- The semantic versioner for npm
===========================================
diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js
index f44e1bc4edec4..53f24e5f9834c 100644
--- a/docs/gatsby-config.js
+++ b/docs/gatsby-config.js
@@ -35,19 +35,11 @@ const OPTS = {
}
},
{
- resolve: 'gatsby-plugin-prefetch-google-fonts',
+ resolve: 'gatsby-plugin-google-fonts',
options: {
fonts: [
- {
- family: 'Poppins',
- subsets: ['latin'],
- variants: ['300', '400', '500']
- },
- {
- family: 'Inconsolata',
- subsets: ['latin'],
- variants: ['400', '700']
- }
+ 'Poppins',
+ 'Inconsolata'
]
}
},
diff --git a/docs/package-lock.json b/docs/package-lock.json
index 75bda15a6ee8d..bb1dac27d8430 100644
--- a/docs/package-lock.json
+++ b/docs/package-lock.json
@@ -3815,21 +3815,6 @@
}
}
},
- "clean-css": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz",
- "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==",
- "requires": {
- "source-map": "~0.6.0"
- },
- "dependencies": {
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
- }
- }
- },
"clean-stack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
@@ -7901,6 +7886,11 @@
"escape-string-regexp": "^1.0.5"
}
},
+ "gatsby-plugin-google-fonts": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/gatsby-plugin-google-fonts/-/gatsby-plugin-google-fonts-1.0.1.tgz",
+ "integrity": "sha512-p1NVkn27GUnDA5qHM+Z4cCcLCJIardzZXMon3640sT4xuL/AZJbsx3HEt2KY/5oZu0UXIkytkxzV2Da4rQeUIg=="
+ },
"gatsby-plugin-ipfs": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/gatsby-plugin-ipfs/-/gatsby-plugin-ipfs-2.0.2.tgz",
@@ -8065,129 +8055,6 @@
"micromatch": "^3.1.10"
}
},
- "gatsby-plugin-prefetch-google-fonts": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/gatsby-plugin-prefetch-google-fonts/-/gatsby-plugin-prefetch-google-fonts-1.4.3.tgz",
- "integrity": "sha512-rrNGpdLkSEQWksM1A1cJnL/wuu9GLfAl8oPQgpn3cmpKd4jnXk+nbLyQOwKQlRYSrzpju59dY8oyf4UfSFbqPg==",
- "requires": {
- "@babel/runtime": "^7.2.0",
- "clean-css": "^4.2.1",
- "download": "^7.1.0",
- "fs-extra": "^7.0.0",
- "get-urls": "^8.0.0",
- "globby": "^8.0.1",
- "google-fonts-plugin": "2.0.2",
- "object-hash": "^1.3.0"
- },
- "dependencies": {
- "@nodelib/fs.stat": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
- "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
- },
- "array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
- "requires": {
- "array-uniq": "^1.0.1"
- }
- },
- "arrify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
- },
- "dir-glob": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz",
- "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==",
- "requires": {
- "arrify": "^1.0.1",
- "path-type": "^3.0.0"
- }
- },
- "fast-glob": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
- "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
- "requires": {
- "@mrmlnc/readdir-enhanced": "^2.2.1",
- "@nodelib/fs.stat": "^1.1.2",
- "glob-parent": "^3.1.0",
- "is-glob": "^4.0.0",
- "merge2": "^1.2.3",
- "micromatch": "^3.1.10"
- }
- },
- "fs-extra": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
- "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
- "requires": {
- "graceful-fs": "^4.1.2",
- "jsonfile": "^4.0.0",
- "universalify": "^0.1.0"
- }
- },
- "glob-parent": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
- "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
- "requires": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
- },
- "dependencies": {
- "is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
- "requires": {
- "is-extglob": "^2.1.0"
- }
- }
- }
- },
- "globby": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz",
- "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==",
- "requires": {
- "array-union": "^1.0.1",
- "dir-glob": "2.0.0",
- "fast-glob": "^2.0.2",
- "glob": "^7.1.2",
- "ignore": "^3.3.5",
- "pify": "^3.0.0",
- "slash": "^1.0.0"
- }
- },
- "ignore": {
- "version": "3.3.10",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz",
- "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug=="
- },
- "path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
- },
- "slash": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
- "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU="
- }
- }
- },
"gatsby-plugin-react-helmet": {
"version": "3.1.18",
"resolved": "https://registry.npmjs.org/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.1.18.tgz",
@@ -8580,15 +8447,6 @@
"pump": "^3.0.0"
}
},
- "get-urls": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/get-urls/-/get-urls-8.0.0.tgz",
- "integrity": "sha512-9c6aVD6HqnpFjqWSoRzSGNo69hNnSa8EevNFVeIRSLYqYlIJNvtHgrqiQ1sUjHwbZPBY5gO1FMlVjmElfdneqw==",
- "requires": {
- "normalize-url": "^3.3.0",
- "url-regex": "^4.0.0"
- }
- },
"get-value": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
@@ -8735,29 +8593,6 @@
"delegate": "^3.1.2"
}
},
- "google-fonts-plugin": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/google-fonts-plugin/-/google-fonts-plugin-2.0.2.tgz",
- "integrity": "sha512-pWYFe6zoLA6uIUpSr/pkakf3DwA2fYgpStfe54AmkiKTHMCUILvtqihHaS2f4SqbTpdpEUYVTMMgvs2ur1ge8g==",
- "requires": {
- "axios": "^0.18.0",
- "cssnano": "^4.0.5",
- "mkdirp": "^0.5.1",
- "neon-js": "^1.1.2",
- "path": "^0.12.7"
- },
- "dependencies": {
- "axios": {
- "version": "0.18.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz",
- "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==",
- "requires": {
- "follow-redirects": "1.5.10",
- "is-buffer": "^2.0.2"
- }
- }
- }
- },
"got": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz",
@@ -11795,11 +11630,6 @@
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw=="
},
- "neon-js": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/neon-js/-/neon-js-1.1.2.tgz",
- "integrity": "sha1-r4XY4ruAmc/H9v4laolqVGSwBiM="
- },
"next-tick": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
@@ -12624,30 +12454,6 @@
"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
"integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
},
- "path": {
- "version": "0.12.7",
- "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
- "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
- "requires": {
- "process": "^0.11.1",
- "util": "^0.10.3"
- },
- "dependencies": {
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
- },
- "util": {
- "version": "0.10.4",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
- "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
- "requires": {
- "inherits": "2.0.3"
- }
- }
- }
- },
"path-browserify": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
@@ -16520,11 +16326,6 @@
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz",
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g="
},
- "tlds": {
- "version": "1.207.0",
- "resolved": "https://registry.npmjs.org/tlds/-/tlds-1.207.0.tgz",
- "integrity": "sha512-k7d7Q1LqjtAvhtEOs3yN14EabsNO8ZCoY6RESSJDB9lst3bTx3as/m1UuAeCKzYxiyhR1qq72ZPhpSf+qlqiwg=="
- },
"tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -17279,22 +17080,6 @@
"prepend-http": "^2.0.0"
}
},
- "url-regex": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-4.1.1.tgz",
- "integrity": "sha512-ViSDgDPNKkrQHI81GLCjdDN+Rsk3tAW/uLXlBOJxtcHzWZjta58Z0APXhfXzS89YszsheMnEvXeDXsWUB53wwA==",
- "requires": {
- "ip-regex": "^1.0.1",
- "tlds": "^1.187.0"
- },
- "dependencies": {
- "ip-regex": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz",
- "integrity": "sha1-3FiQdvZZ9BnCIgOaMzFvHHOH7/0="
- }
- }
- },
"url-to-options": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz",
diff --git a/docs/package.json b/docs/package.json
index 708dc1009c2d3..29f40f6d59c11 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -14,11 +14,11 @@
"gatsby": "^2.18.17",
"gatsby-image": "^2.2.37",
"gatsby-plugin-catch-links": "^2.1.21",
+ "gatsby-plugin-google-fonts": "^1.0.1",
"gatsby-plugin-ipfs": "^2.0.2",
"gatsby-plugin-manifest": "^2.2.34",
"gatsby-plugin-no-sourcemaps": "^2.1.1",
"gatsby-plugin-offline": "^3.0.30",
- "gatsby-plugin-prefetch-google-fonts": "^1.4.3",
"gatsby-plugin-react-helmet": "^3.1.18",
"gatsby-plugin-root-import": "^2.0.5",
"gatsby-plugin-sharp": "^2.3.10",
diff --git a/docs/src/components/FoundTypo.js b/docs/src/components/FoundTypo.js
index 5aca0894934dc..39877c402d833 100644
--- a/docs/src/components/FoundTypo.js
+++ b/docs/src/components/FoundTypo.js
@@ -13,8 +13,8 @@ const FoundTypo = () => {
๐ Found a typo? Let us know!
The current stable version of npm is here . To upgrade, run: npm install npm@latest -g
- To report bugs or submit feature requests for the docs, please post here .
- Submit npm issues here.
+ To report bugs or submit feature requests for the docs, please post here .
+ Submit npm issues here.
)
diff --git a/lib/access.js b/lib/access.js
index 6657f4b0717a1..e850c132eb24b 100644
--- a/lib/access.js
+++ b/lib/access.js
@@ -112,7 +112,7 @@ access.grant = ([perms, scopeteam, pkg], opts) => {
}
return modifyPackage(pkg, opts, (pkgName, opts) => {
return libaccess.grant(pkgName, scopeteam, perms, opts)
- })
+ }, false)
})
}
diff --git a/lib/ci.js b/lib/ci.js
index d5b5c15442512..04b2984a9ac0a 100644
--- a/lib/ci.js
+++ b/lib/ci.js
@@ -32,6 +32,10 @@ function ci (args, cb) {
dirPacker: pack.packGitDep
}
+ if (npm.config.get('dev')) {
+ log.warn('ci', 'Usage of the `--dev` option is deprecated. Use `--also=dev` instead.')
+ }
+
for (const key in npm.config.list[0]) {
if (!['log', 'cache'].includes(key)) {
opts[key] = npm.config.list[0][key]
diff --git a/lib/doctor/check-ping.js b/lib/doctor/check-ping.js
index 58f14fe69e1e0..d8eac459fd69b 100644
--- a/lib/doctor/check-ping.js
+++ b/lib/doctor/check-ping.js
@@ -6,7 +6,7 @@ function checkPing (cb) {
tracker.info('checkPing', 'Pinging registry')
ping({}, true, (err, pong) => {
if (err && err.code && err.code.match(/^E\d{3}$/)) {
- return cb(null, [err.code.substr(1)])
+ return cb(null, [err.code.substr(1), 'failed'])
} else {
cb(null, [200, 'ok'])
}
diff --git a/lib/explore.js b/lib/explore.js
index 0c9930f8e4ca7..32c93d6553ac9 100644
--- a/lib/explore.js
+++ b/lib/explore.js
@@ -23,14 +23,13 @@ function explore (args, cb) {
var opts = {cwd: cwd, stdio: 'inherit'}
var shellArgs = []
- if (args) {
+ if (args.length) {
if (isWindows) {
var execCmd = escapeExecPath(args.shift())
var execArgs = [execCmd].concat(args.map(escapeArg))
opts.windowsVerbatimArguments = true
shellArgs = ['/d', '/s', '/c'].concat(execArgs)
} else {
- shellArgs.unshift('-c')
shellArgs = ['-c', args.map(escapeArg).join(' ').trim()]
}
}
diff --git a/lib/fetch-package-metadata.js b/lib/fetch-package-metadata.js
index c4f46f513fed2..ebb378647b86b 100644
--- a/lib/fetch-package-metadata.js
+++ b/lib/fetch-package-metadata.js
@@ -3,6 +3,7 @@
const deprCheck = require('./utils/depr-check')
const path = require('path')
const log = require('npmlog')
+const pacote = require('pacote')
const readPackageTree = require('read-package-tree')
const rimraf = require('rimraf')
const validate = require('aproba')
@@ -11,15 +12,17 @@ const npm = require('./npm')
let npmConfig
const npmlog = require('npmlog')
const limit = require('call-limit')
-const tempFilename = require('./utils/temp-filename')
-const pacote = require('pacote')
+const tempFilename = require('./utils/temp-filename.js')
+const replaceInfo = require('./utils/replace-info.js')
const isWindows = require('./utils/is-windows.js')
function andLogAndFinish (spec, tracker, done) {
validate('SOF|SZF|OOF|OZF', [spec, tracker, done])
return (er, pkg) => {
if (er) {
- log.silly('fetchPackageMetaData', 'error for ' + String(spec), er.message)
+ er.message = replaceInfo(er.message)
+ var spc = replaceInfo(String(spec))
+ log.silly('fetchPackageMetaData', 'error for ' + spc, er.message)
if (tracker) tracker.finish()
}
return done(er, pkg)
diff --git a/lib/fund.js b/lib/fund.js
index 00954c844d798..e605ea8c3fd03 100644
--- a/lib/fund.js
+++ b/lib/fund.js
@@ -14,13 +14,14 @@ const readShrinkwrap = require('./install/read-shrinkwrap.js')
const mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js')
const output = require('./utils/output.js')
const openUrl = require('./utils/open-url.js')
-const { getFundingInfo, retrieveFunding, validFundingUrl } = require('./utils/funding.js')
+const { getFundingInfo, retrieveFunding, validFundingField, flatCacheSymbol } = require('./utils/funding.js')
const FundConfig = figgyPudding({
browser: {}, // used by ./utils/open-url
global: {},
json: {},
- unicode: {}
+ unicode: {},
+ which: {}
})
module.exports = fundCmd
@@ -29,7 +30,7 @@ const usage = require('./utils/usage')
fundCmd.usage = usage(
'fund',
'npm fund [--json]',
- 'npm fund [--browser] [[<@scope>/]'
+ 'npm fund [--browser] [[<@scope>/] [--which=]'
)
fundCmd.completion = function (opts, cb) {
@@ -52,96 +53,52 @@ function printJSON (fundingInfo) {
// level possible, in that process they also carry their dependencies along
// with them, moving those up in the visual tree
function printHuman (fundingInfo, opts) {
- // mapping logic that keeps track of seen items in order to be able
- // to push all other items from the same type/url in the same place
- const seen = new Map()
+ const flatCache = fundingInfo[flatCacheSymbol]
- function seenKey ({ type, url } = {}) {
- return url ? String(type) + String(url) : null
- }
-
- function setStackedItem (funding, result) {
- const key = seenKey(funding)
- if (key && !seen.has(key)) seen.set(key, result)
- }
+ const { name, version } = fundingInfo
+ const printableVersion = version ? `@${version}` : ''
- function retrieveStackedItem (funding) {
- const key = seenKey(funding)
- if (key && seen.has(key)) return seen.get(key)
- }
+ const items = Object.keys(flatCache).map((url) => {
+ const deps = flatCache[url]
- // ---
-
- const getFundingItems = (fundingItems) =>
- Object.keys(fundingItems || {}).map((fundingItemName) => {
- // first-level loop, prepare the pretty-printed formatted data
- const fundingItem = fundingItems[fundingItemName]
- const { version, funding } = fundingItem
- const { type, url } = funding || {}
+ const packages = deps.map((dep) => {
+ const { name, version } = dep
const printableVersion = version ? `@${version}` : ''
- const printableType = type && { label: `type: ${funding.type}` }
- const printableUrl = url && { label: `url: ${funding.url}` }
- const result = {
- fundingItem,
- label: fundingItemName + printableVersion,
- nodes: []
- }
-
- if (printableType) {
- result.nodes.push(printableType)
- }
-
- if (printableUrl) {
- result.nodes.push(printableUrl)
- }
-
- setStackedItem(funding, result)
-
- return result
- }).reduce((res, result) => {
- // recurse and exclude nodes that are going to be stacked together
- const { fundingItem } = result
- const { dependencies, funding } = fundingItem
- const items = getFundingItems(dependencies)
- const stackedResult = retrieveStackedItem(funding)
- items.forEach(i => result.nodes.push(i))
-
- if (stackedResult && stackedResult !== result) {
- stackedResult.label += `, ${result.label}`
- items.forEach(i => stackedResult.nodes.push(i))
- return res
- }
-
- res.push(result)
-
- return res
- }, [])
-
- const [ result ] = getFundingItems({
- [fundingInfo.name]: {
- dependencies: fundingInfo.dependencies,
- funding: fundingInfo.funding,
- version: fundingInfo.version
+ return `${name}${printableVersion}`
+ })
+
+ return {
+ label: url,
+ nodes: [packages.join(', ')]
}
})
- return archy(result, '', { unicode: opts.unicode })
+ return archy({ label: `${name}${printableVersion}`, nodes: items }, '', { unicode: opts.unicode })
}
-function openFundingUrl (packageName, cb) {
+function openFundingUrl (packageName, fundingSourceNumber, cb) {
function getUrlAndOpen (packageMetadata) {
const { funding } = packageMetadata
- const { type, url } = retrieveFunding(funding) || {}
- const noFundingError =
- new Error(`No funding method available for: ${packageName}`)
- noFundingError.code = 'ENOFUND'
- const typePrefix = type ? `${type} funding` : 'Funding'
- const msg = `${typePrefix} available at the following URL`
-
- if (validFundingUrl(funding)) {
+ const validSources = [].concat(retrieveFunding(funding)).filter(validFundingField)
+
+ if (validSources.length === 1 || (fundingSourceNumber > 0 && fundingSourceNumber <= validSources.length)) {
+ const { type, url } = validSources[fundingSourceNumber ? fundingSourceNumber - 1 : 0]
+ const typePrefix = type ? `${type} funding` : 'Funding'
+ const msg = `${typePrefix} available at the following URL`
openUrl(url, msg, cb)
+ } else if (!(fundingSourceNumber >= 1)) {
+ validSources.forEach(({ type, url }, i) => {
+ const typePrefix = type ? `${type} funding` : 'Funding'
+ const msg = `${typePrefix} available at the following URL`
+ console.log(`${i + 1}: ${msg}: ${url}`)
+ })
+ console.log('Run `npm fund [<@scope>/] --which=1`, for example, to open the first funding URL listed in that package')
+ cb()
} else {
+ const noFundingError = new Error(`No valid funding method available for: ${packageName}`)
+ noFundingError.code = 'ENOFUND'
+
throw noFundingError
}
}
@@ -161,15 +118,24 @@ function fundCmd (args, cb) {
const opts = FundConfig(npmConfig())
const dir = path.resolve(npm.dir, '..')
const packageName = args[0]
+ const numberArg = opts.which
+
+ const fundingSourceNumber = numberArg && parseInt(numberArg, 10)
+
+ if (numberArg !== undefined && (String(fundingSourceNumber) !== numberArg || fundingSourceNumber < 1)) {
+ const err = new Error('`npm fund [<@scope>/] [--which=fundingSourceNumber]` must be given a positive integer')
+ err.code = 'EFUNDNUMBER'
+ throw err
+ }
if (opts.global) {
- const err = new Error('`npm fund` does not support globals')
+ const err = new Error('`npm fund` does not support global packages')
err.code = 'EFUNDGLOBAL'
throw err
}
if (packageName) {
- openFundingUrl(packageName, cb)
+ openFundingUrl(packageName, fundingSourceNumber, cb)
return
}
diff --git a/lib/hook.js b/lib/hook.js
index 54aea9f1e9d20..4d980cf95d15e 100644
--- a/lib/hook.js
+++ b/lib/hook.js
@@ -10,6 +10,7 @@ const pudding = require('figgy-pudding')
const relativeDate = require('tiny-relative-date')
const Table = require('cli-table3')
const validate = require('aproba')
+const npm = require('./npm')
hook.usage = [
'npm hook add [--type=]',
@@ -40,6 +41,10 @@ module.exports = (args, cb) => BB.try(() => hook(args)).then(
err => err.code === 'EUSAGE' ? cb(err.message) : cb(err)
)
function hook (args) {
+ if (args.length === 4) { // secret is passed in the args
+ // we have the user secret in the CLI args, we need to redact it from the referer.
+ redactUserSecret()
+ }
return otplease(npmConfig(), opts => {
opts = HookConfig(opts)
switch (args[0]) {
@@ -150,3 +155,11 @@ function hookName (hook) {
if (hook.type === 'owner') { target = '~' + target }
return target
}
+
+function redactUserSecret () {
+ const referer = npm.referer
+ if (!referer) return
+ const splittedReferer = referer.split(' ')
+ splittedReferer[4] = '[REDACTED]'
+ npm.referer = splittedReferer.join(' ')
+}
diff --git a/lib/init.js b/lib/init.js
index 9d873689f6b7e..41995abe22bbf 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -63,7 +63,7 @@ function init (args, cb) {
'This utility will walk you through creating a package.json file.',
'It only covers the most common items, and tries to guess sensible defaults.',
'',
- 'See `npm help json` for definitive documentation on these fields',
+ 'See `npm help init` for definitive documentation on these fields',
'and exactly what they do.',
'',
'Use `npm install ` afterwards to install a package and',
diff --git a/lib/install.js b/lib/install.js
index 378ada7b05c06..082eda5165e3f 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -197,7 +197,7 @@ function install (where, args, cb) {
var dryrun = !!npm.config.get('dry-run')
if (npm.config.get('dev')) {
- log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--only=dev` instead.')
+ log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--also=dev` instead.')
}
if (where === globalTop && !args.length) {
@@ -650,6 +650,9 @@ Installer.prototype.saveToDependencies = function (cb) {
validate('F', arguments)
if (this.failing) return cb()
log.silly('install', 'saveToDependencies')
+ // Note idealTree will be mutated during the save operations below as the
+ // package is reloaded from disk to preserve additional details. This means
+ // steps after postInstall will see a slightly different package object.
if (this.saveOnlyLock) {
saveShrinkwrap(this.idealTree, cb)
} else {
diff --git a/lib/install/deps.js b/lib/install/deps.js
index 3d8b333c64441..960dd375d05bb 100644
--- a/lib/install/deps.js
+++ b/lib/install/deps.js
@@ -74,7 +74,10 @@ function doesChildVersionMatch (child, requested, requestor) {
var childReq = child.package._requested
if (childReq) {
if (childReq.rawSpec === requested.rawSpec) return true
- if (childReq.type === requested.type && childReq.saveSpec === requested.saveSpec) return true
+ if (childReq.type === requested.type) {
+ if (childReq.saveSpec === requested.saveSpec) return true
+ if ((childReq.fetchSpec === requested.fetchSpec) && requested.type !== 'git') return true
+ }
}
// If _requested didn't exist OR if it didn't match then we'll try using
// _from. We pass it through npa to normalize the specifier.
@@ -200,6 +203,7 @@ function removeObsoleteDep (child, log) {
})
}
+exports.packageRelativePath = packageRelativePath
function packageRelativePath (tree) {
if (!tree) return ''
var requested = tree.package._requested || {}
@@ -570,7 +574,7 @@ function addDependency (name, versionSpec, tree, log, done) {
try {
var req = childDependencySpecifier(tree, name, versionSpec)
if (tree.swRequires && tree.swRequires[name]) {
- var swReq = childDependencySpecifier(tree, name, tree.swRequires[name], tree.package._where)
+ var swReq = childDependencySpecifier(tree, name, tree.swRequires[name])
}
} catch (err) {
return done(err)
diff --git a/lib/install/get-requested.js b/lib/install/get-requested.js
index ab410ffc9b6e3..df0eec6f6a631 100644
--- a/lib/install/get-requested.js
+++ b/lib/install/get-requested.js
@@ -1,12 +1,15 @@
'use strict'
const npa = require('npm-package-arg')
const moduleName = require('../utils/module-name.js')
-
+const packageRelativePath = require('./deps').packageRelativePath
module.exports = function (child, reqBy) {
if (!child.requiredBy.length) return
if (!reqBy) reqBy = child.requiredBy[0]
const deps = reqBy.package.dependencies || {}
const devDeps = reqBy.package.devDependencies || {}
+ const optDeps = reqBy.package.optionalDependencies || {}
const name = moduleName(child)
- return npa.resolve(name, deps[name] || devDeps[name], reqBy.realpath)
+ const spec = deps[name] || devDeps[name] || optDeps[name]
+ const where = packageRelativePath(reqBy)
+ return npa.resolve(name, spec, where)
}
diff --git a/lib/install/inflate-shrinkwrap.js b/lib/install/inflate-shrinkwrap.js
index 1ec4f9ba6dcfd..f89aa815497a1 100644
--- a/lib/install/inflate-shrinkwrap.js
+++ b/lib/install/inflate-shrinkwrap.js
@@ -52,6 +52,14 @@ function inflateShrinkwrap (topPath, tree, swdeps, opts) {
const sw = swdeps[name]
const dependencies = sw.dependencies || {}
const requested = realizeShrinkwrapSpecifier(name, sw, topPath)
+
+ if (Object.keys(sw).length === 0) {
+ let message = `Object for dependency "${name}" is empty.\n`
+ message += 'Something went wrong. Regenerate the package-lock.json with "npm install".\n'
+ message += 'If using a shrinkwrap, regenerate with "npm shrinkwrap".'
+ return Promise.reject(new Error(message))
+ }
+
return inflatableChild(
onDisk[name], name, topPath, tree, sw, requested, opts
).then((child) => {
@@ -89,6 +97,20 @@ function tarballToVersion (name, tb) {
return match[2] || match[1]
}
+function relativizeLink (name, spec, topPath, requested) {
+ if (!spec.startsWith('file:')) {
+ return
+ }
+
+ let requestedPath = requested.fetchSpec
+ if (requested.type === 'file') {
+ requestedPath = path.dirname(requestedPath)
+ }
+
+ const relativized = path.relative(requestedPath, path.resolve(topPath, spec.slice(5)))
+ return 'file:' + relativized
+}
+
function inflatableChild (onDiskChild, name, topPath, tree, sw, requested, opts) {
validate('OSSOOOO|ZSSOOOO', arguments)
const usesIntegrity = (
@@ -101,7 +123,14 @@ function inflatableChild (onDiskChild, name, topPath, tree, sw, requested, opts)
sw.resolved = sw.version
sw.version = regTarball
}
- if (sw.requires) Object.keys(sw.requires).map(_ => { sw.requires[_] = tarballToVersion(_, sw.requires[_]) || sw.requires[_] })
+ if (sw.requires) {
+ Object.keys(sw.requires).forEach(name => {
+ const spec = sw.requires[name]
+ sw.requires[name] = tarballToVersion(name, spec) ||
+ relativizeLink(name, spec, topPath, requested) ||
+ spec
+ })
+ }
const modernLink = requested.type === 'directory' && !sw.from
if (hasModernMeta(onDiskChild) && childIsEquivalent(sw, requested, onDiskChild)) {
// The version on disk matches the shrinkwrap entry.
diff --git a/lib/install/save.js b/lib/install/save.js
index 92b44a108099b..986233a516a7c 100644
--- a/lib/install/save.js
+++ b/lib/install/save.js
@@ -8,6 +8,7 @@ const iferr = require('iferr')
const log = require('npmlog')
const moduleName = require('../utils/module-name.js')
const npm = require('../npm.js')
+const packageId = require('../utils/package-id.js')
const parseJSON = require('../utils/parse-json.js')
const path = require('path')
const stringifyPackage = require('stringify-package')
@@ -131,6 +132,9 @@ function savePackageJson (tree, next) {
} else {
writeFileAtomic(saveTarget, json, next)
}
+
+ // Restore derived id as it was removed when reloading from disk
+ tree.package._id = packageId(tree.package)
}))
}
diff --git a/lib/ls.js b/lib/ls.js
index 78a2b1d791c7d..c333f236bad31 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -545,7 +545,7 @@ function makeParseable_ (data, long, dir, depth, parent, d) {
return data.path +
':' + (data._id || '') +
- ':' + (data.realPath !== data.path ? data.realPath : '') +
+ (data.link && data.link !== data.path ? ':' + data.link : '') +
(data.extraneous ? ':EXTRANEOUS' : '') +
(data.error && data.path !== path.resolve(npm.globalDir, '..') ? ':ERROR' : '') +
(data.invalid ? ':INVALID' : '') +
diff --git a/lib/team.js b/lib/team.js
index 2b56e3b14f95b..e24f733475a23 100644
--- a/lib/team.js
+++ b/lib/team.js
@@ -14,10 +14,10 @@ team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit']
team.usage = usage(
'team',
- 'npm team create \n' +
- 'npm team destroy \n' +
- 'npm team add \n' +
- 'npm team rm \n' +
+ 'npm team create [--otp ]\n' +
+ 'npm team destroy [--otp ]\n' +
+ 'npm team add [--otp ]\n' +
+ 'npm team rm [--otp ]\n' +
'npm team ls |\n' +
'npm team edit '
)
diff --git a/lib/unpublish.js b/lib/unpublish.js
index 203c8b592f109..59d7d1b5887d2 100644
--- a/lib/unpublish.js
+++ b/lib/unpublish.js
@@ -20,7 +20,11 @@ const readJson = BB.promisify(require('read-package-json'))
const usage = require('./utils/usage.js')
const whoami = BB.promisify(require('./whoami.js'))
-unpublish.usage = usage('npm unpublish [<@scope>/][@]')
+unpublish.usage = usage(
+ 'unpublish',
+ '\nnpm unpublish [<@scope>/]@' +
+ '\nnpm unpublish [<@scope>/] --force'
+)
function UsageError () {
throw Object.assign(new Error(`Usage: ${unpublish.usage}`), {
@@ -75,7 +79,7 @@ function unpublish (args, cb) {
'Refusing to delete entire project.\n' +
'Run with --force to do this.\n' +
unpublish.usage
- ), {code: 'EUSAGE'})
+ ), { code: 'EUSAGE' })
}
if (!spec || path.resolve(spec.name) === npm.localPrefix) {
// if there's a package.json in the current folder, then
diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js
index 39e0035c27288..902ad7af9b328 100644
--- a/lib/utils/error-handler.js
+++ b/lib/utils/error-handler.js
@@ -12,6 +12,7 @@ var exitCode = 0
var rollbacks = npm.rollbacks
var chain = require('slide').chain
var errorMessage = require('./error-message.js')
+var replaceInfo = require('./replace-info.js')
var stopMetrics = require('./metrics.js').stop
const cacheFile = require('./cache-file.js')
@@ -36,7 +37,7 @@ process.on('timing', function (name, value) {
process.on('exit', function (code) {
process.emit('timeEnd', 'npm')
log.disableProgress()
- if (npm.config.loaded && npm.config.get('timing')) {
+ if (npm.config && npm.config.loaded && npm.config.get('timing')) {
try {
timings.logfile = getLogFile()
cacheFile.append('_timing.json', JSON.stringify(timings) + '\n')
@@ -64,7 +65,7 @@ process.on('exit', function (code) {
log.verbose('code', code)
}
}
- if (npm.config.loaded && npm.config.get('timing') && !wroteLogFile) writeLogFile()
+ if (npm.config && npm.config.loaded && npm.config.get('timing') && !wroteLogFile) writeLogFile()
if (wroteLogFile) {
// just a line break
if (log.levels[log.level] <= log.levels.error) console.error('')
@@ -79,7 +80,7 @@ process.on('exit', function (code) {
wroteLogFile = false
}
- var doExit = npm.config.loaded && npm.config.get('_exit')
+ var doExit = npm.config && npm.config.loaded && npm.config.get('_exit')
if (doExit) {
// actually exit.
if (exitCode === 0 && !itWorked) {
@@ -94,7 +95,7 @@ process.on('exit', function (code) {
function exit (code, noLog) {
exitCode = exitCode || process.exitCode || code
- var doExit = npm.config.loaded ? npm.config.get('_exit') : true
+ var doExit = npm.config && npm.config.loaded ? npm.config.get('_exit') : true
log.verbose('exit', [code, doExit])
if (log.level === 'silent') noLog = true
@@ -175,14 +176,16 @@ function errorHandler (er) {
].forEach(function (k) {
var v = er[k]
if (!v) return
+ v = replaceInfo(v)
log.verbose(k, v)
})
log.verbose('cwd', process.cwd())
var os = require('os')
+ var args = replaceInfo(process.argv)
log.verbose('', os.type() + ' ' + os.release())
- log.verbose('argv', process.argv.map(JSON.stringify).join(' '))
+ log.verbose('argv', args.map(JSON.stringify).join(' '))
log.verbose('node', process.version)
log.verbose('npm ', 'v' + npm.version)
diff --git a/lib/utils/error-message.js b/lib/utils/error-message.js
index 12f304d1e894a..78ccdeeb533d6 100644
--- a/lib/utils/error-message.js
+++ b/lib/utils/error-message.js
@@ -3,12 +3,17 @@ var npm = require('../npm.js')
var util = require('util')
var nameValidator = require('validate-npm-package-name')
var npmlog = require('npmlog')
+var replaceInfo = require('./replace-info.js')
module.exports = errorMessage
function errorMessage (er) {
var short = []
var detail = []
+
+ er.message = replaceInfo(er.message)
+ er.stack = replaceInfo(er.stack)
+
switch (er.code) {
case 'ENOAUDIT':
short.push(['audit', er.message])
@@ -35,9 +40,9 @@ function errorMessage (er) {
case 'EACCES':
case 'EPERM':
const isCachePath = typeof er.path === 'string' &&
- er.path.startsWith(npm.config.get('cache'))
+ npm.config && er.path.startsWith(npm.config.get('cache'))
const isCacheDest = typeof er.dest === 'string' &&
- er.dest.startsWith(npm.config.get('cache'))
+ npm.config && er.dest.startsWith(npm.config.get('cache'))
const isWindows = process.platform === 'win32'
diff --git a/lib/utils/funding.js b/lib/utils/funding.js
index c3d06b1089963..5375639109ee2 100644
--- a/lib/utils/funding.js
+++ b/lib/utils/funding.js
@@ -4,22 +4,31 @@ const URL = require('url').URL
exports.getFundingInfo = getFundingInfo
exports.retrieveFunding = retrieveFunding
-exports.validFundingUrl = validFundingUrl
+exports.validFundingField = validFundingField
-// supports both object funding and string shorthand
+const flatCacheSymbol = Symbol('npm flat cache')
+exports.flatCacheSymbol = flatCacheSymbol
+
+// supports object funding and string shorthand, or an array of these
+// if original was an array, returns an array; else returns the lone item
function retrieveFunding (funding) {
- return typeof funding === 'string'
- ? {
- url: funding
- }
- : funding
+ const sources = [].concat(funding || []).map(item => (
+ typeof item === 'string'
+ ? { url: item }
+ : item
+ ))
+ return Array.isArray(funding) ? sources : sources[0]
}
// Is the value of a `funding` property of a `package.json`
// a valid type+url for `npm fund` to display?
-function validFundingUrl (funding) {
+function validFundingField (funding) {
if (!funding) return false
+ if (Array.isArray(funding)) {
+ return funding.every(f => !Array.isArray(f) && validFundingField(f))
+ }
+
try {
var parsed = new URL(funding.url || funding)
} catch (error) {
@@ -34,11 +43,13 @@ function validFundingUrl (funding) {
return Boolean(parsed.host)
}
+const empty = () => Object.create(null)
+
function getFundingInfo (idealTree, opts) {
- let length = 0
+ let packageWithFundingCount = 0
+ const flat = empty()
const seen = new Set()
const { countOnly } = opts || {}
- const empty = () => Object.create(null)
const _trailingDependencies = Symbol('trailingDependencies')
function tracked (name, version) {
@@ -70,52 +81,70 @@ function getFundingInfo (idealTree, opts) {
)
}
+ function addToFlatCache (funding, dep) {
+ [].concat(funding || []).forEach((f) => {
+ const key = f.url
+ if (!Array.isArray(flat[key])) {
+ flat[key] = []
+ }
+ flat[key].push(dep)
+ })
+ }
+
+ function attachFundingInfo (target, funding, dep) {
+ if (funding && validFundingField(funding)) {
+ target.funding = retrieveFunding(funding)
+ if (!countOnly) {
+ addToFlatCache(target.funding, dep)
+ }
+
+ packageWithFundingCount++
+ }
+ }
+
function getFundingDependencies (tree) {
const deps = tree && tree.dependencies
if (!deps) return empty()
- // broken into two steps to make sure items appearance
- // within top levels takes precedence over nested ones
- return (Object.keys(deps)).map((key) => {
+ const directDepsWithFunding = Object.keys(deps).map((key) => {
const dep = deps[key]
const { name, funding, version } = dep
- const fundingItem = {}
-
// avoids duplicated items within the funding tree
if (tracked(name, version)) return empty()
+ const fundingItem = {}
+
if (version) {
fundingItem.version = version
}
- if (funding && validFundingUrl(funding)) {
- fundingItem.funding = retrieveFunding(funding)
- length++
- }
+ attachFundingInfo(fundingItem, funding, dep)
return {
dep,
fundingItem
}
- }).reduce((res, { dep, fundingItem }, i) => {
- if (!fundingItem) return res
+ })
+
+ return directDepsWithFunding.reduce((res, { dep: directDep, fundingItem }, i) => {
+ if (!fundingItem || fundingItem.length === 0) return res
// recurse
- const dependencies = dep.dependencies &&
- Object.keys(dep.dependencies).length > 0 &&
- getFundingDependencies(dep)
+ const transitiveDependencies = directDep.dependencies &&
+ Object.keys(directDep.dependencies).length > 0 &&
+ getFundingDependencies(directDep)
// if we're only counting items there's no need
// to add all the data to the resulting object
if (countOnly) return null
- if (hasDependencies(dependencies)) {
- fundingItem.dependencies = retrieveDependencies(dependencies)
+ if (hasDependencies(transitiveDependencies)) {
+ fundingItem.dependencies = retrieveDependencies(transitiveDependencies)
}
- if (fundingItem.funding) {
- res[dep.name] = fundingItem
+ if (fundingItem.funding && fundingItem.funding.length !== 0) {
+ res[directDep.name] = fundingItem
} else if (fundingItem.dependencies) {
res[_trailingDependencies] =
Object.assign(
@@ -126,12 +155,12 @@ function getFundingInfo (idealTree, opts) {
}
return res
- }, empty())
+ }, countOnly ? null : empty())
}
const idealTreeDependencies = getFundingDependencies(idealTree)
const result = {
- length
+ length: packageWithFundingCount
}
if (!countOnly) {
@@ -145,8 +174,9 @@ function getFundingInfo (idealTree, opts) {
result.funding = retrieveFunding(idealTree.funding)
}
- result.dependencies =
- retrieveDependencies(idealTreeDependencies)
+ result.dependencies = retrieveDependencies(idealTreeDependencies)
+
+ result[flatCacheSymbol] = flat
}
return result
diff --git a/lib/utils/replace-info.js b/lib/utils/replace-info.js
new file mode 100644
index 0000000000000..36e35b0785ab0
--- /dev/null
+++ b/lib/utils/replace-info.js
@@ -0,0 +1,22 @@
+const URL = require('url').URL
+
+// replaces auth info in an array
+// of arguments or in a strings
+function replaceInfo (arg) {
+ const isArray = Array.isArray(arg)
+ const isString = typeof arg === 'string'
+
+ if (!isArray && !isString) return arg
+
+ const args = isString ? arg.split(' ') : arg
+ const info = args.map(arg => {
+ try {
+ const url = new URL(arg)
+ return url.password === '' ? arg : arg.replace(url.password, '***')
+ } catch (e) { return arg }
+ })
+
+ return isString ? info.join(' ') : info
+}
+
+module.exports = replaceInfo
diff --git a/lib/utils/unsupported.js b/lib/utils/unsupported.js
index c34e17374e040..c78cdcbc29494 100644
--- a/lib/utils/unsupported.js
+++ b/lib/utils/unsupported.js
@@ -1,23 +1,14 @@
'use strict'
var semver = require('semver')
-var supportedNode = [
- {ver: '6', min: '6.0.0'},
- {ver: '8', min: '8.0.0'},
- {ver: '9', min: '9.0.0'},
- {ver: '10', min: '10.0.0'},
- {ver: '11', min: '11.0.0'},
- {ver: '12', min: '12.0.0'},
- {ver: '13', min: '13.0.0'},
- {ver: '14', min: '14.0.0'}
-]
-var knownBroken = '<6.2.0 || 9.0 - 9.2'
+var supported = require('../../package.json').engines.node
+var knownBroken = '<6.2.0 || 9 <9.3.0'
var checkVersion = exports.checkVersion = function (version) {
var versionNoPrerelease = version.replace(/-.*$/, '')
return {
version: versionNoPrerelease,
broken: semver.satisfies(versionNoPrerelease, knownBroken),
- unsupported: !semver.satisfies(versionNoPrerelease, supportedNode.map(function (n) { return '^' + n.min }).join('||'))
+ unsupported: !semver.satisfies(versionNoPrerelease, supported)
}
}
@@ -25,18 +16,8 @@ exports.checkForBrokenNode = function () {
var nodejs = checkVersion(process.version)
if (nodejs.broken) {
console.error('ERROR: npm is known not to run on Node.js ' + process.version)
- supportedNode.forEach(function (rel) {
- if (semver.satisfies(nodejs.version, rel.ver)) {
- console.error('Node.js ' + rel.ver + " is supported but the specific version you're running has")
- console.error('a bug known to break npm. Please update to at least ' + rel.min + ' to use this')
- console.error('version of npm. You can find the latest release of Node.js at https://nodejs.org/')
- process.exit(1)
- }
- })
- var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
- console.error("You'll need to upgrade to a newer version in order to use this")
- console.error('version of npm. Supported versions are ' + supportedMajors + '. You can find the')
- console.error('latest version at https://nodejs.org/')
+ console.error("You'll need to upgrade to a newer Node.js version in order to use this")
+ console.error('version of npm. You can find the latest version at https://nodejs.org/')
process.exit(1)
}
}
@@ -45,11 +26,9 @@ exports.checkForUnsupportedNode = function () {
var nodejs = checkVersion(process.version)
if (nodejs.unsupported) {
var log = require('npmlog')
- var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
log.warn('npm', 'npm does not support Node.js ' + process.version)
log.warn('npm', 'You should probably upgrade to a newer version of node as we')
log.warn('npm', "can't make any promises that npm will work with this version.")
- log.warn('npm', 'Supported releases of Node.js are the latest release of ' + supportedMajors + '.')
log.warn('npm', 'You can find the latest version at https://nodejs.org/')
}
}
diff --git a/node_modules/.gitignore b/node_modules/.gitignore
index fa76105d97b99..57861945609db 100644
--- a/node_modules/.gitignore
+++ b/node_modules/.gitignore
@@ -1,4 +1,6 @@
## Automatically generated dev dependency ignores
+CODE_OF_CONDUCT.md
+CONTRIBUTING.md
/@babel/code-frame
/@babel/generator
/@babel/helper-function-name
@@ -10,10 +12,6 @@
/@babel/traverse
/@babel/types
/@blueoak/list
-/@types/caseless
-/@types/node
-/@types/request
-/@types/tough-cookie
/acorn
/acorn-jsx
/ajv-keywords
@@ -27,7 +25,6 @@
/bind-obj-methods
/bl
/browser-process-hrtime
-/browser-request
/builtin-modules
/caching-transform
/caller
@@ -38,16 +35,11 @@
/clean-yaml-object
/cli-cursor
/cli-width
-/cloudant-follow
-/coffee-script
/color-support
-/commander
/commondir
-/connect
/contains-path
/convert-source-map
/correct-license-metadata
-/couchapp
/coveralls
/cp-file
/debug-log
@@ -59,13 +51,8 @@
/docopt
/doctrine
/domain-browser
-/ee-first
-/emoji-regex
-/encodeurl
/error-ex
-/errs
/es6-error
-/escape-html
/eslint
/eslint-config-standard
/eslint-config-standard-jsx
@@ -90,9 +77,9 @@
/fast-levenshtein
/figures
/file-entry-cache
-/finalhandler
/find-cache-dir
/find-root
+/find-up
/flat-cache
/foreground-child
/fs-access
@@ -103,11 +90,10 @@
/get-stdin
/globals
/growl
-/handlebars
/has-ansi
/hasha
/hock
-/http-proxy
+/html-escaper
/ignore
/inquirer
/is-arrayish
@@ -122,7 +108,6 @@
/js-tokens
/js-yaml
/jsesc
-/json
/json-parse-errback
/json-stable-stringify-without-jsonify
/jsx-ast-utils
@@ -130,46 +115,46 @@
/levn
/licensee
/load-json-file
+/locate-path
/lodash
/lodash.flattendeep
/log-driver
/loose-envify
/make-error
+/map-age-cleaner
/marked
/marked-man
/merge-source-map
/mimic-fn
/minipass
-/nano
/natural-compare
-/neo-async
/nested-error-stacks
+/nice-try
/npm-license-corrections
-/npm-registry-couchapp
/npm-registry-mock
/null-check
/nyc
-/on-finished
/onetime
-/optimist
/optionator
/own-or
/own-or-env
+/p-defer
+/p-is-promise
+/p-limit
+/p-locate
+/p-try
/package-hash
/parse-json
-/parseurl
/path-type
/pinkie
/pinkie-promise
/pkg-conf
/pkg-config
/pkg-dir
-/pkginfo
/pluralize
/prelude-ls
/progress
/prop-types
-/querystring
/read-pkg
/read-pkg-up
/release-zalgo
@@ -195,7 +180,6 @@
/stack-utils
/standard
/standard-engine
-/statuses
/strip-bom
/table
/tacks
@@ -213,12 +197,8 @@
/tsame
/type-check
/typescript
-/uglify-js
/unicode-length
/uniq
-/url
-/utils-merge
-/watch
/wordwrap
/write
/yapool
diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/are-we-there-yet/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/are-we-there-yet/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/node_modules/bcrypt-pbkdf/CONTRIBUTING.md
deleted file mode 100644
index 401d34ed5c7a3..0000000000000
--- a/node_modules/bcrypt-pbkdf/CONTRIBUTING.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Contributing
-
-This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new
-changes. Anyone can submit changes. To get started, see the [cr.joyent.us user
-guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md).
-This repo does not use GitHub pull requests.
-
-See the [Joyent Engineering
-Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general
-best practices expected in this repository.
-
-If you're changing something non-trivial or user-facing, you may want to submit
-an issue first.
diff --git a/node_modules/bin-links/CHANGELOG.md b/node_modules/bin-links/CHANGELOG.md
index e7b640c08d13f..48860e2b78e38 100644
--- a/node_modules/bin-links/CHANGELOG.md
+++ b/node_modules/bin-links/CHANGELOG.md
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [1.1.8](https://github.com/npm/bin-links/compare/v1.1.7...v1.1.8) (2020-03-24)
+
+
+
## [1.1.7](https://github.com/npm/bin-links/compare/v1.1.6...v1.1.7) (2019-12-26)
diff --git a/node_modules/bin-links/package.json b/node_modules/bin-links/package.json
index 45393d11c5fc8..2a2659dfa8231 100644
--- a/node_modules/bin-links/package.json
+++ b/node_modules/bin-links/package.json
@@ -1,19 +1,19 @@
{
- "_from": "bin-links@1.1.7",
- "_id": "bin-links@1.1.7",
+ "_from": "bin-links@1.1.8",
+ "_id": "bin-links@1.1.8",
"_inBundle": false,
- "_integrity": "sha512-/eaLaTu7G7/o7PV04QPy1HRT65zf+1tFkPGv0sPTV0tRwufooYBQO3zrcyGgm+ja+ZtBf2GEuKjDRJ2pPG+yqA==",
+ "_integrity": "sha512-KgmVfx+QqggqP9dA3iIc5pA4T1qEEEL+hOhOhNPaUm77OTrJoOXE/C05SJLNJe6m/2wUK7F1tDSou7n5TfCDzQ==",
"_location": "/bin-links",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "bin-links@1.1.7",
+ "raw": "bin-links@1.1.8",
"name": "bin-links",
"escapedName": "bin-links",
- "rawSpec": "1.1.7",
+ "rawSpec": "1.1.8",
"saveSpec": null,
- "fetchSpec": "1.1.7"
+ "fetchSpec": "1.1.8"
},
"_requiredBy": [
"#USER",
@@ -21,10 +21,10 @@
"/libcipm",
"/libnpm"
],
- "_resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.7.tgz",
- "_shasum": "34b79ea9d0e575d7308afeff0c6b2fc24c793359",
- "_spec": "bin-links@1.1.7",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.8.tgz",
+ "_shasum": "bd39aadab5dc4bdac222a07df5baf1af745b2228",
+ "_spec": "bin-links@1.1.8",
+ "_where": "/Users/claudiahdz/npm/cli",
"author": {
"name": "Mike Sherov"
},
@@ -48,9 +48,7 @@
"rimraf": "^2.6.3",
"standard": "^10.0.3",
"standard-version": "^4.4.0",
- "tap": "^12.1.3",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
+ "tap": "^12.1.3"
},
"files": [
"index.js"
@@ -64,6 +62,9 @@
"license": "Artistic-2.0",
"main": "index.js",
"name": "bin-links",
+ "publishConfig": {
+ "tag": "legacy"
+ },
"repository": {
"type": "git",
"url": "git://github.com/npm/bin-links.git"
@@ -73,9 +74,7 @@
"posttest": "standard",
"prerelease": "npm t",
"release": "standard-version -s",
- "test": "tap -J --nyc-arg=--all --coverage test/*.js --100",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ "test": "tap -J --nyc-arg=--all --coverage test/*.js --100"
},
- "version": "1.1.7"
+ "version": "1.1.8"
}
diff --git a/node_modules/bl/bl.js b/node_modules/bl/bl.js
index e0eef85a3b67c..3e5512790cd77 100644
--- a/node_modules/bl/bl.js
+++ b/node_modules/bl/bl.js
@@ -185,18 +185,22 @@ BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
if (bytes > l) {
this._bufs[i].copy(dst, bufoff, start)
+ bufoff += l
} else {
this._bufs[i].copy(dst, bufoff, start, start + bytes)
+ bufoff += l
break
}
- bufoff += l
bytes -= l
if (start)
start = 0
}
+ // safeguard so that we don't return uninitialized memory
+ if (dst.length > bufoff) return dst.slice(0, bufoff)
+
return dst
}
@@ -232,6 +236,11 @@ BufferList.prototype.toString = function toString (encoding, start, end) {
}
BufferList.prototype.consume = function consume (bytes) {
+ // first, normalize the argument, in accordance with how Buffer does it
+ bytes = Math.trunc(bytes)
+ // do nothing if not a positive number
+ if (Number.isNaN(bytes) || bytes <= 0) return this
+
while (this._bufs.length) {
if (bytes >= this._bufs[0].length) {
bytes -= this._bufs[0].length
diff --git a/node_modules/bl/package.json b/node_modules/bl/package.json
index 85611a6cb5c47..3dbbf698d2bae 100644
--- a/node_modules/bl/package.json
+++ b/node_modules/bl/package.json
@@ -1,27 +1,29 @@
{
- "_from": "bl@^3.0.0",
- "_id": "bl@3.0.0",
+ "_from": "bl@3.0.1",
+ "_id": "bl@3.0.1",
"_inBundle": false,
- "_integrity": "sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==",
+ "_integrity": "sha512-jrCW5ZhfQ/Vt07WX1Ngs+yn9BDqPL/gw28S7s9H6QK/gupnizNzJAss5akW20ISgOrbLTlXOOCTJeNUQqruAWQ==",
"_location": "/bl",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "bl@^3.0.0",
+ "raw": "bl@3.0.1",
"name": "bl",
"escapedName": "bl",
- "rawSpec": "^3.0.0",
+ "rawSpec": "3.0.1",
"saveSpec": null,
- "fetchSpec": "^3.0.0"
+ "fetchSpec": "3.0.1"
},
"_requiredBy": [
+ "#DEV:/",
+ "#USER",
"/tar-stream"
],
- "_resolved": "https://registry.npmjs.org/bl/-/bl-3.0.0.tgz",
- "_shasum": "3611ec00579fd18561754360b21e9f784500ff88",
- "_spec": "bl@^3.0.0",
- "_where": "/Users/aeschright/code/cli/node_modules/tar-stream",
+ "_resolved": "https://registry.npmjs.org/bl/-/bl-3.0.1.tgz",
+ "_shasum": "1cbb439299609e419b5a74d7fce2f8b37d8e5c6f",
+ "_spec": "bl@3.0.1",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/npm/cli",
"authors": [
"Rod Vagg (https://github.com/rvagg)",
"Matteo Collina (https://github.com/mcollina)",
@@ -58,5 +60,5 @@
"scripts": {
"test": "node test/test.js | faucet"
},
- "version": "3.0.0"
+ "version": "3.0.1"
}
diff --git a/node_modules/bl/test/test.js b/node_modules/bl/test/test.js
index 1da0293b6d146..d8e552d8a8148 100644
--- a/node_modules/bl/test/test.js
+++ b/node_modules/bl/test/test.js
@@ -431,6 +431,22 @@ tape('test toString encoding', function (t) {
t.end()
})
+tape('uninitialized memory', function (t) {
+ const secret = crypto.randomBytes(256)
+ for (let i = 0; i < 1e6; i++) {
+ const clone = Buffer.from(secret)
+ const bl = new BufferList()
+ bl.append(Buffer.from('a'))
+ bl.consume(-1024)
+ const buf = bl.slice(1)
+ if (buf.indexOf(clone) !== -1) {
+ t.fail(`Match (at ${i})`)
+ break
+ }
+ }
+ t.end()
+})
+
!process.browser && tape('test stream', function (t) {
var random = crypto.randomBytes(65534)
, rndhash = hash(random, 'md5')
diff --git a/node_modules/chownr/chownr.js b/node_modules/chownr/chownr.js
index 9f04393b7f498..0d40932169654 100644
--- a/node_modules/chownr/chownr.js
+++ b/node_modules/chownr/chownr.js
@@ -7,10 +7,30 @@ const LCHOWN = fs.lchown ? 'lchown' : 'chown'
/* istanbul ignore next */
const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
+/* istanbul ignore next */
const needEISDIRHandled = fs.lchown &&
!process.version.match(/v1[1-9]+\./) &&
!process.version.match(/v10\.[6-9]/)
+const lchownSync = (path, uid, gid) => {
+ try {
+ return fs[LCHOWNSYNC](path, uid, gid)
+ } catch (er) {
+ if (er.code !== 'ENOENT')
+ throw er
+ }
+}
+
+/* istanbul ignore next */
+const chownSync = (path, uid, gid) => {
+ try {
+ return fs.chownSync(path, uid, gid)
+ } catch (er) {
+ if (er.code !== 'ENOENT')
+ throw er
+ }
+}
+
/* istanbul ignore next */
const handleEISDIR =
needEISDIRHandled ? (path, uid, gid, cb) => er => {
@@ -28,14 +48,14 @@ const handleEISDIR =
const handleEISDirSync =
needEISDIRHandled ? (path, uid, gid) => {
try {
- return fs[LCHOWNSYNC](path, uid, gid)
+ return lchownSync(path, uid, gid)
} catch (er) {
if (er.code !== 'EISDIR')
throw er
- fs.chownSync(path, uid, gid)
+ chownSync(path, uid, gid)
}
}
- : (path, uid, gid) => fs[LCHOWNSYNC](path, uid, gid)
+ : (path, uid, gid) => lchownSync(path, uid, gid)
// fs.readdir could only accept an options object as of node v6
const nodeVersion = process.version
@@ -45,11 +65,19 @@ let readdirSync = (path, options) => fs.readdirSync(path, options)
if (/^v4\./.test(nodeVersion))
readdir = (path, options, cb) => fs.readdir(path, cb)
+const chown = (cpath, uid, gid, cb) => {
+ fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => {
+ // Skip ENOENT error
+ cb(er && er.code !== 'ENOENT' ? er : null)
+ }))
+}
+
const chownrKid = (p, child, uid, gid, cb) => {
if (typeof child === 'string')
return fs.lstat(path.resolve(p, child), (er, stats) => {
+ // Skip ENOENT error
if (er)
- return cb(er)
+ return cb(er.code !== 'ENOENT' ? er : null)
stats.name = child
chownrKid(p, stats, uid, gid, cb)
})
@@ -59,11 +87,11 @@ const chownrKid = (p, child, uid, gid, cb) => {
if (er)
return cb(er)
const cpath = path.resolve(p, child.name)
- fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb))
+ chown(cpath, uid, gid, cb)
})
} else {
const cpath = path.resolve(p, child.name)
- fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb))
+ chown(cpath, uid, gid, cb)
}
}
@@ -72,10 +100,14 @@ const chownr = (p, uid, gid, cb) => {
readdir(p, { withFileTypes: true }, (er, children) => {
// any error other than ENOTDIR or ENOTSUP means it's not readable,
// or doesn't exist. give up.
- if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
- return cb(er)
+ if (er) {
+ if (er.code === 'ENOENT')
+ return cb()
+ else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
+ return cb(er)
+ }
if (er || !children.length)
- return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb))
+ return chown(p, uid, gid, cb)
let len = children.length
let errState = null
@@ -85,7 +117,7 @@ const chownr = (p, uid, gid, cb) => {
if (er)
return cb(errState = er)
if (-- len === 0)
- return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb))
+ return chown(p, uid, gid, cb)
}
children.forEach(child => chownrKid(p, child, uid, gid, then))
@@ -94,9 +126,16 @@ const chownr = (p, uid, gid, cb) => {
const chownrKidSync = (p, child, uid, gid) => {
if (typeof child === 'string') {
- const stats = fs.lstatSync(path.resolve(p, child))
- stats.name = child
- child = stats
+ try {
+ const stats = fs.lstatSync(path.resolve(p, child))
+ stats.name = child
+ child = stats
+ } catch (er) {
+ if (er.code === 'ENOENT')
+ return
+ else
+ throw er
+ }
}
if (child.isDirectory())
@@ -110,12 +149,15 @@ const chownrSync = (p, uid, gid) => {
try {
children = readdirSync(p, { withFileTypes: true })
} catch (er) {
- if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP')
+ if (er.code === 'ENOENT')
+ return
+ else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP')
return handleEISDirSync(p, uid, gid)
- throw er
+ else
+ throw er
}
- if (children.length)
+ if (children && children.length)
children.forEach(child => chownrKidSync(p, child, uid, gid))
return handleEISDirSync(p, uid, gid)
diff --git a/node_modules/chownr/package.json b/node_modules/chownr/package.json
index cc48dc912cd7e..5c125f8447b54 100644
--- a/node_modules/chownr/package.json
+++ b/node_modules/chownr/package.json
@@ -1,19 +1,19 @@
{
- "_from": "chownr@1.1.3",
- "_id": "chownr@1.1.3",
+ "_from": "chownr@1.1.4",
+ "_id": "chownr@1.1.4",
"_inBundle": false,
- "_integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==",
+ "_integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
"_location": "/chownr",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "chownr@1.1.3",
+ "raw": "chownr@1.1.4",
"name": "chownr",
"escapedName": "chownr",
- "rawSpec": "1.1.3",
+ "rawSpec": "1.1.4",
"saveSpec": null,
- "fetchSpec": "1.1.3"
+ "fetchSpec": "1.1.4"
},
"_requiredBy": [
"#USER",
@@ -23,10 +23,10 @@
"/pacote",
"/tar"
],
- "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",
- "_shasum": "42d837d5239688d55f303003a508230fa6727142",
- "_spec": "chownr@1.1.3",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "_shasum": "6fc9d7b42d32a583596337666e7d08084da2cc6b",
+ "_spec": "chownr@1.1.4",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -40,8 +40,8 @@
"description": "like `chown -R`",
"devDependencies": {
"mkdirp": "0.3",
- "rimraf": "",
- "tap": "^12.0.1"
+ "rimraf": "^2.7.1",
+ "tap": "^14.10.6"
},
"files": [
"chownr.js"
@@ -55,10 +55,13 @@
"url": "git://github.com/isaacs/chownr.git"
},
"scripts": {
- "postpublish": "git push origin --follow-tags",
"postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
"preversion": "npm test",
- "test": "tap test/*.js --cov"
+ "test": "tap"
},
- "version": "1.1.3"
+ "tap": {
+ "check-coverage": true
+ },
+ "version": "1.1.4"
}
diff --git a/node_modules/cliui/CHANGELOG.md b/node_modules/cliui/CHANGELOG.md
index d9e6fbb9a7c91..37f259a5ce41d 100644
--- a/node_modules/cliui/CHANGELOG.md
+++ b/node_modules/cliui/CHANGELOG.md
@@ -2,6 +2,20 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+# [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10)
+
+
+### Bug Fixes
+
+* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae))
+
+
+### BREAKING CHANGES
+
+* Drop support for node < 6.
+
+
+
# [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23)
diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md
index 7861976fc2d24..deacfa0dc5aaa 100644
--- a/node_modules/cliui/README.md
+++ b/node_modules/cliui/README.md
@@ -46,7 +46,7 @@ console.log(ui.toString())
cliui exposes a simple layout DSL:
-If you create a single `ui.row`, passing a string rather than an
+If you create a single `ui.div`, passing a string rather than an
object:
* `\n`: characters will be interpreted as new rows.
diff --git a/node_modules/cliui/node_modules/ansi-regex/index.js b/node_modules/cliui/node_modules/ansi-regex/index.js
index c4aaecf505063..c25448009f304 100644
--- a/node_modules/cliui/node_modules/ansi-regex/index.js
+++ b/node_modules/cliui/node_modules/ansi-regex/index.js
@@ -1,10 +1,14 @@
'use strict';
-module.exports = () => {
+module.exports = options => {
+ options = Object.assign({
+ onlyFirst: false
+ }, options);
+
const pattern = [
- '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
].join('|');
- return new RegExp(pattern, 'g');
+ return new RegExp(pattern, options.onlyFirst ? undefined : 'g');
};
diff --git a/node_modules/cliui/node_modules/ansi-regex/package.json b/node_modules/cliui/node_modules/ansi-regex/package.json
index 8e2c1b93e5b63..9397a8c3f4e4e 100644
--- a/node_modules/cliui/node_modules/ansi-regex/package.json
+++ b/node_modules/cliui/node_modules/ansi-regex/package.json
@@ -1,27 +1,27 @@
{
- "_from": "ansi-regex@^3.0.0",
- "_id": "ansi-regex@3.0.0",
+ "_from": "ansi-regex@^4.1.0",
+ "_id": "ansi-regex@4.1.0",
"_inBundle": false,
- "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"_location": "/cliui/ansi-regex",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "ansi-regex@^3.0.0",
+ "raw": "ansi-regex@^4.1.0",
"name": "ansi-regex",
"escapedName": "ansi-regex",
- "rawSpec": "^3.0.0",
+ "rawSpec": "^4.1.0",
"saveSpec": null,
- "fetchSpec": "^3.0.0"
+ "fetchSpec": "^4.1.0"
},
"_requiredBy": [
"/cliui/strip-ansi"
],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "_shasum": "ed0317c322064f79466c02966bddb605ab37d998",
- "_spec": "ansi-regex@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/cliui/node_modules/strip-ansi",
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "_shasum": "8b9f8f08cf1acb843756a839ca8c7e3168c51997",
+ "_spec": "ansi-regex@^4.1.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui/node_modules/strip-ansi",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -34,11 +34,11 @@
"deprecated": false,
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "^0.25.0",
+ "xo": "^0.23.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
"index.js"
@@ -81,5 +81,5 @@
"test": "xo && ava",
"view-supported": "node fixtures/view-codes.js"
},
- "version": "3.0.0"
+ "version": "4.1.0"
}
diff --git a/node_modules/cliui/node_modules/ansi-regex/readme.md b/node_modules/cliui/node_modules/ansi-regex/readme.md
index 22db1c3405555..d19c44667e704 100644
--- a/node_modules/cliui/node_modules/ansi-regex/readme.md
+++ b/node_modules/cliui/node_modules/ansi-regex/readme.md
@@ -2,6 +2,20 @@
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+---
+
+
+
+---
+
## Install
@@ -23,9 +37,31 @@ ansiRegex().test('cake');
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
//=> ['\u001B[4m', '\u001B[0m']
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
+//=> ['\u001B[4m']
+
+'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
+//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
```
+## API
+
+### ansiRegex([options])
+
+Returns a regex for matching ANSI escape codes.
+
+#### options
+
+##### onlyFirst
+
+Type: `boolean`
+Default: `false` *(Matches any ANSI escape codes in a string)*
+
+Match only the first ANSI escape.
+
+
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
@@ -35,6 +71,11 @@ Some of the codes we run as a test are codes that we acquired finding various li
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js b/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js
new file mode 100644
index 0000000000000..d506327c3e557
--- /dev/null
+++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js
@@ -0,0 +1,46 @@
+'use strict';
+/* eslint-disable yoda */
+module.exports = x => {
+ if (Number.isNaN(x)) {
+ return false;
+ }
+
+ // code points are derived from:
+ // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
+ if (
+ x >= 0x1100 && (
+ x <= 0x115f || // Hangul Jamo
+ x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
+ x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
+ // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ (0x3250 <= x && x <= 0x4dbf) ||
+ // CJK Unified Ideographs .. Yi Radicals
+ (0x4e00 <= x && x <= 0xa4c6) ||
+ // Hangul Jamo Extended-A
+ (0xa960 <= x && x <= 0xa97c) ||
+ // Hangul Syllables
+ (0xac00 <= x && x <= 0xd7a3) ||
+ // CJK Compatibility Ideographs
+ (0xf900 <= x && x <= 0xfaff) ||
+ // Vertical Forms
+ (0xfe10 <= x && x <= 0xfe19) ||
+ // CJK Compatibility Forms .. Small Form Variants
+ (0xfe30 <= x && x <= 0xfe6b) ||
+ // Halfwidth and Fullwidth Forms
+ (0xff01 <= x && x <= 0xff60) ||
+ (0xffe0 <= x && x <= 0xffe6) ||
+ // Kana Supplement
+ (0x1b000 <= x && x <= 0x1b001) ||
+ // Enclosed Ideographic Supplement
+ (0x1f200 <= x && x <= 0x1f251) ||
+ // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ (0x20000 <= x && x <= 0x3fffd)
+ )
+ ) {
+ return true;
+ }
+
+ return false;
+};
diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/license b/node_modules/cliui/node_modules/is-fullwidth-code-point/license
new file mode 100644
index 0000000000000..654d0bfe94343
--- /dev/null
+++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json b/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json
new file mode 100644
index 0000000000000..bea9e8359c649
--- /dev/null
+++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json
@@ -0,0 +1,77 @@
+{
+ "_from": "is-fullwidth-code-point@^2.0.0",
+ "_id": "is-fullwidth-code-point@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "_location": "/cliui/is-fullwidth-code-point",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-fullwidth-code-point@^2.0.0",
+ "name": "is-fullwidth-code-point",
+ "escapedName": "is-fullwidth-code-point",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/cliui/string-width"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f",
+ "_spec": "is-fullwidth-code-point@^2.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui/node_modules/string-width",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Check if the character represented by a given Unicode code point is fullwidth",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme",
+ "keywords": [
+ "fullwidth",
+ "full-width",
+ "full",
+ "width",
+ "unicode",
+ "character",
+ "char",
+ "string",
+ "str",
+ "codepoint",
+ "code",
+ "point",
+ "is",
+ "detect",
+ "check"
+ ],
+ "license": "MIT",
+ "name": "is-fullwidth-code-point",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md b/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md
new file mode 100644
index 0000000000000..093b0281b2c46
--- /dev/null
+++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md
@@ -0,0 +1,39 @@
+# is-fullwidth-code-point [](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
+
+> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
+
+
+## Install
+
+```
+$ npm install --save is-fullwidth-code-point
+```
+
+
+## Usage
+
+```js
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
+
+isFullwidthCodePoint('่ฐข'.codePointAt());
+//=> true
+
+isFullwidthCodePoint('a'.codePointAt());
+//=> false
+```
+
+
+## API
+
+### isFullwidthCodePoint(input)
+
+#### input
+
+Type: `number`
+
+[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
+
+
+## License
+
+MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/cliui/node_modules/string-width/index.js b/node_modules/cliui/node_modules/string-width/index.js
new file mode 100644
index 0000000000000..33c9d6c06f7a5
--- /dev/null
+++ b/node_modules/cliui/node_modules/string-width/index.js
@@ -0,0 +1,39 @@
+'use strict';
+const stripAnsi = require('strip-ansi');
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
+const emojiRegex = require('emoji-regex')();
+
+module.exports = input => {
+ input = input.replace(emojiRegex, ' ');
+
+ if (typeof input !== 'string' || input.length === 0) {
+ return 0;
+ }
+
+ input = stripAnsi(input);
+
+ let width = 0;
+
+ for (let i = 0; i < input.length; i++) {
+ const code = input.codePointAt(i);
+
+ // Ignore control characters
+ if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
+ continue;
+ }
+
+ // Ignore combining characters
+ if (code >= 0x300 && code <= 0x36F) {
+ continue;
+ }
+
+ // Surrogates
+ if (code > 0xFFFF) {
+ i++;
+ }
+
+ width += isFullwidthCodePoint(code) ? 2 : 1;
+ }
+
+ return width;
+};
diff --git a/node_modules/invert-kv/license b/node_modules/cliui/node_modules/string-width/license
similarity index 100%
rename from node_modules/invert-kv/license
rename to node_modules/cliui/node_modules/string-width/license
diff --git a/node_modules/cliui/node_modules/string-width/package.json b/node_modules/cliui/node_modules/string-width/package.json
new file mode 100644
index 0000000000000..8c314e0a0f8bc
--- /dev/null
+++ b/node_modules/cliui/node_modules/string-width/package.json
@@ -0,0 +1,88 @@
+{
+ "_from": "string-width@^3.1.0",
+ "_id": "string-width@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "_location": "/cliui/string-width",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string-width@^3.1.0",
+ "name": "string-width",
+ "escapedName": "string-width",
+ "rawSpec": "^3.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.1.0"
+ },
+ "_requiredBy": [
+ "/cliui"
+ ],
+ "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "_shasum": "22767be21b62af1081574306f69ac51b62203961",
+ "_spec": "string-width@^3.1.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/string-width/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ },
+ "deprecated": false,
+ "description": "Get the visual width of a string - the number of columns required to display it",
+ "devDependencies": {
+ "ava": "^1.0.1",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/string-width#readme",
+ "keywords": [
+ "string",
+ "str",
+ "character",
+ "char",
+ "unicode",
+ "width",
+ "visual",
+ "column",
+ "columns",
+ "fullwidth",
+ "full-width",
+ "full",
+ "ansi",
+ "escape",
+ "codes",
+ "cli",
+ "command-line",
+ "terminal",
+ "console",
+ "cjk",
+ "chinese",
+ "japanese",
+ "korean",
+ "fixed-width"
+ ],
+ "license": "MIT",
+ "name": "string-width",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/string-width.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.1.0"
+}
diff --git a/node_modules/cliui/node_modules/string-width/readme.md b/node_modules/cliui/node_modules/string-width/readme.md
new file mode 100644
index 0000000000000..d39d95f56cf3f
--- /dev/null
+++ b/node_modules/cliui/node_modules/string-width/readme.md
@@ -0,0 +1,45 @@
+# string-width [](https://travis-ci.org/sindresorhus/string-width)
+
+> Get the visual width of a string - the number of columns required to display it
+
+Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
+
+Useful to be able to measure the actual width of command-line output.
+
+
+## Install
+
+```
+$ npm install string-width
+```
+
+
+## Usage
+
+```js
+const stringWidth = require('string-width');
+
+stringWidth('ๅค');
+//=> 2
+
+stringWidth('\u001b[1mๅค\u001b[22m');
+//=> 2
+
+stringWidth('a');
+//=> 1
+
+stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+// => 5
+```
+
+
+## Related
+
+- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
+- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
+- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
+
+
+## License
+
+MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/cliui/node_modules/strip-ansi/index.d.ts b/node_modules/cliui/node_modules/strip-ansi/index.d.ts
new file mode 100644
index 0000000000000..44e954d0c724d
--- /dev/null
+++ b/node_modules/cliui/node_modules/strip-ansi/index.d.ts
@@ -0,0 +1,15 @@
+/**
+Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
+
+@example
+```
+import stripAnsi from 'strip-ansi';
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+*/
+export default function stripAnsi(string: string): string;
diff --git a/node_modules/cliui/node_modules/strip-ansi/index.js b/node_modules/cliui/node_modules/strip-ansi/index.js
index 96e0292c8e2f6..9788c96dfa3b0 100644
--- a/node_modules/cliui/node_modules/strip-ansi/index.js
+++ b/node_modules/cliui/node_modules/strip-ansi/index.js
@@ -1,4 +1,7 @@
'use strict';
const ansiRegex = require('ansi-regex');
-module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
+const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
+
+module.exports = stripAnsi;
+module.exports.default = stripAnsi;
diff --git a/node_modules/cliui/node_modules/strip-ansi/package.json b/node_modules/cliui/node_modules/strip-ansi/package.json
index b45e23c1183f0..1185f87f66831 100644
--- a/node_modules/cliui/node_modules/strip-ansi/package.json
+++ b/node_modules/cliui/node_modules/strip-ansi/package.json
@@ -1,27 +1,28 @@
{
- "_from": "strip-ansi@^4.0.0",
- "_id": "strip-ansi@4.0.0",
+ "_from": "strip-ansi@^5.2.0",
+ "_id": "strip-ansi@5.2.0",
"_inBundle": false,
- "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "_integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"_location": "/cliui/strip-ansi",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "strip-ansi@^4.0.0",
+ "raw": "strip-ansi@^5.2.0",
"name": "strip-ansi",
"escapedName": "strip-ansi",
- "rawSpec": "^4.0.0",
+ "rawSpec": "^5.2.0",
"saveSpec": null,
- "fetchSpec": "^4.0.0"
+ "fetchSpec": "^5.2.0"
},
"_requiredBy": [
- "/cliui"
+ "/cliui",
+ "/cliui/string-width"
],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "_shasum": "a8479022eb1ac368a871389b635262c505ee368f",
- "_spec": "strip-ansi@^4.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/cliui",
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "_shasum": "8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae",
+ "_spec": "strip-ansi@^5.2.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -32,19 +33,21 @@
},
"bundleDependencies": false,
"dependencies": {
- "ansi-regex": "^3.0.0"
+ "ansi-regex": "^4.1.0"
},
"deprecated": false,
- "description": "Strip ANSI escape codes",
+ "description": "Strip ANSI escape codes from a string",
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "^1.3.1",
+ "tsd-check": "^0.5.0",
+ "xo": "^0.24.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
- "index.js"
+ "index.js",
+ "index.d.ts"
],
"homepage": "https://github.com/chalk/strip-ansi#readme",
"keywords": [
@@ -78,7 +81,7 @@
"url": "git+https://github.com/chalk/strip-ansi.git"
},
"scripts": {
- "test": "xo && ava"
+ "test": "xo && ava && tsd-check"
},
- "version": "4.0.0"
+ "version": "5.2.0"
}
diff --git a/node_modules/cliui/node_modules/strip-ansi/readme.md b/node_modules/cliui/node_modules/strip-ansi/readme.md
index dc76f0cb1a059..8681fe8af4424 100644
--- a/node_modules/cliui/node_modules/strip-ansi/readme.md
+++ b/node_modules/cliui/node_modules/strip-ansi/readme.md
@@ -1,7 +1,20 @@
# strip-ansi [](https://travis-ci.org/chalk/strip-ansi)
-> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
+---
+
+
+
+---
## Install
@@ -17,12 +30,21 @@ const stripAnsi = require('strip-ansi');
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
```
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
## Related
- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json
index 2571f5322533e..c3f92f9c564ef 100644
--- a/node_modules/cliui/package.json
+++ b/node_modules/cliui/package.json
@@ -1,27 +1,29 @@
{
- "_from": "cliui@^4.0.0",
- "_id": "cliui@4.1.0",
+ "_from": "cliui@^5.0.0",
+ "_id": "cliui@5.0.0",
"_inBundle": false,
- "_integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
+ "_integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"_location": "/cliui",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "emoji-regex": "7.0.3"
+ },
"_requested": {
"type": "range",
"registry": true,
- "raw": "cliui@^4.0.0",
+ "raw": "cliui@^5.0.0",
"name": "cliui",
"escapedName": "cliui",
- "rawSpec": "^4.0.0",
+ "rawSpec": "^5.0.0",
"saveSpec": null,
- "fetchSpec": "^4.0.0"
+ "fetchSpec": "^5.0.0"
},
"_requiredBy": [
"/yargs"
],
- "_resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
- "_shasum": "348422dbe82d800b3022eef4f6ac10bf2e4d1b49",
- "_spec": "cliui@^4.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/yargs",
+ "_resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+ "_shasum": "deefcfdb2e800784aa34f46fa08e06851c7bbbc5",
+ "_spec": "cliui@^5.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs",
"author": {
"name": "Ben Coe",
"email": "ben@npmjs.com"
@@ -43,23 +45,23 @@
}
},
"dependencies": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0",
- "wrap-ansi": "^2.0.0"
+ "string-width": "^3.1.0",
+ "strip-ansi": "^5.2.0",
+ "wrap-ansi": "^5.1.0"
},
"deprecated": false,
"description": "easily create complex multi-column command-line-interfaces",
"devDependencies": {
- "chai": "^3.5.0",
- "chalk": "^1.1.2",
- "coveralls": "^2.11.8",
- "mocha": "^3.0.0",
- "nyc": "^10.0.0",
- "standard": "^8.0.0",
- "standard-version": "^3.0.0"
+ "chai": "^4.2.0",
+ "chalk": "^2.4.2",
+ "coveralls": "^3.0.3",
+ "mocha": "^6.0.2",
+ "nyc": "^13.3.0",
+ "standard": "^12.0.1",
+ "standard-version": "^5.0.2"
},
"engine": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
"index.js"
@@ -95,5 +97,5 @@
"it"
]
},
- "version": "4.1.0"
+ "version": "5.0.0"
}
diff --git a/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/configstore/package.json b/node_modules/configstore/package.json
index 828dc2ae6a8f8..e51a0a4e3bca1 100644
--- a/node_modules/configstore/package.json
+++ b/node_modules/configstore/package.json
@@ -1,8 +1,8 @@
{
"_from": "configstore@^3.0.0",
- "_id": "configstore@3.1.2",
+ "_id": "configstore@3.1.5",
"_inBundle": false,
- "_integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==",
+ "_integrity": "sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==",
"_location": "/configstore",
"_phantomChildren": {},
"_requested": {
@@ -18,10 +18,10 @@
"_requiredBy": [
"/update-notifier"
],
- "_resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz",
- "_shasum": "c6f25defaeef26df12dd33414b001fe81a543f8f",
+ "_resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.5.tgz",
+ "_shasum": "e9af331fadc14dabd544d3e7e76dc446a09a530f",
"_spec": "configstore@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/update-notifier",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/latest/node_modules/update-notifier",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -32,7 +32,7 @@
},
"bundleDependencies": false,
"dependencies": {
- "dot-prop": "^4.1.0",
+ "dot-prop": "^4.2.1",
"graceful-fs": "^4.1.2",
"make-dir": "^1.0.0",
"unique-string": "^1.0.0",
@@ -42,8 +42,8 @@
"deprecated": false,
"description": "Easily load and save config without having to think about where and how",
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "^0.25.0",
+ "xo": "^0.20.3"
},
"engines": {
"node": ">=4"
@@ -75,5 +75,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "3.1.2"
+ "version": "3.1.5"
}
diff --git a/node_modules/configstore/readme.md b/node_modules/configstore/readme.md
index 6af37719bc0ea..5cdba305d4061 100644
--- a/node_modules/configstore/readme.md
+++ b/node_modules/configstore/readme.md
@@ -1,4 +1,4 @@
-# configstore [](https://travis-ci.org/yeoman/configstore)
+# configstore [](https://travis-ci.org/yeoman/configstore)
> Easily load and persist config without having to think about where and how
diff --git a/node_modules/deep-extend/CHANGELOG.md b/node_modules/deep-extend/CHANGELOG.md
index 3932f8f024e5e..dd13ec1311b2b 100644
--- a/node_modules/deep-extend/CHANGELOG.md
+++ b/node_modules/deep-extend/CHANGELOG.md
@@ -1,6 +1,14 @@
Changelog
=========
+v0.6.0
+------
+
+- Updated "devDependencies" versions to fix vulnerability alerts
+- Dropped support of io.js and node.js v0.12.x and lower since new versions of
+ "devDependencies" couldn't work with those old node.js versions
+ (minimal supported version of node.js now is v4.0.0)
+
v0.5.1
------
diff --git a/node_modules/deep-extend/README.md b/node_modules/deep-extend/README.md
index cf84f70dedcbe..67c7fc085903b 100644
--- a/node_modules/deep-extend/README.md
+++ b/node_modules/deep-extend/README.md
@@ -7,8 +7,6 @@ Recursive object extending.
[](https://nodei.co/npm/deep-extend/)
-[](https://nodei.co/npm/deep-extend/)
-
Install
-------
diff --git a/node_modules/deep-extend/package.json b/node_modules/deep-extend/package.json
index 3aaa6742ff9e2..15386bcffeaaf 100644
--- a/node_modules/deep-extend/package.json
+++ b/node_modules/deep-extend/package.json
@@ -1,27 +1,27 @@
{
- "_from": "deep-extend@^0.5.1",
- "_id": "deep-extend@0.5.1",
+ "_from": "deep-extend@^0.6.0",
+ "_id": "deep-extend@0.6.0",
"_inBundle": false,
- "_integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==",
+ "_integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"_location": "/deep-extend",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "deep-extend@^0.5.1",
+ "raw": "deep-extend@^0.6.0",
"name": "deep-extend",
"escapedName": "deep-extend",
- "rawSpec": "^0.5.1",
+ "rawSpec": "^0.6.0",
"saveSpec": null,
- "fetchSpec": "^0.5.1"
+ "fetchSpec": "^0.6.0"
},
"_requiredBy": [
"/rc"
],
- "_resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz",
- "_shasum": "b894a9dd90d3023fbf1c55a394fb858eb2066f1f",
- "_spec": "deep-extend@^0.5.1",
- "_where": "/Users/rebecca/code/npm/node_modules/rc",
+ "_resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "_shasum": "c4fa7c95404a17a9c3e8ca7e1537312b736330ac",
+ "_spec": "deep-extend@^0.6.0",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/node_modules/rc",
"author": {
"name": "Viacheslav Lotsmanov",
"email": "lotsmanov89@gmail.com"
@@ -51,12 +51,11 @@
"deprecated": false,
"description": "Recursive object extending",
"devDependencies": {
- "mocha": "2.2.1",
- "should": "5.2.0"
+ "mocha": "5.2.0",
+ "should": "13.2.1"
},
"engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
+ "node": ">=4.0.0"
},
"files": [
"index.js",
@@ -89,5 +88,5 @@
"scripts": {
"test": "mocha"
},
- "version": "0.5.1"
+ "version": "0.6.0"
}
diff --git a/node_modules/dot-prop/index.js b/node_modules/dot-prop/index.js
index 15282bb392402..189831cf00f81 100644
--- a/node_modules/dot-prop/index.js
+++ b/node_modules/dot-prop/index.js
@@ -1,6 +1,14 @@
'use strict';
const isObj = require('is-obj');
+const disallowedKeys = [
+ '__proto__',
+ 'prototype',
+ 'constructor'
+];
+
+const isValidPath = pathSegments => !pathSegments.some(segment => disallowedKeys.includes(segment));
+
function getPathSegments(path) {
const pathArr = path.split('.');
const parts = [];
@@ -16,6 +24,10 @@ function getPathSegments(path) {
parts.push(p);
}
+ if (!isValidPath(parts)) {
+ return [];
+ }
+
return parts;
}
@@ -26,6 +38,9 @@ module.exports = {
}
const pathArr = getPathSegments(path);
+ if (pathArr.length === 0) {
+ return;
+ }
for (let i = 0; i < pathArr.length; i++) {
if (!Object.prototype.propertyIsEnumerable.call(obj, pathArr[i])) {
@@ -58,6 +73,9 @@ module.exports = {
const root = obj;
const pathArr = getPathSegments(path);
+ if (pathArr.length === 0) {
+ return;
+ }
for (let i = 0; i < pathArr.length; i++) {
const p = pathArr[i];
diff --git a/node_modules/dot-prop/package.json b/node_modules/dot-prop/package.json
index 40fefa363d353..674ab4308e6e2 100644
--- a/node_modules/dot-prop/package.json
+++ b/node_modules/dot-prop/package.json
@@ -1,27 +1,27 @@
{
- "_from": "dot-prop@^4.1.0",
- "_id": "dot-prop@4.2.0",
+ "_from": "dot-prop@^4.2.1",
+ "_id": "dot-prop@4.2.1",
"_inBundle": false,
- "_integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
+ "_integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
"_location": "/dot-prop",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "dot-prop@^4.1.0",
+ "raw": "dot-prop@^4.2.1",
"name": "dot-prop",
"escapedName": "dot-prop",
- "rawSpec": "^4.1.0",
+ "rawSpec": "^4.2.1",
"saveSpec": null,
- "fetchSpec": "^4.1.0"
+ "fetchSpec": "^4.2.1"
},
"_requiredBy": [
"/configstore"
],
- "_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
- "_shasum": "1f19e0c2e1aa0e32797c49799f2837ac6af69c57",
- "_spec": "dot-prop@^4.1.0",
- "_where": "/Users/rebecca/code/npm/node_modules/configstore",
+ "_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
+ "_shasum": "45884194a71fc2cda71cbb4bceb3a4dd2f433ba4",
+ "_spec": "dot-prop@^4.2.1",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/latest/node_modules/configstore",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -37,9 +37,9 @@
"deprecated": false,
"description": "Get, set, or delete a property from a nested object using a dot path",
"devDependencies": {
- "ava": "*",
+ "ava": "1.4.1",
"matcha": "^0.7.0",
- "xo": "*"
+ "xo": "0.24.0"
},
"engines": {
"node": ">=4"
@@ -73,7 +73,7 @@
"bench": "matcha bench.js",
"test": "xo && ava"
},
- "version": "4.2.0",
+ "version": "4.2.1",
"xo": {
"esnext": true
}
diff --git a/node_modules/dot-prop/readme.md b/node_modules/dot-prop/readme.md
index fab3b7afe00ac..0e18f78656034 100644
--- a/node_modules/dot-prop/readme.md
+++ b/node_modules/dot-prop/readme.md
@@ -85,6 +85,8 @@ Path of the property in the object, using `.` to separate each nested key.
Use `\\.` if you have a `.` in the key.
+The following path components are invalid and results in `undefined` being returned: `__proto__`, `prototype`, `constructor`.
+
#### value
Type: `any`
diff --git a/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/emoji-regex/LICENSE-MIT.txt b/node_modules/emoji-regex/LICENSE-MIT.txt
new file mode 100644
index 0000000000000..a41e0a7ef970e
--- /dev/null
+++ b/node_modules/emoji-regex/LICENSE-MIT.txt
@@ -0,0 +1,20 @@
+Copyright Mathias Bynens
+
+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/emoji-regex/README.md b/node_modules/emoji-regex/README.md
new file mode 100644
index 0000000000000..37cf14e01f72a
--- /dev/null
+++ b/node_modules/emoji-regex/README.md
@@ -0,0 +1,73 @@
+# emoji-regex [](https://travis-ci.org/mathiasbynens/emoji-regex)
+
+_emoji-regex_ offers a regular expression to match all emoji symbols (including textual representations of emoji) as per the Unicode Standard.
+
+This repository contains a script that generates this regular expression based on [the data from Unicode Technical Report #51](https://github.com/mathiasbynens/unicode-tr51). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard.
+
+## Installation
+
+Via [npm](https://www.npmjs.com/):
+
+```bash
+npm install emoji-regex
+```
+
+In [Node.js](https://nodejs.org/):
+
+```js
+const emojiRegex = require('emoji-regex');
+// Note: because the regular expression has the global flag set, this module
+// exports a function that returns the regex rather than exporting the regular
+// expression itself, to make it impossible to (accidentally) mutate the
+// original regular expression.
+
+const text = `
+\u{231A}: โ default emoji presentation character (Emoji_Presentation)
+\u{2194}\u{FE0F}: โ๏ธ default text presentation character rendered as emoji
+\u{1F469}: ๐ฉ emoji modifier base (Emoji_Modifier_Base)
+\u{1F469}\u{1F3FF}: ๐ฉ๐ฟ emoji modifier base followed by a modifier
+`;
+
+const regex = emojiRegex();
+let match;
+while (match = regex.exec(text)) {
+ const emoji = match[0];
+ console.log(`Matched sequence ${ emoji } โ code points: ${ [...emoji].length }`);
+}
+```
+
+Console output:
+
+```
+Matched sequence โ โ code points: 1
+Matched sequence โ โ code points: 1
+Matched sequence โ๏ธ โ code points: 2
+Matched sequence โ๏ธ โ code points: 2
+Matched sequence ๐ฉ โ code points: 1
+Matched sequence ๐ฉ โ code points: 1
+Matched sequence ๐ฉ๐ฟ โ code points: 2
+Matched sequence ๐ฉ๐ฟ โ code points: 2
+```
+
+To match emoji in their textual representation as well (i.e. emoji that are not `Emoji_Presentation` symbols and that arenโt forced to render as emoji by a variation selector), `require` the other regex:
+
+```js
+const emojiRegex = require('emoji-regex/text.js');
+```
+
+Additionally, in environments which support ES2015 Unicode escapes, you may `require` ES2015-style versions of the regexes:
+
+```js
+const emojiRegex = require('emoji-regex/es2015/index.js');
+const emojiRegexText = require('emoji-regex/es2015/text.js');
+```
+
+## Author
+
+| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|
+| [Mathias Bynens](https://mathiasbynens.be/) |
+
+## License
+
+_emoji-regex_ is available under the [MIT](https://mths.be/mit) license.
diff --git a/node_modules/emoji-regex/es2015/index.js b/node_modules/emoji-regex/es2015/index.js
new file mode 100644
index 0000000000000..0216db95876da
--- /dev/null
+++ b/node_modules/emoji-regex/es2015/index.js
@@ -0,0 +1,6 @@
+"use strict";
+
+module.exports = () => {
+ // https://mths.be/emoji
+ return /\u{1F3F4}(?:\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074})\u{E007F}|\u200D\u2620\uFE0F)|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F468}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u{1F468}(?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F469}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F468}(?:\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|[\u{1F3FB}-\u{1F3FF}])|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F469}\u200D\u{1F466}|\u{1F1F6}\u{1F1E6}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9D1}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F469}\u{1F46E}\u{1F470}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9D1}-\u{1F9DD}]/gu;
+};
diff --git a/node_modules/emoji-regex/es2015/text.js b/node_modules/emoji-regex/es2015/text.js
new file mode 100644
index 0000000000000..d0a771d36e487
--- /dev/null
+++ b/node_modules/emoji-regex/es2015/text.js
@@ -0,0 +1,6 @@
+"use strict";
+
+module.exports = () => {
+ // https://mths.be/emoji
+ return /\u{1F3F4}(?:\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074})\u{E007F}|\u200D\u2620\uFE0F)|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F468}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u{1F468}(?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F469}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F468}(?:\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|[\u{1F3FB}-\u{1F3FF}])|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F469}\u200D\u{1F466}|\u{1F1F6}\u{1F1E6}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9D1}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F469}\u{1F46E}\u{1F470}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9D1}-\u{1F9DD}]/gu;
+};
diff --git a/node_modules/emoji-regex/index.d.ts b/node_modules/emoji-regex/index.d.ts
new file mode 100644
index 0000000000000..2c317cdad43db
--- /dev/null
+++ b/node_modules/emoji-regex/index.d.ts
@@ -0,0 +1,5 @@
+declare module 'emoji-regex' {
+ function emojiRegex(): RegExp;
+
+ export default emojiRegex;
+}
diff --git a/node_modules/emoji-regex/index.js b/node_modules/emoji-regex/index.js
new file mode 100644
index 0000000000000..e2237a4e80532
--- /dev/null
+++ b/node_modules/emoji-regex/index.js
@@ -0,0 +1,6 @@
+"use strict";
+
+module.exports = function () {
+ // https://mths.be/emoji
+ return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g;
+};
diff --git a/node_modules/emoji-regex/package.json b/node_modules/emoji-regex/package.json
new file mode 100644
index 0000000000000..356ae530db017
--- /dev/null
+++ b/node_modules/emoji-regex/package.json
@@ -0,0 +1,82 @@
+{
+ "_args": [
+ [
+ "emoji-regex@7.0.3",
+ "/Users/claudiahdz/npm/cli"
+ ]
+ ],
+ "_development": true,
+ "_from": "emoji-regex@7.0.3",
+ "_id": "emoji-regex@7.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "_location": "/emoji-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "emoji-regex@7.0.3",
+ "name": "emoji-regex",
+ "escapedName": "emoji-regex",
+ "rawSpec": "7.0.3",
+ "saveSpec": null,
+ "fetchSpec": "7.0.3"
+ },
+ "_requiredBy": [
+ "/nyc/string-width"
+ ],
+ "_resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "_spec": "7.0.3",
+ "_where": "/Users/claudiahdz/npm/cli",
+ "author": {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ },
+ "bugs": {
+ "url": "https://github.com/mathiasbynens/emoji-regex/issues"
+ },
+ "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.",
+ "devDependencies": {
+ "@babel/cli": "^7.0.0",
+ "@babel/core": "^7.0.0",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.0.0",
+ "@babel/preset-env": "^7.0.0",
+ "mocha": "^5.2.0",
+ "regexgen": "^1.3.0",
+ "unicode-11.0.0": "^0.7.7",
+ "unicode-tr51": "^9.0.1"
+ },
+ "files": [
+ "LICENSE-MIT.txt",
+ "index.js",
+ "index.d.ts",
+ "text.js",
+ "es2015/index.js",
+ "es2015/text.js"
+ ],
+ "homepage": "https://mths.be/emoji-regex",
+ "keywords": [
+ "unicode",
+ "regex",
+ "regexp",
+ "regular expressions",
+ "code points",
+ "symbols",
+ "characters",
+ "emoji"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "emoji-regex",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mathiasbynens/emoji-regex.git"
+ },
+ "scripts": {
+ "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js",
+ "test": "mocha",
+ "test:watch": "npm run test -- --watch"
+ },
+ "types": "index.d.ts",
+ "version": "7.0.3"
+}
diff --git a/node_modules/emoji-regex/text.js b/node_modules/emoji-regex/text.js
new file mode 100644
index 0000000000000..199ae3be35b41
--- /dev/null
+++ b/node_modules/emoji-regex/text.js
@@ -0,0 +1,6 @@
+"use strict";
+
+module.exports = function () {
+ // https://mths.be/emoji
+ return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g;
+};
diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/from2/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/from2/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/from2/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/fs-write-stream-atomic/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/fs-write-stream-atomic/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/fs-write-stream-atomic/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/gentle-fs/CHANGELOG.md b/node_modules/gentle-fs/CHANGELOG.md
index 50dfcd74c99f1..116c0118f0efe 100644
--- a/node_modules/gentle-fs/CHANGELOG.md
+++ b/node_modules/gentle-fs/CHANGELOG.md
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [2.3.1](https://github.com/npm/gentle-fs/compare/v2.3.0...v2.3.1) (2020-03-25)
+
+
+
# [2.3.0](https://github.com/npm/gentle-fs/compare/v2.2.1...v2.3.0) (2019-12-11)
diff --git a/node_modules/gentle-fs/README.md b/node_modules/gentle-fs/README.md
index 54af51cf99288..f8a3020ac5093 100644
--- a/node_modules/gentle-fs/README.md
+++ b/node_modules/gentle-fs/README.md
@@ -11,7 +11,6 @@
* [Example](#example)
* [Features](#features)
-* [Contributing](#contributing)
* [API](#api)
* [`rm`](#rm)
* [`link`](#link)
@@ -28,14 +27,6 @@
* Performs filesystem operations "gently". Please see details in the API specs below
for a more precise definition of "gently".
-### Contributing
-
-The npm team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
### API
#### `> rm(target, opts, cb)`
diff --git a/node_modules/gentle-fs/package.json b/node_modules/gentle-fs/package.json
index d162899757b0f..b01e0c16beeaf 100644
--- a/node_modules/gentle-fs/package.json
+++ b/node_modules/gentle-fs/package.json
@@ -1,29 +1,29 @@
{
- "_from": "gentle-fs@2.3.0",
- "_id": "gentle-fs@2.3.0",
+ "_from": "gentle-fs@2.3.1",
+ "_id": "gentle-fs@2.3.1",
"_inBundle": false,
- "_integrity": "sha512-3k2CgAmPxuz7S6nKK+AqFE2AdM1QuwqKLPKzIET3VRwK++3q96MsNFobScDjlCrq97ZJ8y5R725MOlm6ffUCjg==",
+ "_integrity": "sha512-OlwBBwqCFPcjm33rF2BjW+Pr6/ll2741l+xooiwTCeaX2CA1ZuclavyMBe0/KlR21/XGsgY6hzEQZ15BdNa13Q==",
"_location": "/gentle-fs",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "gentle-fs@2.3.0",
+ "raw": "gentle-fs@2.3.1",
"name": "gentle-fs",
"escapedName": "gentle-fs",
- "rawSpec": "2.3.0",
+ "rawSpec": "2.3.1",
"saveSpec": null,
- "fetchSpec": "2.3.0"
+ "fetchSpec": "2.3.1"
},
"_requiredBy": [
"#USER",
"/",
"/bin-links"
],
- "_resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.0.tgz",
- "_shasum": "13538db5029400f98684be4894e8a7d8f0d1ea7f",
- "_spec": "gentle-fs@2.3.0",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.1.tgz",
+ "_shasum": "11201bf66c18f930ddca72cf69460bdfa05727b1",
+ "_spec": "gentle-fs@2.3.1",
+ "_where": "/Users/claudiahdz/npm/cli",
"author": {
"name": "Mike Sherov"
},
@@ -52,9 +52,7 @@
"require-inject": "^1.4.2",
"standard": "^10.0.3",
"standard-version": "^4.2.0",
- "tap": "^10.7.2",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
+ "tap": "^10.7.2"
},
"files": [
"index.js",
@@ -78,9 +76,7 @@
"posttest": "standard",
"prerelease": "npm t",
"release": "standard-version -s",
- "test": "tap -J --nyc-arg=--all --coverage test",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ "test": "tap -J --nyc-arg=--all --coverage test"
},
- "version": "2.3.0"
+ "version": "2.3.1"
}
diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md
index 194492736bc4f..a7d8c07970735 100644
--- a/node_modules/get-caller-file/README.md
+++ b/node_modules/get-caller-file/README.md
@@ -2,3 +2,40 @@
[](https://travis-ci.org/stefanpenner/get-caller-file)
[](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)
+
+This is a utility, which allows a function to figure out from which file it was invoked. It does so by inspecting v8's stack trace at the time it is invoked.
+
+Inspired by http://stackoverflow.com/questions/13227489
+
+*note: this relies on Node/V8 specific APIs, as such other runtimes may not work*
+
+## Installation
+
+```bash
+yarn add get-caller-file
+```
+
+## Usage
+
+Given:
+
+```js
+// ./foo.js
+const getCallerFile = require('get-caller-file');
+
+module.exports = function() {
+ return getCallerFile(); // figures out who called it
+};
+```
+
+```js
+// index.js
+const foo = require('./foo');
+
+foo() // => /full/path/to/this/file/index.js
+```
+
+
+## Options:
+
+* `getCallerFile(position = 2)`: where position is stack frame whos fileName we want.
diff --git a/node_modules/get-caller-file/index.d.ts b/node_modules/get-caller-file/index.d.ts
new file mode 100644
index 0000000000000..babed696ae00e
--- /dev/null
+++ b/node_modules/get-caller-file/index.d.ts
@@ -0,0 +1,2 @@
+declare const _default: (position?: number) => any;
+export = _default;
diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js
index 03e7dfc39b040..57304f80345dd 100644
--- a/node_modules/get-caller-file/index.js
+++ b/node_modules/get-caller-file/index.js
@@ -1,20 +1,22 @@
-'use strict';
-
+"use strict";
// Call this function in a another function to find out the file from
// which that function was called from. (Inspects the v8 stack trace)
//
// Inspired by http://stackoverflow.com/questions/13227489
-
-module.exports = function getCallerFile(_position) {
- var oldPrepareStackTrace = Error.prepareStackTrace;
- Error.prepareStackTrace = function(err, stack) { return stack; };
- var stack = new Error().stack;
- Error.prepareStackTrace = oldPrepareStackTrace;
-
- var position = _position ? _position : 2;
-
- // stack[0] holds this file
- // stack[1] holds where this function was called
- // stack[2] holds the file we're interested in
- return stack[position] ? stack[position].getFileName() : undefined;
+module.exports = function getCallerFile(position) {
+ if (position === void 0) { position = 2; }
+ if (position >= Error.stackTraceLimit) {
+ throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`');
+ }
+ var oldPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = function (_, stack) { return stack; };
+ var stack = new Error().stack;
+ Error.prepareStackTrace = oldPrepareStackTrace;
+ if (stack !== null && typeof stack === 'object') {
+ // stack[0] holds this file
+ // stack[1] holds where this function was called
+ // stack[2] holds the file we're interested in
+ return stack[position] ? stack[position].getFileName() : undefined;
+ }
};
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/get-caller-file/index.js.map b/node_modules/get-caller-file/index.js.map
new file mode 100644
index 0000000000000..89c655c06da4a
--- /dev/null
+++ b/node_modules/get-caller-file/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,qEAAqE;AACrE,EAAE;AACF,0DAA0D;AAE1D,iBAAS,SAAS,aAAa,CAAC,QAAY;IAAZ,yBAAA,EAAA,YAAY;IAC1C,IAAI,QAAQ,IAAI,KAAK,CAAC,eAAe,EAAE;QACrC,MAAM,IAAI,SAAS,CAAC,kGAAkG,GAAG,QAAQ,GAAG,oCAAoC,GAAG,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC;KACzM;IAED,IAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,KAAK,CAAC,iBAAiB,GAAG,UAAC,CAAC,EAAE,KAAK,IAAM,OAAA,KAAK,EAAL,CAAK,CAAC;IAC/C,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IAChC,KAAK,CAAC,iBAAiB,GAAG,oBAAoB,CAAC;IAG/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC/C,2BAA2B;QAC3B,gDAAgD;QAChD,8CAA8C;QAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,QAAQ,CAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC7E;AACH,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json
index e853deec1b056..5e58bc7cc07a8 100644
--- a/node_modules/get-caller-file/package.json
+++ b/node_modules/get-caller-file/package.json
@@ -1,27 +1,27 @@
{
- "_from": "get-caller-file@^1.0.1",
- "_id": "get-caller-file@1.0.3",
+ "_from": "get-caller-file@^2.0.1",
+ "_id": "get-caller-file@2.0.5",
"_inBundle": false,
- "_integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
+ "_integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"_location": "/get-caller-file",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "get-caller-file@^1.0.1",
+ "raw": "get-caller-file@^2.0.1",
"name": "get-caller-file",
"escapedName": "get-caller-file",
- "rawSpec": "^1.0.1",
+ "rawSpec": "^2.0.1",
"saveSpec": null,
- "fetchSpec": "^1.0.1"
+ "fetchSpec": "^2.0.1"
},
"_requiredBy": [
"/yargs"
],
- "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "_shasum": "f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a",
- "_spec": "get-caller-file@^1.0.1",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/yargs",
+ "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "_shasum": "4f94412a82db32f36e3b0b9741f8a97feb031f7e",
+ "_spec": "get-caller-file@^2.0.1",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs",
"author": {
"name": "Stefan Penner"
},
@@ -32,15 +32,25 @@
"deprecated": false,
"description": "[](https://travis-ci.org/stefanpenner/get-caller-file) [](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)",
"devDependencies": {
+ "@types/chai": "^4.1.7",
+ "@types/ensure-posix-path": "^1.0.0",
+ "@types/mocha": "^5.2.6",
+ "@types/node": "^11.10.5",
"chai": "^4.1.2",
"ensure-posix-path": "^1.0.1",
- "mocha": "^5.2.0"
+ "mocha": "^5.2.0",
+ "typescript": "^3.3.3333"
},
"directories": {
"test": "tests"
},
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ },
"files": [
- "index.js"
+ "index.js",
+ "index.js.map",
+ "index.d.ts"
],
"homepage": "https://github.com/stefanpenner/get-caller-file#readme",
"license": "ISC",
@@ -51,8 +61,9 @@
"url": "git+https://github.com/stefanpenner/get-caller-file.git"
},
"scripts": {
+ "prepare": "tsc",
"test": "mocha test",
"test:debug": "mocha test"
},
- "version": "1.0.3"
+ "version": "2.0.5"
}
diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md
index e71b967ea2880..0916a48255cd6 100644
--- a/node_modules/glob/README.md
+++ b/node_modules/glob/README.md
@@ -371,3 +371,5 @@ npm run bench
# to profile javascript
npm run prof
```
+
+
diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json
index 788801e299e45..0e1fa5805bccb 100644
--- a/node_modules/glob/package.json
+++ b/node_modules/glob/package.json
@@ -1,23 +1,24 @@
{
- "_from": "glob@7.1.4",
- "_id": "glob@7.1.4",
+ "_from": "glob@7.1.6",
+ "_id": "glob@7.1.6",
"_inBundle": false,
- "_integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
+ "_integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"_location": "/glob",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "glob@7.1.4",
+ "raw": "glob@7.1.6",
"name": "glob",
"escapedName": "glob",
- "rawSpec": "7.1.4",
+ "rawSpec": "7.1.6",
"saveSpec": null,
- "fetchSpec": "7.1.4"
+ "fetchSpec": "7.1.6"
},
"_requiredBy": [
"#USER",
"/",
+ "/cacache",
"/deglob",
"/eslint",
"/init-package-json",
@@ -30,10 +31,10 @@
"/tap-mocha-reporter",
"/test-exclude"
],
- "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
- "_shasum": "aa608a2f6c577ad357e1ae5a5c26d9a8d1969255",
- "_spec": "glob@7.1.4",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "_shasum": "141f33b81a7c2492e125594307480c46679278a6",
+ "_spec": "glob@7.1.6",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -67,6 +68,9 @@
"sync.js",
"common.js"
],
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
"homepage": "https://github.com/isaacs/node-glob#readme",
"license": "ISC",
"main": "glob.js",
@@ -84,5 +88,5 @@
"test": "tap test/*.js --cov",
"test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js"
},
- "version": "7.1.4"
+ "version": "7.1.6"
}
diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js
index 8c75ee259e091..de3df47fd5552 100644
--- a/node_modules/graceful-fs/graceful-fs.js
+++ b/node_modules/graceful-fs/graceful-fs.js
@@ -21,6 +21,14 @@ if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
function noop () {}
+function publishQueue(context, queue) {
+ Object.defineProperty(context, gracefulQueue, {
+ get: function() {
+ return queue
+ }
+ })
+}
+
var debug = noop
if (util.debuglog)
debug = util.debuglog('gfs4')
@@ -32,14 +40,10 @@ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
}
// Once time initialization
-if (!global[gracefulQueue]) {
+if (!fs[gracefulQueue]) {
// This queue can be shared by multiple loaded instances
- var queue = []
- Object.defineProperty(global, gracefulQueue, {
- get: function() {
- return queue
- }
- })
+ var queue = global[gracefulQueue] || []
+ publishQueue(fs, queue)
// Patch fs.close/closeSync to shared queue version, because we need
// to retry() whenever a close happens *anywhere* in the program.
@@ -79,12 +83,16 @@ if (!global[gracefulQueue]) {
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
process.on('exit', function() {
- debug(global[gracefulQueue])
- require('assert').equal(global[gracefulQueue].length, 0)
+ debug(fs[gracefulQueue])
+ require('assert').equal(fs[gracefulQueue].length, 0)
})
}
}
+if (!global[gracefulQueue]) {
+ publishQueue(global, fs[gracefulQueue]);
+}
+
module.exports = patch(clone(fs))
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
module.exports = patch(fs)
@@ -334,11 +342,11 @@ function patch (fs) {
function enqueue (elem) {
debug('ENQUEUE', elem[0].name, elem[1])
- global[gracefulQueue].push(elem)
+ fs[gracefulQueue].push(elem)
}
function retry () {
- var elem = global[gracefulQueue].shift()
+ var elem = fs[gracefulQueue].shift()
if (elem) {
debug('RETRY', elem[0].name, elem[1])
elem[0].apply(null, elem[1])
diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json
index 788876e322073..32518904d9741 100644
--- a/node_modules/graceful-fs/package.json
+++ b/node_modules/graceful-fs/package.json
@@ -1,19 +1,19 @@
{
- "_from": "graceful-fs@4.2.3",
- "_id": "graceful-fs@4.2.3",
+ "_from": "graceful-fs@4.2.4",
+ "_id": "graceful-fs@4.2.4",
"_inBundle": false,
- "_integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
+ "_integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
"_location": "/graceful-fs",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "graceful-fs@4.2.3",
+ "raw": "graceful-fs@4.2.4",
"name": "graceful-fs",
"escapedName": "graceful-fs",
- "rawSpec": "4.2.3",
+ "rawSpec": "4.2.4",
"saveSpec": null,
- "fetchSpec": "4.2.3"
+ "fetchSpec": "4.2.4"
},
"_requiredBy": [
"#USER",
@@ -41,10 +41,10 @@
"/test-exclude/load-json-file",
"/write-file-atomic"
],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "_shasum": "4a12ff1b60376ef09862c2093edd908328be8423",
- "_spec": "graceful-fs@4.2.3",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+ "_shasum": "2256bde14d3632958c465ebc96dc467ca07a29fb",
+ "_spec": "graceful-fs@4.2.4",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli",
"bugs": {
"url": "https://github.com/isaacs/node-graceful-fs/issues"
},
@@ -98,5 +98,5 @@
"preversion": "npm test",
"test": "node test.js | tap -"
},
- "version": "4.2.3"
+ "version": "4.2.4"
}
diff --git a/node_modules/har-validator/LICENSE b/node_modules/har-validator/LICENSE
index ca55c91af4ec5..a54526625e024 100644
--- a/node_modules/har-validator/LICENSE
+++ b/node_modules/har-validator/LICENSE
@@ -1,13 +1,9 @@
-Copyright (c) 2015, Ahmad Nassri
-
-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.
+MIT License
+
+Copyright (c) 2018 Ahmad Nassri
+
+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/har-validator/README.md b/node_modules/har-validator/README.md
index fc696349e41e8..ea944cc5c7bd8 100644
--- a/node_modules/har-validator/README.md
+++ b/node_modules/har-validator/README.md
@@ -1,18 +1,32 @@
-# HAR Validator [![version][npm-version]][npm-url] [![License][license-image]][license-url]
+# HAR Validator
-> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
+[![license][license-img]][license-url]
+[![version][npm-img]][npm-url]
+[![super linter][super-linter-img]][super-linter-url]
+[![test][test-img]][test-url]
+[![release][release-img]][release-url]
+
+[license-url]: LICENSE
+[license-img]: https://badgen.net/github/license/ahmadnassri/node-har-validator
+
+[npm-url]: https://www.npmjs.com/package/har-validator
+[npm-img]: https://badgen.net/npm/v/har-validator
-[![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]
+[super-linter-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Asuper-linter
+[super-linter-img]: https://github.com/ahmadnassri/node-har-validator/workflows/super-linter/badge.svg
+
+[test-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Atest
+[test-img]: https://github.com/ahmadnassri/node-har-validator/workflows/test/badge.svg
+
+[release-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Arelease
+[release-img]: https://github.com/ahmadnassri/node-har-validator/workflows/release/badge.svg
+
+> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
## Install
```bash
-npm install --only=production --save har-validator
+npm install har-validator
```
## CLI Usage
@@ -21,34 +35,9 @@ Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more inf
## 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 compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided*
+**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/node-har-validator/releases/tag/v2.0.0) this module defaults to Promise based API.
+_For backward compatibility 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/) ·
-> License: [ISC][license-url] ·
-> Github: [@ahmadnassri](https://github.com/ahmadnassri) ·
-> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
-
-[license-url]: http://choosealicense.com/licenses/isc/
-[license-image]: https://img.shields.io/github/license/ahmadnassri/har-validator.svg?style=flat-square
-
-[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-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
+- [Promise API](docs/promise.md) _(default)_
diff --git a/node_modules/har-validator/lib/async.js b/node_modules/har-validator/lib/async.js
index fc41667e81456..90701f253f71e 100644
--- a/node_modules/har-validator/lib/async.js
+++ b/node_modules/har-validator/lib/async.js
@@ -4,14 +4,21 @@ var schemas = require('har-schema')
var ajv
+function createAjvInstance () {
+ var ajv = new Ajv({
+ allErrors: true
+ })
+ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
+ ajv.addSchema(schemas)
+
+ return ajv
+}
+
function validate (name, data, next) {
data = data || {}
// validator config
- ajv = ajv || new Ajv({
- allErrors: true,
- schemas: schemas
- })
+ ajv = ajv || createAjvInstance()
var validate = ajv.getSchema(name + '.json')
diff --git a/node_modules/har-validator/lib/promise.js b/node_modules/har-validator/lib/promise.js
index 1ab308cf7157d..46f46479786fa 100644
--- a/node_modules/har-validator/lib/promise.js
+++ b/node_modules/har-validator/lib/promise.js
@@ -4,14 +4,21 @@ var schemas = require('har-schema')
var ajv
+function createAjvInstance () {
+ var ajv = new Ajv({
+ allErrors: true
+ })
+ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
+ ajv.addSchema(schemas)
+
+ return ajv
+}
+
function validate (name, data) {
data = data || {}
// validator config
- ajv = ajv || new Ajv({
- allErrors: true,
- schemas: schemas
- })
+ ajv = ajv || createAjvInstance()
var validate = ajv.getSchema(name + '.json')
diff --git a/node_modules/har-validator/node_modules/ajv/.tonic_example.js b/node_modules/har-validator/node_modules/ajv/.tonic_example.js
new file mode 100644
index 0000000000000..aa11812d87bbc
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/.tonic_example.js
@@ -0,0 +1,20 @@
+var Ajv = require('ajv');
+var ajv = new 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/har-validator/node_modules/ajv/LICENSE b/node_modules/har-validator/node_modules/ajv/LICENSE
new file mode 100644
index 0000000000000..96ee719987f77
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2017 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/har-validator/node_modules/ajv/README.md b/node_modules/har-validator/node_modules/ajv/README.md
new file mode 100644
index 0000000000000..5aa2078d8920b
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/README.md
@@ -0,0 +1,1497 @@
+
+
+# Ajv: Another JSON Schema Validator
+
+The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07.
+
+[](https://travis-ci.org/ajv-validator/ajv)
+[](https://www.npmjs.com/package/ajv)
+[](https://www.npmjs.com/package/ajv/v/7.0.0-beta.0)
+[](https://www.npmjs.com/package/ajv)
+[](https://coveralls.io/github/ajv-validator/ajv?branch=master)
+[](https://gitter.im/ajv-validator/ajv)
+[](https://github.com/sponsors/epoberezkin)
+
+
+## Ajv v7 beta is released
+
+[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes:
+
+- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements.
+- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe.
+- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas.
+- schemas are compiled to ES6 code (ES5 code generation is supported with an option).
+- to improve reliability and maintainability the code is migrated to TypeScript.
+
+**Please note**:
+
+- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021).
+- all formats are separated to ajv-formats package - they have to be explicitely added if you use them.
+
+See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details.
+
+To install the new version:
+
+```bash
+npm install ajv@beta
+```
+
+See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example.
+
+
+## Mozilla MOSS grant and OpenJS Foundation
+
+[ ](https://www.mozilla.org/en-US/moss/) [ ](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/)
+
+Ajv has been awarded a grant from Mozillaโs [Open Source Support (MOSS) program](https://www.mozilla.org/en-US/moss/) in the โFoundational Technologyโ track! It will sponsor the development of Ajv support of [JSON Schema version 2019-09](https://tools.ietf.org/html/draft-handrews-json-schema-02) and of [JSON Type Definition](https://tools.ietf.org/html/draft-ucarion-json-type-definition-04).
+
+Ajv also joined [OpenJS Foundation](https://openjsf.org/) โ having this support will help ensure the longevity and stability of Ajv for all its users.
+
+This [blog post](https://www.poberezkin.com/posts/2020-08-14-ajv-json-validator-mozilla-open-source-grant-openjs-foundation.html) has more details.
+
+I am looking for the long term maintainers of Ajv โ working with [ReadySet](https://www.thereadyset.co/), also sponsored by Mozilla, to establish clear guidelines for the role of a "maintainer" and the contribution standards, and to encourage a wider, more inclusive, contribution from the community.
+
+
+## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
+
+Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
+
+Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
+
+Please sponsor Ajv via:
+- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
+- [Ajv Open Collective๏ธ](https://opencollective.com/ajv)
+
+Thank you.
+
+
+#### Open Collective sponsors
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Using version 6
+
+[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published.
+
+[Ajv version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes).
+
+__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance:
+
+```javascript
+ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'));
+```
+
+To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId:
+
+```javascript
+var ajv = new Ajv({schemaId: 'id'});
+// If you want to use both draft-04 and draft-06/07 schemas:
+// var ajv = new Ajv({schemaId: 'auto'});
+ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
+```
+
+
+## Contents
+
+- [Performance](#performance)
+- [Features](#features)
+- [Getting started](#getting-started)
+- [Frequently Asked Questions](https://github.com/ajv-validator/ajv/blob/master/FAQ.md)
+- [Using in browser](#using-in-browser)
+ - [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp)
+- [Command line interface](#command-line-interface)
+- Validation
+ - [Keywords](#validation-keywords)
+ - [Annotation keywords](#annotation-keywords)
+ - [Formats](#formats)
+ - [Combining schemas with $ref](#ref)
+ - [$data reference](#data-reference)
+ - NEW: [$merge and $patch keywords](#merge-and-patch-keywords)
+ - [Defining custom keywords](#defining-custom-keywords)
+ - [Asynchronous schema compilation](#asynchronous-schema-compilation)
+ - [Asynchronous validation](#asynchronous-validation)
+- [Security considerations](#security-considerations)
+ - [Security contact](#security-contact)
+ - [Untrusted schemas](#untrusted-schemas)
+ - [Circular references in objects](#circular-references-in-javascript-objects)
+ - [Trusted schemas](#security-risks-of-trusted-schemas)
+ - [ReDoS attack](#redos-attack)
+- 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)
+- [Plugins](#plugins)
+- [Related packages](#related-packages)
+- [Some packages using Ajv](#some-packages-using-ajv)
+- [Tests, Contributing, Changes history](#tests)
+- [Support, Code of conduct, License](#open-source-software-support)
+
+
+## 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)
+
+
+Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
+
+[](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
+
+
+## Features
+
+- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards:
+ - all validation keywords (see [JSON Schema validation keywords](https://github.com/ajv-validator/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-07 standard and custom formats (can be turned off)
+ - [validates schemas against meta-schema](#api-validateschema)
+- supports [browsers](#using-in-browser) and Node.js 0.10-14.x
+- [asynchronous loading](#asynchronous-schema-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/ajv-validator/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)
+- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else`
+- draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail).
+- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
+- [$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
+
+
+## Install
+
+```
+npm install ajv
+```
+
+
+## Getting started
+
+Try it in the Node.js REPL: https://tonicdev.com/npm/ajv
+
+
+The fastest validation call:
+
+```javascript
+// Node.js require:
+var Ajv = require('ajv');
+// or ESM/TypeScript import
+import Ajv from '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
+// ...
+var valid = ajv.addSchema(schema, 'mySchema')
+ .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 serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function 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 a 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)
+
+__Note for TypeScript users__: `ajv` provides its own TypeScript declarations
+out of the box, so you don't need to install the deprecated `@types/ajv`
+module.
+
+
+## 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
+
+```
+
+This bundle can be used with different module systems; it 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:
+
+[](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/ajv-validator/ajv/issues/234)).
+
+
+### Ajv and Content Security Policies (CSP)
+
+If you're using Ajv to compile a schema (the typical use) in a browser document that is loaded with a Content Security Policy (CSP), that policy will require a `script-src` directive that includes the value `'unsafe-eval'`.
+:warning: NOTE, however, that `unsafe-eval` is NOT recommended in a secure CSP[[1]](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval), as it has the potential to open the document to cross-site scripting (XSS) attacks.
+
+In order to make use of Ajv without easing your CSP, you can [pre-compile a schema using the CLI](https://github.com/ajv-validator/ajv-cli#compile-schemas). This will transpile the schema JSON into a JavaScript file that exports a `validate` function that works simlarly to a schema compiled at runtime.
+
+Note that pre-compilation of schemas is performed using [ajv-pack](https://github.com/ajv-validator/ajv-pack) and there are [some limitations to the schema features it can compile](https://github.com/ajv-validator/ajv-pack#limitations). A successfully pre-compiled schema is equivalent to the same schema compiled at runtime.
+
+
+## Command line interface
+
+CLI is available as a separate npm package [ajv-cli](https://github.com/ajv-validator/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/ajv-validator/ajv-pack))
+- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate))
+- validating data file(s) against JSON Schema
+- testing expected validity of data against JSON Schema
+- referenced schemas
+- custom meta-schemas
+- files in JSON, JSON5, YAML, 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-07 of JSON Schema standard:
+
+- [type](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#type)
+- [for numbers](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf
+- [for strings](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format
+- [for arrays](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#contains)
+- [for objects](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#propertynames)
+- [for all types](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#const)
+- [compound keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#ifthenelse)
+
+With [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard:
+
+- [patternRequired](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match.
+- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc.
+
+See [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md) for more details.
+
+
+## Annotation keywords
+
+JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation.
+
+- `title` and `description`: information about the data represented by that schema
+- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options).
+- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults).
+- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema.
+- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.).
+- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64".
+- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png".
+
+__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance.
+
+
+## Formats
+
+Ajv implements formats defined by JSON Schema specification and several other formats. It is recommended NOT to use "format" keyword implementations with untrusted data, as they use potentially unsafe regular expressions - see [ReDoS attack](#redos-attack).
+
+__Please note__: if you need to use "format" keyword to validate untrusted data, you MUST assess their suitability and safety for your validation scenarios.
+
+The following formats are implemented 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.
+- _uri-reference_: URI reference, including full and relative URIs.
+- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
+- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url).
+- _email_: email address.
+- _hostname_: host name according 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).
+
+__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here.
+
+There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, and `email`. 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 changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can allow specific format(s) that will be ignored. See [Options](#options) for details.
+
+You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js).
+
+
+## Combining schemas with $ref
+
+You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword.
+
+Example:
+
+```javascript
+var schema = {
+ "$id": "http://example.com/schemas/schema.json",
+ "type": "object",
+ "properties": {
+ "foo": { "$ref": "defs.json#/definitions/int" },
+ "bar": { "$ref": "defs.json#/definitions/str" }
+ }
+};
+
+var defsSchema = {
+ "$id": "http://example.com/schemas/defs.json",
+ "definitions": {
+ "int": { "type": "integer" },
+ "str": { "type": "string" }
+ }
+};
+```
+
+Now to compile your schema you can either pass all schemas to Ajv instance:
+
+```javascript
+var ajv = new Ajv({schemas: [schema, defsSchema]});
+var validate = ajv.getSchema('http://example.com/schemas/schema.json');
+```
+
+or use `addSchema` method:
+
+```javascript
+var ajv = new Ajv;
+var validate = ajv.addSchema(defsSchema)
+ .compile(schema);
+```
+
+See [Options](#options) and [addSchema](#api) method.
+
+__Please note__:
+- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example).
+- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.).
+- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs.
+- The actual location of the schema file in the file system is not used.
+- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id.
+- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown.
+- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation).
+
+
+## $data reference
+
+With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema-org/json-schema-spec/issues/51) for more information about how it works.
+
+`$data` reference is supported in the keywords: const, 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 ajv = new Ajv({$data: true});
+
+var schema = {
+ "properties": {
+ "smaller": {
+ "type": "number",
+ "maximum": { "$data": "1/larger" }
+ },
+ "larger": { "type": "number" }
+ }
+};
+
+var validData = {
+ smaller: 5,
+ larger: 7
+};
+
+ajv.validate(schema, validData); // true
+```
+
+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 `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails.
+
+
+## $merge and $patch keywords
+
+With the package [ajv-merge-patch](https://github.com/ajv-validator/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/ajv-validator/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/ajv-validator/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/ajv-validator/ajv/blob/master/CUSTOM.md) for more details.
+
+
+## Asynchronous schema compilation
+
+During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options).
+
+Example:
+
+```javascript
+var ajv = new Ajv({ loadSchema: loadSchema });
+
+ajv.compileAsync(schema).then(function (validate) {
+ var valid = validate(data);
+ // ...
+});
+
+function loadSchema(uri) {
+ return request.json(uri).then(function (res) {
+ if (res.statusCode >= 400)
+ throw new Error('Loading error: ' + res.statusCode);
+ return res.body;
+ });
+}
+```
+
+__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work.
+
+
+## Asynchronous validation
+
+Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation
+
+You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (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 with `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 [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. 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 synchronous and asynchronous schemas.
+
+Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property.
+
+
+Example:
+
+```javascript
+var ajv = new Ajv;
+// require('ajv-async')(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 (data) {
+ console.log('Data is valid', data); // { userId: 1, postId: 19 }
+})
+.catch(function (err) {
+ if (!(err instanceof Ajv.ValidationError)) throw err;
+ // data is invalid
+ console.log('Validation errors:', err.errors);
+});
+```
+
+### Using transpilers with asynchronous validation functions.
+
+[ajv-async](https://github.com/ajv-validator/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser).
+
+
+#### Using nodent
+
+```javascript
+var ajv = new Ajv;
+require('ajv-async')(ajv);
+// in the browser if you want to load ajv-async bundle separately you can:
+// window.ajvAsync(ajv);
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+
+#### Using other transpilers
+
+```javascript
+var ajv = new Ajv({ processCode: transpileFunc });
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+See [Options](#options).
+
+
+## Security considerations
+
+JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider.
+
+
+##### Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
+
+
+##### Untrusted schemas
+
+Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application.
+
+If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent:
+- compiling schemas can cause stack overflow (if they are too deep)
+- compiling schemas can be slow (e.g. [#557](https://github.com/ajv-validator/ajv/issues/557))
+- validating certain data can be slow
+
+It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords.
+
+Regardless the measures you take, using untrusted schemas increases security risks.
+
+
+##### Circular references in JavaScript objects
+
+Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/ajv-validator/ajv/issues/802).
+
+An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references.
+
+
+##### Security risks of trusted schemas
+
+Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to):
+
+- `pattern` and `format` for large strings - in some cases using `maxLength` can help mitigate it, but certain regular expressions can lead to exponential validation time even with relatively short strings (see [ReDoS attack](#redos-attack)).
+- `patternProperties` for large property names - use `propertyNames` to mitigate, but some regular expressions can have exponential evaluation time as well.
+- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate
+
+__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors).
+
+You can validate your JSON schemas against [this meta-schema](https://github.com/ajv-validator/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed:
+
+```javascript
+const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json'));
+
+const schema1 = {format: 'email'};
+isSchemaSecure(schema1); // false
+
+const schema2 = {format: 'email', maxLength: MAX_LENGTH};
+isSchemaSecure(schema2); // true
+```
+
+__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results.
+
+
+##### Content Security Policies (CSP)
+See [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp)
+
+
+## ReDoS attack
+
+Certain regular expressions can lead to the exponential evaluation time even with relatively short strings.
+
+Please assess the regular expressions you use in the schemas on their vulnerability to this attack - see [safe-regex](https://github.com/substack/safe-regex), for example.
+
+__Please note__: some formats that Ajv implements use [regular expressions](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js) that can be vulnerable to ReDoS attack, so if you use Ajv to validate data from untrusted sources __it is strongly recommended__ to consider the following:
+
+- making assessment of "format" implementations in Ajv.
+- using `format: 'fast'` option that simplifies some of the regular expressions (although it does not guarantee that they are safe).
+- replacing format implementations provided by Ajv with your own implementations of "format" keyword that either uses different regular expressions or another approach to format validation. Please see [addFormat](#api-addformat) method.
+- disabling format validation by ignoring "format" keyword with option `format: false`
+
+Whatever mitigation you choose, please assume all formats provided by Ajv as potentially unsafe and make your own assessment of their suitability for your validation scenarios.
+
+
+## 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/ajv-validator/ajv/issues/129), [#134](https://github.com/ajv-validator/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.
+
+With the option value `"empty"` properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults.
+
+This option modifies original data.
+
+__Please note__: the default value is inserted in the generated validation code as a literal, so the value inserted in the data will be the deep clone of the default in the schema.
+
+
+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" ]
+```
+
+`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/ajv-validator/ajv/issues/42))
+- in `if` subschema of `switch` keyword
+- in schemas generated by custom macro keywords
+
+The [`strictDefaults` option](#options) customizes Ajv's behavior for the defaults that Ajv ignores (`true` raises an error, and `"log"` outputs a warning).
+
+
+## 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/ajv-validator/ajv/blob/master/COERCION.md) for details.
+
+
+## API
+
+##### new Ajv(Object options) -> Object
+
+Create Ajv instance.
+
+
+##### .compile(Object schema) -> Function<Object data>
+
+Generate validating function and cache the compiled schema for future use.
+
+Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema.
+
+The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options).
+
+
+##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise
+
+Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when:
+
+- missing schema can't be loaded (`loadSchema` returns a Promise that rejects).
+- a schema containing a missing reference is loaded, but the reference cannot be resolved.
+- schema (or some loaded/referenced schema) is invalid.
+
+The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded.
+
+You can asynchronously compile meta-schema by passing `true` as the second parameter.
+
+See example in [Asynchronous compilation](#asynchronous-schema-compilation).
+
+
+##### .validate(Object schema|String key|String ref, data) -> 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<Object>|Object schema [, String key]) -> Ajv
+
+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.
+
+__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`.
+This allows you to do nice things like the following.
+
+```javascript
+var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri);
+```
+
+##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv
+
+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-07 meta schema (http://json-schema.org/draft-07/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`.
+
+
+##### .validateSchema(Object schema) -> 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 6 meta-schema (option `meta` should not be false).
+
+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) -> Function<Object data>
+
+Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema.
+
+
+##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv
+
+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.
+
+
+##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv
+
+Add custom format to validate strings or numbers. 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` (defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package). 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`.
+- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/ajv-validator/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass.
+
+Custom formats can be also added via `formats` option.
+
+
+##### .addKeyword(String keyword, Object definition) -> Ajv
+
+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
+- _dependencies_: an optional list of properties that must be present in the parent schema - it will be checked during schema compilation
+- _modifying_: `true` MUST be passed if keyword modifies data
+- _statements_: `true` can be passed in case inline keyword generates statements (as opposed to expression)
+- _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 or string `"full"` 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) -> Object|Boolean
+
+Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown.
+
+
+##### .removeKeyword(String keyword) -> Ajv
+
+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<Object> errors [, Object options]]) -> 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:
+ $data: false,
+ allErrors: false,
+ verbose: false,
+ $comment: false, // NEW in Ajv version 6.0
+ jsonPointers: false,
+ uniqueItems: true,
+ unicode: true,
+ nullable: false,
+ format: 'fast',
+ formats: {},
+ unknownFormats: true,
+ schemas: {},
+ logger: undefined,
+ // referenced schema options:
+ schemaId: '$id',
+ missingRefs: true,
+ extendRefs: 'ignore', // recommended 'fail'
+ loadSchema: undefined, // function(uri: string): Promise {}
+ // options to modify validated data:
+ removeAdditional: false,
+ useDefaults: false,
+ coerceTypes: false,
+ // strict mode options
+ strictDefaults: false,
+ strictKeywords: false,
+ strictNumbers: false,
+ // asynchronous validation options:
+ transpile: undefined, // requires ajv-async package
+ // advanced options:
+ meta: true,
+ validateSchema: true,
+ addUsedSchema: true,
+ inlineRefs: true,
+ passContext: false,
+ loopRequired: Infinity,
+ ownProperties: false,
+ multipleOfPrecision: false,
+ errorDataPath: 'object', // deprecated
+ messages: true,
+ sourceCode: false,
+ processCode: undefined, // function (str: string, schema: object): string {}
+ cache: new Cache,
+ serialize: undefined
+}
+```
+
+##### Validation and reporting options
+
+- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api).
+- _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).
+- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values:
+ - `false` (default): ignore $comment keyword.
+ - `true`: log the keyword value to console.
+ - function: pass the keyword value, its schema path and root schema to the specified function
+- _jsonPointers_: set `dataPath` property 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.
+- _nullable_: support keyword "nullable" from [Open API 3 specification](https://swagger.io/docs/specification/data-models/data-types/).
+- _format_: formats validation mode. Option values:
+ - `"fast"` (default) - simplified and fast validation (see [Formats](#formats) for details of which formats are available and affected by this option).
+ - `"full"` - more restrictive and slow validation. 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.
+ - `false` - ignore all format keywords.
+- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method.
+- _keywords_: an object with custom keywords. Keys and values will be passed to `addKeyword` method.
+- _unknownFormats_: handling of unknown formats. Option values:
+ - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$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 another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail.
+ - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification.
+- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object.
+- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. See [Error logging](#error-logging). Option values:
+ - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown.
+ - `false` - logging is disabled.
+
+
+##### Referenced schema options
+
+- _schemaId_: this option defines which keywords are used as schema URI. Option value:
+ - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged).
+ - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged).
+ - `"auto"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation.
+- _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:
+ - `"ignore"` (default) - 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"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing.
+ - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0).
+- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-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 or undefined 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 (object literal is used).
+ - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string).
+ - `"shared"` (deprecated) - insert defaults by reference. 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/ajv-validator/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).
+
+
+##### Strict mode options
+
+- _strictDefaults_: report ignored `default` keywords in schemas. Option values:
+ - `false` (default) - ignored defaults are not reported
+ - `true` - if an ignored default is present, throw an error
+ - `"log"` - if an ignored default is present, log warning
+- _strictKeywords_: report unknown keywords in schemas. Option values:
+ - `false` (default) - unknown keywords are not reported
+ - `true` - if an unknown keyword is present, throw an error
+ - `"log"` - if an unknown keyword is present, log warning
+- _strictNumbers_: validate numbers strictly, failing validation for NaN and Infinity. Option values:
+ - `false` (default) - NaN or Infinity will pass validation for numeric types
+ - `true` - NaN or Infinity will not pass validation for numeric types
+
+##### Asynchronous validation options
+
+- _transpile_: Requires [ajv-async](https://github.com/ajv-validator/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values:
+ - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported.
+ - `true` - always transpile with nodent.
+ - `false` - do not transpile; if async functions are not supported an exception will be thrown.
+
+
+##### Advanced options
+
+- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). 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 be http://json-schema.org/draft-07/schema or absent (draft-07 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` (or `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/ajv-validator/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_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`.
+- _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/ajv-validator/ajv-i18n)).
+- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call).
+- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options:
+ - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass a function calling `require('js-beautify').js_beautify` as `processCode: code => js_beautify(code)`.
+ - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/ajv-validator/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information.
+- _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()`.
+- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used.
+
+
+## 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 when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property.
+
+
+### 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/ajv-validator/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).
+
+__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`.
+
+
+### 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).
+- `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 dependencies).
+- `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).
+- `propertyNames` - property `propertyName` (an invalid property name).
+- `patternRequired` (in ajv-keywords) - 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).
+- `const` - property `allowedValue` pointing to the value (the schema of the keyword).
+- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword).
+- `$ref` - property `ref` with the referenced schema URI.
+- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes).
+- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name).
+
+
+### Error logging
+
+Using the `logger` option when initiallizing Ajv will allow you to define custom logging. Here you can build upon the exisiting logging. The use of other logging packages is supported as long as the package or its associated wrapper exposes the required methods. If any of the required methods are missing an exception will be thrown.
+- **Required Methods**: `log`, `warn`, `error`
+
+```javascript
+var otherLogger = new OtherLogger();
+var ajv = new Ajv({
+ logger: {
+ log: console.log.bind(console),
+ warn: function warn() {
+ otherLogger.logWarn.apply(otherLogger, arguments);
+ },
+ error: function error() {
+ otherLogger.logError.apply(otherLogger, arguments);
+ console.error.apply(console, arguments);
+ }
+ }
+});
+```
+
+
+## Plugins
+
+Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions:
+
+- it exports a function
+- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining
+- this function can accept an optional configuration as the second parameter
+
+If you have published a useful plugin please submit a PR to add it to the next section.
+
+
+## Related packages
+
+- [ajv-async](https://github.com/ajv-validator/ajv-async) - plugin to configure async validation mode
+- [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats
+- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface
+- [ajv-errors](https://github.com/ajv-validator/ajv-errors) - plugin for custom error messages
+- [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) - internationalised error messages
+- [ajv-istanbul](https://github.com/ajv-validator/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas
+- [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.)
+- [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) - plugin with keywordsย $merge and $patch
+- [ajv-pack](https://github.com/ajv-validator/ajv-pack) - produces a compact module exporting validation functions
+- [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) - format validators for draft2019 that aren't already included in ajv (ie. `idn-hostname`, `idn-email`, `iri`, `iri-reference` and `duration`).
+
+## 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
+- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX
+
+
+## Tests
+
+```
+npm install
+git submodule update --init
+npm test
+```
+
+## Contributing
+
+All validation functions are generated using doT templates in [dot](https://github.com/ajv-validator/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/ajv-validator/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/ajv-validator/ajv/blob/master/CONTRIBUTING.md)
+
+
+## Changes history
+
+See https://github.com/ajv-validator/ajv/releases
+
+__Please note__: [Changes in version 7.0.0-beta](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0)
+
+[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
+
+## Code of conduct
+
+Please review and follow the [Code of conduct](https://github.com/ajv-validator/ajv/blob/master/CODE_OF_CONDUCT.md).
+
+Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
+
+
+## Open-source software support
+
+Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
+
+
+## License
+
+[MIT](https://github.com/ajv-validator/ajv/blob/master/LICENSE)
diff --git a/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js b/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js
new file mode 100644
index 0000000000000..e4d9d156ff757
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js
@@ -0,0 +1,7189 @@
+(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(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
+// For the source: https://gist.github.com/dperini/729294
+// For test cases: https://mathiasbynens.be/demo/url-regex
+// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
+// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
+var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
+var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
+var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[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';
+ return util.copy(formats[mode]);
+}
+
+
+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|23:59:60)(?:\.\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|23:59:60)(?:\.\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,
+ 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ // 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,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ // 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,
+ 'uri-reference': URIREF,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ 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,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+function isLeapYear(year) {
+ // https://tools.ietf.org/html/rfc3339#appendix-C
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
+}
+
+
+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 year = +matches[1];
+ var month = +matches[2];
+ var day = +matches[3];
+
+ return month >= 1 && month <= 12 && day >= 1 &&
+ day <= (month == 2 && isLeapYear(year) ? 29 : 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) ||
+ (hour == 23 && minute == 59 && second == 60)) &&
+ (!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);
+}
+
+
+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);
+}
+
+
+var Z_ANCHOR = /[^\\]\\Z/;
+function regex(str) {
+ if (Z_ANCHOR.test(str)) return false;
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
+
+},{"./util":10}],5:[function(require,module,exports){
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , errorClasses = require('./error_classes')
+ , stableStringify = require('fast-json-stable-stringify');
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var ucs2length = util.ucs2length;
+var equal = require('fast-deep-equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = errorClasses.Validation;
+
+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 = [];
+
+ 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 (opts.sourceCode) cv.source = v.source;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ /* @this {*} - custom context, see passContext option */
+ function callValidate() {
+ /* jshint validthis: true */
+ var validate = compilation.validate;
+ var result = validate.apply(this, 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;
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ MissingRefError: errorClasses.MissingRef,
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ logger: self.logger,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode;
+
+ if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);
+ // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
+ var validate;
+ try {
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ sourceCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ self.logger.error('Error compiling schema, function code:', sourceCode);
+ 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 (opts.sourceCode === true) {
+ validate.source = {
+ code: sourceCode,
+ 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 === undefined) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v === undefined) {
+ removeLocalRef(ref);
+ } else {
+ 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 removeLocalRef(ref) {
+ delete refs[ref];
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object' || typeof refVal == 'boolean'
+ ? { 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) {
+ if (self._opts.validateSchema !== false) {
+ var deps = rule.definition.dependencies;
+ if (deps && !deps.every(function(keyword) {
+ return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
+ }))
+ throw new Error('parent schema must have all required keywords: ' + deps.join(','));
+
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') self.logger.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;
+ if (!validate) return;
+ }
+
+ if (validate === undefined)
+ throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
+
+ 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= 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;
+};
+
+},{}],10:[function(require,module,exports){
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ equal: require('fast-deep-equal'),
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ schemaUnknownRules: schemaUnknownRules,
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ unescapeJsonPointer: unescapeJsonPointer,
+ 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, strictNumbers, 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 +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data, strictNumbers) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, strictNumbers, 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, strictNumbers, 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= 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',
+ $notOp = $isMax ? '>' : '<',
+ $errorKeyword = undefined;
+ if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
+ throw new Error($keyword + ' must be number');
+ }
+ if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) {
+ throw new Error($exclusiveKeyword + ' must be number or boolean');
+ }
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $exclType = 'exclType' + $lvl,
+ $exclIsNumber = 'exclIsNumber' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ 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 += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; ';
+ if ($schema === undefined) {
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaValueExcl;
+ $isData = $isDataExcl;
+ }
+ } else {
+ var $exclIsNumber = typeof $schemaExcl == 'number',
+ $opStr = $op;
+ if ($exclIsNumber && $isData) {
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
+ } else {
+ if ($exclIsNumber && $schema === undefined) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ }
+ }
+ $errorKeyword = $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 += '' + ($schemaValue) + '\'';
+ }
+ }
+ 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;
+}
+
+},{}],14:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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 += 'fewer';
+ }
+ 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;
+}
+
+},{}],15:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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;
+}
+
+},{}],16:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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 += 'fewer';
+ }
+ 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;
+}
+
+},{}],17:[function(require,module,exports){
+'use strict';
+module.exports = function generate_allOf(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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)) + ' ';
+ }
+ }
+ return out;
+}
+
+},{}],18:[function(require,module,exports){
+'use strict';
+module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],19:[function(require,module,exports){
+'use strict';
+module.exports = function generate_comment(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $comment = it.util.toQuotedString($schema);
+ if (it.opts.$comment === true) {
+ out += ' console.log(' + ($comment) + ');';
+ } else if (typeof it.opts.$comment == 'function') {
+ out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
+ }
+ return out;
+}
+
+},{}],20:[function(require,module,exports){
+'use strict';
+module.exports = function generate_const(it, $keyword, $ruleType) {
+ 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.$data && $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: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';
+ 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 += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],21:[function(require,module,exports){
+'use strict';
+module.exports = function generate_contains(it, $keyword, $ruleType) {
+ 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,
+ $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all));
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($nonEmptySchema) {
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($nextValid) + ' = false; 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) + ' ';
+ }
+ out += ' if (' + ($nextValid) + ') break; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
+ } else {
+ out += ' if (' + ($data) + '.length == 0) {';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should contain a valid item\' ';
+ }
+ 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 ($nonEmptySchema) {
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ }
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
+
+},{}],22:[function(require,module,exports){
+'use strict';
+module.exports = function generate_custom(it, $keyword, $ruleType) {
+ 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.$data && $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,
+ $closingBraces = '';
+ 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);
+ if (!$ruleValidate) return;
+ $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 ($isData && $rDef.$data) {
+ $closingBraces += '}';
+ out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
+ if ($validateSchema) {
+ $closingBraces += '}';
+ 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);
+ var $closingBraces = '';
+ $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 += 'await ';
+ }
+ out += '' + (def_callRuleValidate) + '; ';
+ } else {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (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 += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ out += '' + ($closingBraces);
+ 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) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ out += ') { ';
+ $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) {';
+ }
+ return out;
+}
+
+},{}],24:[function(require,module,exports){
+'use strict';
+module.exports = function generate_enum(it, $keyword, $ruleType) {
+ 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.$data && $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;
+}
+
+},{}],25:[function(require,module,exports){
+'use strict';
+module.exports = function generate_format(it, $keyword, $ruleType) {
+ 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.$data && $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,
+ $isObject = 'isObject' + $lvl,
+ $formatType = 'formatType' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ 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 != 'ignore') {
+ out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
+ if ($allowUnknown) {
+ out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
+ }
+ out += ') || ';
+ }
+ out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($unknownFormats == 'ignore') {
+ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($formatType != $ruleType) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(await ' + ($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;
+}
+
+},{}],26:[function(require,module,exports){
+'use strict';
+module.exports = function generate_if(it, $keyword, $ruleType) {
+ 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);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $thenSch = it.schema['then'],
+ $elseSch = it.schema['else'],
+ $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)),
+ $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)),
+ $currentBaseId = $it.baseId;
+ if ($thenPresent || $elsePresent) {
+ var $ifClause;
+ $it.createErrors = false;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ $it.createErrors = true;
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ if ($thenPresent) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $it.schema = it.schema['then'];
+ $it.schemaPath = it.schemaPath + '.then';
+ $it.errSchemaPath = it.errSchemaPath + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'then\'; ';
+ } else {
+ $ifClause = '\'then\'';
+ }
+ out += ' } ';
+ if ($elsePresent) {
+ out += ' else { ';
+ }
+ } else {
+ out += ' if (!' + ($nextValid) + ') { ';
+ }
+ if ($elsePresent) {
+ $it.schema = it.schema['else'];
+ $it.schemaPath = it.schemaPath + '.else';
+ $it.errSchemaPath = it.errSchemaPath + '/else';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'else\'; ';
+ } else {
+ $ifClause = '\'else\'';
+ }
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' ';
+ }
+ 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; ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],27:[function(require,module,exports){
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('./ref'),
+ allOf: require('./allOf'),
+ anyOf: require('./anyOf'),
+ '$comment': require('./comment'),
+ const: require('./const'),
+ contains: require('./contains'),
+ dependencies: require('./dependencies'),
+ 'enum': require('./enum'),
+ format: require('./format'),
+ 'if': require('./if'),
+ items: require('./items'),
+ maximum: require('./_limit'),
+ minimum: require('./_limit'),
+ maxItems: require('./_limitItems'),
+ minItems: require('./_limitItems'),
+ maxLength: require('./_limitLength'),
+ minLength: require('./_limitLength'),
+ maxProperties: require('./_limitProperties'),
+ minProperties: require('./_limitProperties'),
+ multipleOf: require('./multipleOf'),
+ not: require('./not'),
+ oneOf: require('./oneOf'),
+ pattern: require('./pattern'),
+ properties: require('./properties'),
+ propertyNames: require('./propertyNames'),
+ required: require('./required'),
+ uniqueItems: require('./uniqueItems'),
+ validate: require('./validate')
+};
+
+},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){
+'use strict';
+module.exports = function generate_items(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : 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.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : 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 += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
+
+},{}],29:[function(require,module,exports){
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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 += '' + ($schemaValue) + '\'';
+ }
+ }
+ 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;
+}
+
+},{}],30:[function(require,module,exports){
+'use strict';
+module.exports = function generate_not(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : 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;
+}
+
+},{}],31:[function(require,module,exports){
+'use strict';
+module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+ 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 $currentBaseId = $it.baseId,
+ $prevValid = 'prevValid' + $lvl,
+ $passingSchemas = 'passingSchemas' + $lvl;
+ out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; ';
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } ';
+ 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 += ' {} ';
+ }
+ 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; ';
+ }
+ }
+ out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
+
+},{}],32:[function(require,module,exports){
+'use strict';
+module.exports = function generate_pattern(it, $keyword, $ruleType) {
+ 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.$data && $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;
+}
+
+},{}],33:[function(require,module,exports){
+'use strict';
+module.exports = function generate_properties(it, $keyword, $ruleType) {
+ 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 $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl;
+ var $schemaKeys = Object.keys($schema || {}).filter(notProto),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties).filter(notProto),
+ $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.$data && $required.$data) && $required.length < it.opts.loopRequired) {
+ var $requiredHash = it.util.toHash($required);
+ }
+
+ function notProto(p) {
+ return p !== '__proto__';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined;';
+ }
+ if ($checkAdditional) {
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 8) {
+ out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($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) + ') ';
+ }
+ }
+ }
+ 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: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is an invalid additional property';
+ } else {
+ out += 'should NOT have additional properties';
+ }
+ out += '\' ';
+ }
+ 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 arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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 ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($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 ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ' ) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr4 = $pPropertyKeys;
+ if (arr4) {
+ var $pProperty, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $pProperty = arr4[i4 += 1];
+ var $sch = $pProperties[$pProperty];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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);
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ 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 ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
+
+},{}],34:[function(require,module,exports){
+'use strict';
+module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
+ 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;
+ out += 'var ' + ($errs) + ' = errors;';
+ if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $i = 'i' + $lvl,
+ $invalidName = '\' + ' + $key + ' + \'',
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined; ';
+ }
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' var startErrs' + ($lvl) + ' = errors; ';
+ var $passData = $key;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ 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) + ' ';
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : 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,
+ $ownProperties = it.opts.ownProperties;
+ 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 ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += '; 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 $propertyKey, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $propertyKey = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $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 ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += ') { 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 $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { 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;
+}
+
+},{}],37:[function(require,module,exports){
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+ 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.$data && $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 i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';
+ var $itemType = it.schema.items && it.schema.items.type,
+ $typeIsArray = Array.isArray($itemType);
+ if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {
+ out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';
+ } else {
+ out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';
+ var $method = 'checkDataType' + ($typeIsArray ? 's' : '');
+ out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; ';
+ if ($typeIsArray) {
+ out += ' if (typeof item == \'string\') item = \'"\' + item; ';
+ }
+ out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';
+ }
+ out += ' } ';
+ 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;
+}
+
+},{}],38:[function(require,module,exports){
+'use strict';
+module.exports = function generate_validate(it, $keyword, $ruleType) {
+ var out = '';
+ var $async = it.schema.$async === true,
+ $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
+ $id = it.self._getId(it.schema);
+ if (it.opts.strictKeywords) {
+ var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
+ if ($unknownKwd) {
+ var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
+ if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
+ else throw new Error($keywordsMsg);
+ }
+ }
+ if (it.isTop) {
+ out += ' var validate = ';
+ if ($async) {
+ it.async = true;
+ out += 'async ';
+ }
+ out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
+ if ($id && (it.opts.sourceCode || it.opts.processCode)) {
+ out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
+ }
+ }
+ if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
+ var $keyword = 'false schema';
+ 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;
+ if (it.schema === false) {
+ if (it.isTop) {
+ $breakOnError = true;
+ } else {
+ out += ' var ' + ($valid) + ' = false; ';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'boolean schema is false\' ';
+ }
+ 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++; ';
+ }
+ } else {
+ if (it.isTop) {
+ if ($async) {
+ out += ' return data; ';
+ } else {
+ out += ' validate.errors = null; return true; ';
+ }
+ } else {
+ out += ' var ' + ($valid) + ' = true; ';
+ }
+ }
+ if (it.isTop) {
+ out += ' }; return validate; ';
+ }
+ return out;
+ }
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+ it.dataPathArr = [""];
+ if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored in the schema root';
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ out += ' 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 ($id) it.baseId = it.resolve.url(it.baseId, $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 $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
+ if ($typeIsArray) {
+ if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null');
+ } else if ($typeSchema != 'null') {
+ $typeSchema = [$typeSchema, 'null'];
+ $typeIsArray = true;
+ }
+ }
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+ if (it.schema.$ref && $refKeywords) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
+ } else if (it.opts.extendRefs !== true) {
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ if (it.schema.$comment && it.opts.$comment) {
+ out += ' ' + (it.RULES.all.$comment.code(it, '$comment'));
+ }
+ if ($typeSchema) {
+ if (it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ }
+ var $rulesGroup = it.RULES.types[$typeSchema];
+ if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { ';
+ if ($coerceToTypes) {
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } ';
+ }
+ out += ' if (' + ($coerced) + ' !== undefined) ; ';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($type == 'string') {
+ out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' else { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '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 (' + ($coerced) + ' !== undefined) { ';
+ 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) + '; } ';
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '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 (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, it.opts.strictNumbers)) + ') { ';
+ }
+ if (it.opts.useDefaults) {
+ 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);
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($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 + ']';
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($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)) {
+ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
+ if ($code) {
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
+ 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: \'' + ($errorKeyword || '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 ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return data; ';
+ 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) + ';';
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i = 0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i = 0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined) return true;
+ }
+ return out;
+}
+
+},{}],39:[function(require,module,exports){
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var customRuleCode = require('./dotjs/custom');
+var definitionSchema = require('./definition_schema');
+
+module.exports = {
+ add: addKeyword,
+ get: getKeyword,
+ remove: removeKeyword,
+ validate: validateKeyword
+};
+
+
+/**
+ * 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`.
+ * @return {Ajv} this for method chaining
+ */
+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) {
+ this.validateKeyword(definition, true);
+
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ for (var i=0; i 1) {
+ sets[0] = sets[0].slice(0, -1);
+ var xl = sets.length - 1;
+ for (var x = 1; x < xl; ++x) {
+ sets[x] = sets[x].slice(1, -1);
+ }
+ sets[xl] = sets[xl].slice(1);
+ return sets.join('');
+ } else {
+ return sets[0];
+ }
+}
+function subexp(str) {
+ return "(?:" + str + ")";
+}
+function typeOf(o) {
+ return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
+}
+function toUpperCase(str) {
+ return str.toUpperCase();
+}
+function toArray(obj) {
+ return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
+}
+function assign(target, source) {
+ var obj = target;
+ if (source) {
+ for (var key in source) {
+ obj[key] = source[key];
+ }
+ }
+ return obj;
+}
+
+function buildExps(isIRI) {
+ var ALPHA$$ = "[A-Za-z]",
+ CR$ = "[\\x0D]",
+ DIGIT$$ = "[0-9]",
+ DQUOTE$$ = "[\\x22]",
+ HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"),
+ //case-insensitive
+ LF$$ = "[\\x0A]",
+ SP$$ = "[\\x20]",
+ PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)),
+ //expanded
+ GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]",
+ SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",
+ RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),
+ UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]",
+ //subset, excludes bidi control characters
+ IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
+ //subset
+ UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
+ SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
+ USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
+ DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$),
+ DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
+ //relaxed parsing rules
+ IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
+ H16$ = subexp(HEXDIG$$ + "{1,4}"),
+ LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$),
+ IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$),
+ // 6( h16 ":" ) ls32
+ IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$),
+ // "::" 5( h16 ":" ) ls32
+ IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$),
+ //[ h16 ] "::" 4( h16 ":" ) ls32
+ IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$),
+ //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+ IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$),
+ //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+ IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$),
+ //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
+ IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$),
+ //[ *4( h16 ":" ) h16 ] "::" ls32
+ IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$),
+ //[ *5( h16 ":" ) h16 ] "::" h16
+ IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
+ //[ *6( h16 ":" ) h16 ] "::"
+ IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
+ ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
+ //RFC 6874
+ IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$),
+ //RFC 6874
+ IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$),
+ //RFC 6874, with relaxed parsing rules
+ IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
+ IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"),
+ //RFC 6874
+ REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
+ HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$),
+ PORT$ = subexp(DIGIT$$ + "*"),
+ AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"),
+ PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
+ SEGMENT$ = subexp(PCHAR$ + "*"),
+ SEGMENT_NZ$ = subexp(PCHAR$ + "+"),
+ SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
+ PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"),
+ PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"),
+ //simplified
+ PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_EMPTY$ = "(?!" + PCHAR$ + ")",
+ PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"),
+ FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"),
+ HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$),
+ RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$),
+ ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"),
+ GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$",
+ SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
+ return {
+ NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
+ NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
+ NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
+ ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ UNRESERVED: new RegExp(UNRESERVED$$, "g"),
+ OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
+ PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
+ IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
+ IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
+ };
+}
+var URI_PROTOCOL = buildExps(false);
+
+var IRI_PROTOCOL = buildExps(true);
+
+var slicedToArray = function () {
+ function sliceIterator(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"]) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+ }
+
+ return function (arr, i) {
+ if (Array.isArray(arr)) {
+ return arr;
+ } else if (Symbol.iterator in Object(arr)) {
+ return sliceIterator(arr, i);
+ } else {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+ }
+ };
+}();
+
+
+
+
+
+
+
+
+
+
+
+
+
+var toConsumableArray = function (arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
+
+ return arr2;
+ } else {
+ return Array.from(arr);
+ }
+};
+
+/** Highest positive signed 32-bit float value */
+
+var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
+
+/** Bootstring parameters */
+var base = 36;
+var tMin = 1;
+var tMax = 26;
+var skew = 38;
+var damp = 700;
+var initialBias = 72;
+var initialN = 128; // 0x80
+var delimiter = '-'; // '\x2D'
+
+/** Regular expressions */
+var regexPunycode = /^xn--/;
+var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
+var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
+
+/** Error messages */
+var 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 */
+var baseMinusTMin = base - tMin;
+var floor = Math.floor;
+var stringFromCharCode = String.fromCharCode;
+
+/*--------------------------------------------------------------------------*/
+
+/**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+function error$1(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 result = [];
+ var length = array.length;
+ 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
+ * @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 = [];
+ var counter = 0;
+ var length = string.length;
+ while (counter < length) {
+ var value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // It's a high surrogate, and there is a next character.
+ var extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) {
+ // Low surrogate.
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // It's an 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).
+ */
+var ucs2encode = function ucs2encode(array) {
+ return String.fromCodePoint.apply(String, toConsumableArray(array));
+};
+
+/**
+ * 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.
+ */
+var basicToDigit = function basicToDigit(codePoint) {
+ if (codePoint - 0x30 < 0x0A) {
+ return codePoint - 0x16;
+ }
+ if (codePoint - 0x41 < 0x1A) {
+ return codePoint - 0x41;
+ }
+ if (codePoint - 0x61 < 0x1A) {
+ return codePoint - 0x61;
+ }
+ 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.
+ */
+var digitToBasic = 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
+ */
+var adapt = 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.
+ */
+var decode = function decode(input) {
+ // Don't use UCS-2.
+ var output = [];
+ var inputLength = input.length;
+ var i = 0;
+ var n = initialN;
+ var bias = initialBias;
+
+ // 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.
+
+ var basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (var j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error$1('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 (var 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`.
+ var oldi = i;
+ for (var w = 1, k = base;; /* no condition */k += base) {
+
+ if (index >= inputLength) {
+ error$1('invalid-input');
+ }
+
+ var digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error$1('overflow');
+ }
+
+ i += digit * w;
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+
+ if (digit < t) {
+ break;
+ }
+
+ var baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error$1('overflow');
+ }
+
+ w *= baseMinusT;
+ }
+
+ var 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$1('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output.
+ output.splice(i++, 0, n);
+ }
+
+ return String.fromCodePoint.apply(String, 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.
+ */
+var encode = function encode(input) {
+ var output = [];
+
+ // Convert the input in UCS-2 to an array of Unicode code points.
+ input = ucs2decode(input);
+
+ // Cache the length.
+ var inputLength = input.length;
+
+ // Initialize the state.
+ var n = initialN;
+ var delta = 0;
+ var bias = initialBias;
+
+ // Handle the basic code points.
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var _currentValue2 = _step.value;
+
+ if (_currentValue2 < 0x80) {
+ output.push(stringFromCharCode(_currentValue2));
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ var basicLength = output.length;
+ var handledCPCount = basicLength;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string with a delimiter unless it's empty.
+ 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:
+ var m = maxInt;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var currentValue = _step2.value;
+
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's state to ,
+ // but guard against overflow.
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+
+ var handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error$1('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var _currentValue = _step3.value;
+
+ if (_currentValue < n && ++delta > maxInt) {
+ error$1('overflow');
+ }
+ if (_currentValue == n) {
+ // Represent delta as a generalized variable-length integer.
+ var q = delta;
+ for (var k = base;; /* no condition */k += base) {
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+ if (q < t) {
+ break;
+ }
+ var qMinusT = q - t;
+ var 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;
+ }
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ ++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.
+ */
+var toUnicode = 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.
+ */
+var toASCII = function toASCII(input) {
+ return mapDomain(input, function (string) {
+ return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
+ });
+};
+
+/*--------------------------------------------------------------------------*/
+
+/** Define the public API */
+var punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '2.1.0',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+};
+
+/**
+ * URI.js
+ *
+ * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
+ * @author Gary Court
+ * @see http://github.com/garycourt/uri-js
+ */
+/**
+ * Copyright 2011 Gary Court. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT OR
+ * 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 views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of Gary Court.
+ */
+var SCHEMES = {};
+function pctEncChar(chr) {
+ var c = chr.charCodeAt(0);
+ var e = void 0;
+ if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
+ return e;
+}
+function pctDecChars(str) {
+ var newStr = "";
+ var i = 0;
+ var il = str.length;
+ while (i < il) {
+ var c = parseInt(str.substr(i + 1, 2), 16);
+ if (c < 128) {
+ newStr += String.fromCharCode(c);
+ i += 3;
+ } else if (c >= 194 && c < 224) {
+ if (il - i >= 6) {
+ var c2 = parseInt(str.substr(i + 4, 2), 16);
+ newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
+ } else {
+ newStr += str.substr(i, 6);
+ }
+ i += 6;
+ } else if (c >= 224) {
+ if (il - i >= 9) {
+ var _c = parseInt(str.substr(i + 4, 2), 16);
+ var c3 = parseInt(str.substr(i + 7, 2), 16);
+ newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
+ } else {
+ newStr += str.substr(i, 9);
+ }
+ i += 9;
+ } else {
+ newStr += str.substr(i, 3);
+ i += 3;
+ }
+ }
+ return newStr;
+}
+function _normalizeComponentEncoding(components, protocol) {
+ function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(protocol.UNRESERVED) ? str : decStr;
+ }
+ if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
+ if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ return components;
+}
+
+function _stripLeadingZeros(str) {
+ return str.replace(/^0*(.*)/, "$1") || "0";
+}
+function _normalizeIPv4(host, protocol) {
+ var matches = host.match(protocol.IPV4ADDRESS) || [];
+
+ var _matches = slicedToArray(matches, 2),
+ address = _matches[1];
+
+ if (address) {
+ return address.split(".").map(_stripLeadingZeros).join(".");
+ } else {
+ return host;
+ }
+}
+function _normalizeIPv6(host, protocol) {
+ var matches = host.match(protocol.IPV6ADDRESS) || [];
+
+ var _matches2 = slicedToArray(matches, 3),
+ address = _matches2[1],
+ zone = _matches2[2];
+
+ if (address) {
+ var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),
+ _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
+ last = _address$toLowerCase$2[0],
+ first = _address$toLowerCase$2[1];
+
+ var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
+ var lastFields = last.split(":").map(_stripLeadingZeros);
+ var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
+ var fieldCount = isLastFieldIPv4Address ? 7 : 8;
+ var lastFieldsStart = lastFields.length - fieldCount;
+ var fields = Array(fieldCount);
+ for (var x = 0; x < fieldCount; ++x) {
+ fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
+ }
+ if (isLastFieldIPv4Address) {
+ fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
+ }
+ var allZeroFields = fields.reduce(function (acc, field, index) {
+ if (!field || field === "0") {
+ var lastLongest = acc[acc.length - 1];
+ if (lastLongest && lastLongest.index + lastLongest.length === index) {
+ lastLongest.length++;
+ } else {
+ acc.push({ index: index, length: 1 });
+ }
+ }
+ return acc;
+ }, []);
+ var longestZeroFields = allZeroFields.sort(function (a, b) {
+ return b.length - a.length;
+ })[0];
+ var newHost = void 0;
+ if (longestZeroFields && longestZeroFields.length > 1) {
+ var newFirst = fields.slice(0, longestZeroFields.index);
+ var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
+ newHost = newFirst.join(":") + "::" + newLast.join(":");
+ } else {
+ newHost = fields.join(":");
+ }
+ if (zone) {
+ newHost += "%" + zone;
+ }
+ return newHost;
+ } else {
+ return host;
+ }
+}
+var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
+var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
+function parse(uriString) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var components = {};
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
+ var matches = uriString.match(URI_PARSE);
+ if (matches) {
+ if (NO_MATCH_IS_UNDEFINED) {
+ //store each component
+ components.scheme = matches[1];
+ components.userinfo = matches[3];
+ components.host = matches[4];
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = matches[7];
+ components.fragment = matches[8];
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = matches[5];
+ }
+ } else {
+ //IE FIX for improper RegExp matching
+ //store each component
+ components.scheme = matches[1] || undefined;
+ components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
+ components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
+ components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
+ }
+ }
+ if (components.host) {
+ //normalize IP hosts
+ components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
+ }
+ //determine reference type
+ if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
+ components.reference = "same-document";
+ } else if (components.scheme === undefined) {
+ components.reference = "relative";
+ } else if (components.fragment === undefined) {
+ components.reference = "absolute";
+ } else {
+ components.reference = "uri";
+ }
+ //check for reference errors
+ if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
+ components.error = components.error || "URI is not a " + options.reference + " reference.";
+ }
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //check if scheme can't handle IRIs
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
+ //if host component is a domain name
+ if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ }
+ //convert IRI -> URI
+ _normalizeComponentEncoding(components, URI_PROTOCOL);
+ } else {
+ //normalize encodings
+ _normalizeComponentEncoding(components, protocol);
+ }
+ //perform scheme specific parsing
+ if (schemeHandler && schemeHandler.parse) {
+ schemeHandler.parse(components, options);
+ }
+ } else {
+ components.error = components.error || "URI can not be parsed.";
+ }
+ return components;
+}
+
+function _recomposeAuthority(components, options) {
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ if (components.userinfo !== undefined) {
+ uriTokens.push(components.userinfo);
+ uriTokens.push("@");
+ }
+ if (components.host !== undefined) {
+ //normalize IP hosts, add brackets and escape zone separator for IPv6
+ uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {
+ return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
+ }));
+ }
+ if (typeof components.port === "number" || typeof components.port === "string") {
+ uriTokens.push(":");
+ uriTokens.push(String(components.port));
+ }
+ return uriTokens.length ? uriTokens.join("") : undefined;
+}
+
+var RDS1 = /^\.\.?\//;
+var RDS2 = /^\/\.(\/|$)/;
+var RDS3 = /^\/\.\.(\/|$)/;
+var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
+function removeDotSegments(input) {
+ var output = [];
+ while (input.length) {
+ if (input.match(RDS1)) {
+ input = input.replace(RDS1, "");
+ } else if (input.match(RDS2)) {
+ input = input.replace(RDS2, "/");
+ } else if (input.match(RDS3)) {
+ input = input.replace(RDS3, "/");
+ output.pop();
+ } else if (input === "." || input === "..") {
+ input = "";
+ } else {
+ var im = input.match(RDS5);
+ if (im) {
+ var s = im[0];
+ input = input.slice(s.length);
+ output.push(s);
+ } else {
+ throw new Error("Unexpected dot segment condition");
+ }
+ }
+ }
+ return output.join("");
+}
+
+function serialize(components) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //perform scheme specific serialization
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
+ if (components.host) {
+ //if host component is an IPv6 address
+ if (protocol.IPV6ADDRESS.test(components.host)) {}
+ //TODO: normalize IPv6 address as per RFC 5952
+
+ //if host component is a domain name
+ else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
+ //convert IDN via punycode
+ try {
+ components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ }
+ }
+ //normalize encoding
+ _normalizeComponentEncoding(components, protocol);
+ if (options.reference !== "suffix" && components.scheme) {
+ uriTokens.push(components.scheme);
+ uriTokens.push(":");
+ }
+ var authority = _recomposeAuthority(components, options);
+ if (authority !== undefined) {
+ if (options.reference !== "suffix") {
+ uriTokens.push("//");
+ }
+ uriTokens.push(authority);
+ if (components.path && components.path.charAt(0) !== "/") {
+ uriTokens.push("/");
+ }
+ }
+ if (components.path !== undefined) {
+ var s = components.path;
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
+ s = removeDotSegments(s);
+ }
+ if (authority === undefined) {
+ s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
+ }
+ uriTokens.push(s);
+ }
+ if (components.query !== undefined) {
+ uriTokens.push("?");
+ uriTokens.push(components.query);
+ }
+ if (components.fragment !== undefined) {
+ uriTokens.push("#");
+ uriTokens.push(components.fragment);
+ }
+ return uriTokens.join(""); //merge tokens into a string
+}
+
+function resolveComponents(base, relative) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var skipNormalization = arguments[3];
+
+ var target = {};
+ if (!skipNormalization) {
+ base = parse(serialize(base, options), options); //normalize base components
+ relative = parse(serialize(relative, options), options); //normalize relative components
+ }
+ options = options || {};
+ if (!options.tolerant && relative.scheme) {
+ target.scheme = relative.scheme;
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (!relative.path) {
+ target.path = base.path;
+ if (relative.query !== undefined) {
+ target.query = relative.query;
+ } else {
+ target.query = base.query;
+ }
+ } else {
+ if (relative.path.charAt(0) === "/") {
+ target.path = removeDotSegments(relative.path);
+ } else {
+ if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
+ target.path = "/" + relative.path;
+ } else if (!base.path) {
+ target.path = relative.path;
+ } else {
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
+ }
+ target.path = removeDotSegments(target.path);
+ }
+ target.query = relative.query;
+ }
+ //target.authority = base.authority;
+ target.userinfo = base.userinfo;
+ target.host = base.host;
+ target.port = base.port;
+ }
+ target.scheme = base.scheme;
+ }
+ target.fragment = relative.fragment;
+ return target;
+}
+
+function resolve(baseURI, relativeURI, options) {
+ var schemelessOptions = assign({ scheme: 'null' }, options);
+ return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
+}
+
+function normalize(uri, options) {
+ if (typeof uri === "string") {
+ uri = serialize(parse(uri, options), options);
+ } else if (typeOf(uri) === "object") {
+ uri = parse(serialize(uri, options), options);
+ }
+ return uri;
+}
+
+function equal(uriA, uriB, options) {
+ if (typeof uriA === "string") {
+ uriA = serialize(parse(uriA, options), options);
+ } else if (typeOf(uriA) === "object") {
+ uriA = serialize(uriA, options);
+ }
+ if (typeof uriB === "string") {
+ uriB = serialize(parse(uriB, options), options);
+ } else if (typeOf(uriB) === "object") {
+ uriB = serialize(uriB, options);
+ }
+ return uriA === uriB;
+}
+
+function escapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
+}
+
+function unescapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
+}
+
+var handler = {
+ scheme: "http",
+ domainHost: true,
+ parse: function parse(components, options) {
+ //report missing host
+ if (!components.host) {
+ components.error = components.error || "HTTP URIs must have a host.";
+ }
+ return components;
+ },
+ serialize: function serialize(components, options) {
+ var secure = String(components.scheme).toLowerCase() === "https";
+ //normalize the default port
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
+ components.port = undefined;
+ }
+ //normalize the empty path
+ if (!components.path) {
+ components.path = "/";
+ }
+ //NOTE: We do not parse query strings for HTTP URIs
+ //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
+ //and not the HTTP spec.
+ return components;
+ }
+};
+
+var handler$1 = {
+ scheme: "https",
+ domainHost: handler.domainHost,
+ parse: handler.parse,
+ serialize: handler.serialize
+};
+
+function isSecure(wsComponents) {
+ return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
+}
+//RFC 6455
+var handler$2 = {
+ scheme: "ws",
+ domainHost: true,
+ parse: function parse(components, options) {
+ var wsComponents = components;
+ //indicate if the secure flag is set
+ wsComponents.secure = isSecure(wsComponents);
+ //construct resouce name
+ wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');
+ wsComponents.path = undefined;
+ wsComponents.query = undefined;
+ return wsComponents;
+ },
+ serialize: function serialize(wsComponents, options) {
+ //normalize the default port
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
+ wsComponents.port = undefined;
+ }
+ //ensure scheme matches secure flag
+ if (typeof wsComponents.secure === 'boolean') {
+ wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws';
+ wsComponents.secure = undefined;
+ }
+ //reconstruct path from resource name
+ if (wsComponents.resourceName) {
+ var _wsComponents$resourc = wsComponents.resourceName.split('?'),
+ _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),
+ path = _wsComponents$resourc2[0],
+ query = _wsComponents$resourc2[1];
+
+ wsComponents.path = path && path !== '/' ? path : undefined;
+ wsComponents.query = query;
+ wsComponents.resourceName = undefined;
+ }
+ //forbid fragment component
+ wsComponents.fragment = undefined;
+ return wsComponents;
+ }
+};
+
+var handler$3 = {
+ scheme: "wss",
+ domainHost: handler$2.domainHost,
+ parse: handler$2.parse,
+ serialize: handler$2.serialize
+};
+
+var O = {};
+var isIRI = true;
+//RFC 3986
+var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
+var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
+var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
+//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
+//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
+//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
+//const VCHAR$$ = "[\\x21-\\x7E]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
+//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
+//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
+//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
+var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
+var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
+var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
+var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
+var UNRESERVED = new RegExp(UNRESERVED$$, "g");
+var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
+var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
+var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
+var NOT_HFVALUE = NOT_HFNAME;
+function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(UNRESERVED) ? str : decStr;
+}
+var handler$4 = {
+ scheme: "mailto",
+ parse: function parse$$1(components, options) {
+ var mailtoComponents = components;
+ var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
+ mailtoComponents.path = undefined;
+ if (mailtoComponents.query) {
+ var unknownHeaders = false;
+ var headers = {};
+ var hfields = mailtoComponents.query.split("&");
+ for (var x = 0, xl = hfields.length; x < xl; ++x) {
+ var hfield = hfields[x].split("=");
+ switch (hfield[0]) {
+ case "to":
+ var toAddrs = hfield[1].split(",");
+ for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
+ to.push(toAddrs[_x]);
+ }
+ break;
+ case "subject":
+ mailtoComponents.subject = unescapeComponent(hfield[1], options);
+ break;
+ case "body":
+ mailtoComponents.body = unescapeComponent(hfield[1], options);
+ break;
+ default:
+ unknownHeaders = true;
+ headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
+ break;
+ }
+ }
+ if (unknownHeaders) mailtoComponents.headers = headers;
+ }
+ mailtoComponents.query = undefined;
+ for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
+ var addr = to[_x2].split("@");
+ addr[0] = unescapeComponent(addr[0]);
+ if (!options.unicodeSupport) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
+ } catch (e) {
+ mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ } else {
+ addr[1] = unescapeComponent(addr[1], options).toLowerCase();
+ }
+ to[_x2] = addr.join("@");
+ }
+ return mailtoComponents;
+ },
+ serialize: function serialize$$1(mailtoComponents, options) {
+ var components = mailtoComponents;
+ var to = toArray(mailtoComponents.to);
+ if (to) {
+ for (var x = 0, xl = to.length; x < xl; ++x) {
+ var toAddr = String(to[x]);
+ var atIdx = toAddr.lastIndexOf("@");
+ var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
+ var domain = toAddr.slice(atIdx + 1);
+ //convert IDN via punycode
+ try {
+ domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
+ } catch (e) {
+ components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ to[x] = localPart + "@" + domain;
+ }
+ components.path = to.join(",");
+ }
+ var headers = mailtoComponents.headers = mailtoComponents.headers || {};
+ if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
+ if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
+ var fields = [];
+ for (var name in headers) {
+ if (headers[name] !== O[name]) {
+ fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
+ }
+ }
+ if (fields.length) {
+ components.query = fields.join("&");
+ }
+ return components;
+ }
+};
+
+var URN_PARSE = /^([^\:]+)\:(.*)/;
+//RFC 2141
+var handler$5 = {
+ scheme: "urn",
+ parse: function parse$$1(components, options) {
+ var matches = components.path && components.path.match(URN_PARSE);
+ var urnComponents = components;
+ if (matches) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = matches[1].toLowerCase();
+ var nss = matches[2];
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ urnComponents.nid = nid;
+ urnComponents.nss = nss;
+ urnComponents.path = undefined;
+ if (schemeHandler) {
+ urnComponents = schemeHandler.parse(urnComponents, options);
+ }
+ } else {
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
+ }
+ return urnComponents;
+ },
+ serialize: function serialize$$1(urnComponents, options) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = urnComponents.nid;
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ if (schemeHandler) {
+ urnComponents = schemeHandler.serialize(urnComponents, options);
+ }
+ var uriComponents = urnComponents;
+ var nss = urnComponents.nss;
+ uriComponents.path = (nid || options.nid) + ":" + nss;
+ return uriComponents;
+ }
+};
+
+var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
+//RFC 4122
+var handler$6 = {
+ scheme: "urn:uuid",
+ parse: function parse(urnComponents, options) {
+ var uuidComponents = urnComponents;
+ uuidComponents.uuid = uuidComponents.nss;
+ uuidComponents.nss = undefined;
+ if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
+ }
+ return uuidComponents;
+ },
+ serialize: function serialize(uuidComponents, options) {
+ var urnComponents = uuidComponents;
+ //normalize UUID
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
+ return urnComponents;
+ }
+};
+
+SCHEMES[handler.scheme] = handler;
+SCHEMES[handler$1.scheme] = handler$1;
+SCHEMES[handler$2.scheme] = handler$2;
+SCHEMES[handler$3.scheme] = handler$3;
+SCHEMES[handler$4.scheme] = handler$4;
+SCHEMES[handler$5.scheme] = handler$5;
+SCHEMES[handler$6.scheme] = handler$6;
+
+exports.SCHEMES = SCHEMES;
+exports.pctEncChar = pctEncChar;
+exports.pctDecChars = pctDecChars;
+exports.parse = parse;
+exports.removeDotSegments = removeDotSegments;
+exports.serialize = serialize;
+exports.resolveComponents = resolveComponents;
+exports.resolve = resolve;
+exports.normalize = normalize;
+exports.equal = equal;
+exports.escapeComponent = escapeComponent;
+exports.unescapeComponent = unescapeComponent;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+
+
+},{}],"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('fast-json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , $dataMetaSchema = require('./data')
+ , util = require('./compile/util');
+
+module.exports = Ajv;
+
+Ajv.prototype.validate = validate;
+Ajv.prototype.compile = compile;
+Ajv.prototype.addSchema = addSchema;
+Ajv.prototype.addMetaSchema = addMetaSchema;
+Ajv.prototype.validateSchema = validateSchema;
+Ajv.prototype.getSchema = getSchema;
+Ajv.prototype.removeSchema = removeSchema;
+Ajv.prototype.addFormat = addFormat;
+Ajv.prototype.errorsText = errorsText;
+
+Ajv.prototype._addSchema = _addSchema;
+Ajv.prototype._compile = _compile;
+
+Ajv.prototype.compileAsync = require('./compile/async');
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+Ajv.prototype.validateKeyword = customKeyword.validate;
+
+var errorClasses = require('./compile/error_classes');
+Ajv.ValidationError = errorClasses.Validation;
+Ajv.MissingRefError = errorClasses.MissingRef;
+Ajv.$dataMetaSchema = $dataMetaSchema;
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];
+var META_SUPPORT_DATA = ['/properties'];
+
+/**
+ * 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);
+ opts = this._opts = util.copy(opts) || {};
+ setLogger(this);
+ 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._getId = chooseGetId(opts);
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
+ this._metaOpts = getMetaSchemaOptions(this);
+
+ if (opts.formats) addInitialFormats(this);
+ if (opts.keywords) addInitialKeywords(this);
+ addDefaultMetaSchema(this);
+ if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
+ if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});
+ addInitialSchemas(this);
+}
+
+
+
+/**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
+ * @this Ajv
+ * @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 = this.getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = this._addSchema(schemaKeyRef);
+ v = schemaObj.validate || this._compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async !== true) this.errors = v.errors;
+ return valid;
+}
+
+
+/**
+ * Create validating function for passed schema.
+ * @this Ajv
+ * @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 = this._addSchema(schema, undefined, _meta);
+ return schemaObj.validate || this._compile(schemaObj);
+}
+
+
+/**
+ * Adds schema to the instance.
+ * @this Ajv
+ * @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.
+ * @return {Ajv} this for method chaining
+ */
+function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i} 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 || this.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%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\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|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,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:s,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:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[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,"uri-template":c,url:u,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:s,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:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var R=e("./resolve"),$=e("./util"),j=e("./error_classes"),D=e("fast-json-stable-stringify"),O=e("../dotjs/validate"),I=$.ucs2length,A=e("fast-deep-equal"),k=j.Validation;function C(e,c,u,r){var d=this,p=this._opts,h=[void 0],f={},l=[],t={},m=[],a={},v=[],s=function(e,r,t){var a=L.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}.call(this,e,c=c||{schema:e,refVal:h,refs:f},r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=P;var y=this._formats,g=this.RULES;try{var i=E(e,c,u,r);o.validate=i;var n=o.callValidate;return n&&(n.schema=i.schema,n.errors=null,n.refs=i.refs,n.refVal=i.refVal,n.root=i.root,n.$async=i.$async,p.sourceCode&&(n.source=i.source)),i}finally{(function(e,r,t){var a=L.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}).call(this,e,c,r)}function P(){var e=o.validate,r=e.apply(this,arguments);return P.errors=e.errors,r}function E(e,r,t,a){var s=!r||r&&r.schema==e;if(r.schema!=c.schema)return C.call(d,e,r,t,a);var o=!0===e.$async,i=O({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:j.MissingRef,RULES:g,validate:O,util:$,resolve:R,resolveRef:w,usePattern:_,useDefault:F,useCustomRule:x,opts:p,formats:y,logger:d.logger,self:d}),i=Q(h,z)+Q(l,N)+Q(m,q)+Q(v,T)+i;p.processCode&&(i=p.processCode(i,e));try{var n=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",i)(d,g,y,c,h,m,v,A,I,k);h[0]=n}catch(e){throw d.logger.error("Error compiling schema, function code:",i),e}return n.schema=e,n.errors=null,n.refs=f,n.refVal=h,n.root=s?n:r,o&&(n.$async=!0),!0===p.sourceCode&&(n.source={code:i,patterns:l,defaults:m}),n}function w(e,r,t){r=R.url(e,r);var a,s,o=f[r];if(void 0!==o)return S(a=h[o],s="refVal["+o+"]");if(!t&&c.refs){var i=c.refs[r];if(void 0!==i)return S(a=c.refVal[i],s=b(r,a))}s=b(r);var n,l=R.call(d,E,c,r);if(void 0!==l||(n=u&&u[r])&&(l=R.inlineRef(n,p.inlineRefs)?n:C.call(d,n,c,u,e)),void 0!==l)return S(h[f[r]]=l,s);delete f[r]}function b(e,r){var t=h.length;return h[t]=r,"refVal"+(f[e]=t)}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function _(e){var r=t[e];return void 0===r&&(r=t[e]=l.length,l[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return $.toQuotedString(e);case"object":if(null===e)return"null";var r=D(e),t=a[r];return void 0===t&&(t=a[r]=m.length,m[t]=e),"default"+t}}function x(e,r,t,a){if(!1!==d._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));var o=e.definition.validateSchema;if(o)if(!o(r)){var i="keyword schema is invalid: "+d.errorsText(o.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)n=l.call(d,r,t,a);else if(u)n=u.call(d,r,t,a),!1!==p.validateSchema&&d.validateSchema(n,!0);else if(c)n=c.call(d,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=v.length;return{code:"customRule"+h,validate:v[h]=n}}}function L(e,r,t){for(var a=0;a",_=P?">":"<",F=void 0;if(!y&&"number"!=typeof d&&void 0!==d)throw new Error(r+" must be number");if(!b&&void 0!==w&&"number"!=typeof w&&"boolean"!=typeof w)throw new Error(E+" must be number or boolean");b?(o="exclIsNumber"+u,i="' + "+(n="op"+u)+" + '",c+=" var schemaExcl"+u+" = "+(t=e.util.getData(w.$data,h,e.dataPathArr))+"; ",F=E,(l=l||[]).push(c+=" var "+(a="exclusive"+u)+"; var "+(s="exclType"+u)+" = typeof "+(t="schemaExcl"+u)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { "),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(c+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(c+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ",x=c,c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+s+" == 'number' ? ( ("+a+" = "+g+" === undefined || "+t+" "+S+"= "+g+") ? "+v+" "+_+"= "+t+" : "+v+" "+_+" "+g+" ) : ( ("+a+" = "+t+" === true) ? "+v+" "+_+"= "+g+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { var op"+u+" = "+a+" ? '"+S+"' : '"+S+"='; ",void 0===d&&(f=e.errSchemaPath+"/"+(F=E),g=t,y=b)):(i=S,(o="number"==typeof w)&&y?(n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" ( "+g+" === undefined || "+w+" "+S+"= "+g+" ? "+v+" "+_+"= "+w+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { "):(o&&void 0===d?(a=!0,f=e.errSchemaPath+"/"+(F=E),g=w,_+="="):(o&&(g=Math[P?"min":"max"](w,d)),w===(!o||g)?(a=!0,f=e.errSchemaPath+"/"+(F=E),_+="="):(a=!1,i+="=")),n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+v+" "+_+" "+g+" || "+v+" !== "+v+") { ")),F=F||r,(l=l||[]).push(c),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+n+", limit: "+g+", exclusive: "+a+" } ",!1!==e.opts.messages&&(c+=" , message: 'should be "+i+" ",c+=y?"' + "+g:g+"'"),e.opts.verbose&&(c+=" , schema: ",c+=y?"validate.schema"+p:""+d,c+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ";var x=c;return c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } ",m&&(c+=" else { "),c}},{}],14:[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||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" "+c+".length "+("maxItems"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxItems"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" items' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],15:[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||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),t+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ";var d=r,p=p||[];p.push(t+=" "+("maxLength"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be ",t+="maxLength"==r?"longer":"shorter",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" characters' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],16:[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||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxProperties"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" properties' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],17:[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,u=n.baseId,h=!0,d=a;if(d)for(var p,f=-1,m=d.length-1;f "+_+") { ",x=c+"["+_+"]",d.schema=$,d.schemaPath=i+"["+_+"]",d.errSchemaPath=n+"/"+_,d.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),d.dataPathArr[v]=_,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",t+=" } ",l&&(t+=" if ("+f+") { ",p+="}"))}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&0 "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),x=c+"["+m+"]",d.dataPathArr[v]=m,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",l&&(t+=" if (!"+f+") break; "),t+=" } } ",l&&(t+=" if ("+f+") { ",p+="}"))}else{(e.opts.strictKeywords?"object"==typeof o&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+a+" !== parseInt(division"+a+") ",t+=" ) ",u&&(t+=" ) ");var d=d||[];d.push(t+=" ) { "),t="",!1!==e.createErrors?(t+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { multipleOf: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be multiple of ",t+=u?"' + "+h:h+"'"),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var p=t,t=d.pop();return 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}},{}],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||""),u="errs__"+a,h=e.util.copy(e);h.level++;var d,p,f,m,v="valid"+h.level;return(e.opts.strictKeywords?"object"==typeof o&&0 1) { ",t=e.schema.items&&e.schema.items.type,a=Array.isArray(t),!t||"object"==t||"array"==t||a&&(0<=t.indexOf("object")||0<=t.indexOf("array"))?i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } ":(i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",i+=" if ("+e.util["checkDataType"+(a?"s":"")](t,"item",e.opts.strictNumbers,!0)+") continue; ",a&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),i+=" } ",m&&(i+=" } "),(s=s||[]).push(i+=" if (!"+f+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=m?"validate.schema"+u:""+c,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",o=i,i=s.pop(),i+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d&&(i+=" else { ")):d&&(i+=" if (true) { "),i}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){var n="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(n);a.logger.warn(n)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof a.schema||!s&&!a.schema.$ref){var l=a.level,c=a.dataLevel,u=a.schema[e="false schema"],h=a.schemaPath+a.util.getProperty(e),d=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,f="data"+(c||""),m="valid"+l;return!1===a.schema?(a.isTop?p=!0:r+=" var "+m+" = false; ",(U=U||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",D=r,r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+m+" = true; ",a.isTop&&(r+=" }; return validate; "),r}if(a.isTop){var v=a.isTop,l=a.level=0,c=a.dataLevel=0,f="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var y="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{l=a.level,f="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var g,m="valid"+l,p=!a.opts.allErrors,P="",E="",w=a.schema.type,b=Array.isArray(w);if(w&&a.opts.nullable&&!0===a.schema.nullable&&(b?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],b=!0)),b&&1==w.length&&(w=w[0],b=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),w){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,w));var S=a.RULES.types[w];if(g||b||!0===S||S&&!Z(S)){h=a.schemaPath+".type",d=a.errSchemaPath+"/type",h=a.schemaPath+".type",d=a.errSchemaPath+"/type";if(r+=" if ("+a.util[b?"checkDataTypes":"checkDataType"](w,f,a.opts.strictNumbers,!0)+") { ",g){var _="dataType"+l,F="coerced"+l;r+=" var "+_+" = typeof "+f+"; var "+F+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+a.util.checkDataType(a.schema.type,f,a.opts.strictNumbers)+") "+F+" = "+f+"; } "),r+=" if ("+F+" !== undefined) ; ";var x=g;if(x)for(var R,$=-1,j=x.length-1;$= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=k(e/r);455k((A-a)/h))&&L("overflow"),a+=p*h;var f=d<=o?1:o+26<=d?26:d-o;if(pk(A/m)&&L("overflow"),h*=m}var v=r.length+1,o=z(a-u,v,0==u);k(a/v)>A-s&&L("overflow"),s+=k(a/v),a%=v,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function c(e){var r=[],t=(e=N(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");pk((A-s)/w)&&L("overflow"),s+=(f-a)*w,a=f;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&L("overflow"),R==a){for(var $=s,j=36;;j+=36){var D=j<=o?1:o+26<=j?26:j-o;if($>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function p(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]')),Y=new RegExp(K,"g"),W=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),X=new RegExp(J("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(J("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=p(e);return r.match(Y)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n);
+
+ message: string;
+ errors: Array;
+ ajv: true;
+ validation: true;
+ }
+
+ class MissingRefError extends Error {
+ constructor(baseId: string, ref: string, message?: string);
+ static message: (baseId: string, ref: string) => string;
+
+ message: string;
+ missingRef: string;
+ missingSchema: string;
+ }
+}
+
+declare namespace ajv {
+ type ValidationError = AjvErrors.ValidationError;
+
+ type MissingRefError = AjvErrors.MissingRefError;
+
+ interface Ajv {
+ /**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default).
+ * @param {string|object|Boolean} 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 | boolean, data: any): boolean | PromiseLike;
+ /**
+ * Create validating function for passed schema.
+ * @param {object|Boolean} schema schema object
+ * @return {Function} validating function
+ */
+ compile(schema: object | boolean): 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|Boolean} schema schema object
+ * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function.
+ * @return {PromiseLike} validating function
+ */
+ compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike;
+ /**
+ * 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`.
+ * @return {Ajv} this for method chaining
+ */
+ addSchema(schema: Array | object, key?: string): Ajv;
+ /**
+ * 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
+ * @return {Ajv} this for method chaining
+ */
+ addMetaSchema(schema: object, key?: string): Ajv;
+ /**
+ * Validate schema
+ * @param {object|Boolean} schema schema to validate
+ * @return {Boolean} true if schema is valid
+ */
+ validateSchema(schema: object | boolean): 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`). Returns undefined if keyRef can't be resolved to an existing schema.
+ */
+ getSchema(keyRef: string): ValidateFunction | undefined;
+ /**
+ * 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|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+ removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv;
+ /**
+ * 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)
+ * @return {Ajv} this for method chaining
+ */
+ addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv;
+ /**
+ * 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`.
+ * @return {Ajv} this for method chaining
+ */
+ addKeyword(keyword: string, definition: KeywordDefinition): Ajv;
+ /**
+ * 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.
+ * @return {Ajv} this for method chaining
+ */
+ removeKeyword(keyword: string): Ajv;
+ /**
+ * Validate keyword
+ * @this Ajv
+ * @param {object} definition keyword definition object
+ * @param {boolean} throwError true to throw exception if definition is invalid
+ * @return {boolean} validation result
+ */
+ validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean;
+ /**
+ * Convert array of error message objects to string
+ * @param {Array} 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 | null, options?: ErrorsTextOptions): string;
+ errors?: Array | null;
+ _opts: Options;
+ }
+
+ interface CustomLogger {
+ log(...args: any[]): any;
+ warn(...args: any[]): any;
+ error(...args: any[]): any;
+ }
+
+ interface ValidateFunction {
+ (
+ data: any,
+ dataPath?: string,
+ parentData?: object | Array,
+ parentDataProperty?: string | number,
+ rootData?: object | Array
+ ): boolean | PromiseLike;
+ schema?: object | boolean;
+ errors?: null | Array;
+ refs?: object;
+ refVal?: Array;
+ root?: ValidateFunction | object;
+ $async?: true;
+ source?: object;
+ }
+
+ interface Options {
+ $data?: boolean;
+ allErrors?: boolean;
+ verbose?: boolean;
+ jsonPointers?: boolean;
+ uniqueItems?: boolean;
+ unicode?: boolean;
+ format?: false | string;
+ formats?: object;
+ keywords?: object;
+ unknownFormats?: true | string[] | 'ignore';
+ schemas?: Array | object;
+ schemaId?: '$id' | 'id' | 'auto';
+ missingRefs?: true | 'ignore' | 'fail';
+ extendRefs?: true | 'ignore' | 'fail';
+ loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike;
+ removeAdditional?: boolean | 'all' | 'failing';
+ useDefaults?: boolean | 'empty' | 'shared';
+ coerceTypes?: boolean | 'array';
+ strictDefaults?: boolean | 'log';
+ strictKeywords?: boolean | 'log';
+ strictNumbers?: boolean;
+ async?: boolean | string;
+ transpile?: string | ((code: string) => string);
+ meta?: boolean | object;
+ validateSchema?: boolean | 'log';
+ addUsedSchema?: boolean;
+ inlineRefs?: boolean | number;
+ passContext?: boolean;
+ loopRequired?: number;
+ ownProperties?: boolean;
+ multipleOfPrecision?: boolean | number;
+ errorDataPath?: string,
+ messages?: boolean;
+ sourceCode?: boolean;
+ processCode?: (code: string, schema: object) => string;
+ cache?: object;
+ logger?: CustomLogger | false;
+ nullable?: boolean;
+ serialize?: ((schema: object | boolean) => any) | false;
+ }
+
+ type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike);
+ type NumberFormatValidator = ((data: number) => boolean | PromiseLike);
+
+ interface NumberFormatDefinition {
+ type: "number",
+ validate: NumberFormatValidator;
+ compare?: (data1: number, data2: number) => number;
+ async?: boolean;
+ }
+
+ interface StringFormatDefinition {
+ type?: "string",
+ validate: FormatValidator;
+ compare?: (data1: string, data2: string) => number;
+ async?: boolean;
+ }
+
+ type FormatDefinition = NumberFormatDefinition | StringFormatDefinition;
+
+ interface KeywordDefinition {
+ type?: string | Array;
+ async?: boolean;
+ $data?: boolean;
+ errors?: boolean | string;
+ metaSchema?: object;
+ // schema: false makes validate not to expect schema (ValidateFunction)
+ schema?: boolean;
+ statements?: boolean;
+ dependencies?: Array;
+ modifying?: boolean;
+ valid?: boolean;
+ // one and only one of the following properties should be present
+ validate?: SchemaValidateFunction | ValidateFunction;
+ compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction;
+ macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean;
+ inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string;
+ }
+
+ interface CompilationContext {
+ level: number;
+ dataLevel: number;
+ dataPathArr: string[];
+ schema: any;
+ schemaPath: string;
+ baseId: string;
+ async: boolean;
+ opts: Options;
+ formats: {
+ [index: string]: FormatDefinition | undefined;
+ };
+ keywords: {
+ [index: string]: KeywordDefinition | undefined;
+ };
+ compositeRule: boolean;
+ validate: (schema: object) => boolean;
+ util: {
+ copy(obj: any, target?: any): any;
+ toHash(source: string[]): { [index: string]: true | undefined };
+ equal(obj: any, target: any): boolean;
+ getProperty(str: string): string;
+ schemaHasRules(schema: object, rules: any): string;
+ escapeQuotes(str: string): string;
+ toQuotedString(str: string): string;
+ getData(jsonPointer: string, dataLevel: number, paths: string[]): string;
+ escapeJsonPointer(str: string): string;
+ unescapeJsonPointer(str: string): string;
+ escapeFragment(str: string): string;
+ unescapeFragment(str: string): string;
+ };
+ self: Ajv;
+ }
+
+ interface SchemaValidateFunction {
+ (
+ schema: any,
+ data: any,
+ parentSchema?: object,
+ dataPath?: string,
+ parentData?: object | Array,
+ parentDataProperty?: string | number,
+ rootData?: object | Array
+ ): boolean | PromiseLike;
+ errors?: Array;
+ }
+
+ interface ErrorsTextOptions {
+ separator?: string;
+ dataVar?: string;
+ }
+
+ interface ErrorObject {
+ keyword: string;
+ dataPath: string;
+ schemaPath: string;
+ params: ErrorParameters;
+ // Added to validation errors of propertyNames keyword schema
+ propertyName?: string;
+ // Excluded if messages set to false.
+ message?: string;
+ // These are added with the `verbose` option.
+ schema?: any;
+ parentSchema?: object;
+ data?: any;
+ }
+
+ type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams |
+ DependenciesParams | FormatParams | ComparisonParams |
+ MultipleOfParams | PatternParams | RequiredParams |
+ TypeParams | UniqueItemsParams | CustomParams |
+ PatternRequiredParams | PropertyNamesParams |
+ IfParams | 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 PatternRequiredParams {
+ missingPattern: string;
+ }
+
+ interface PropertyNamesParams {
+ propertyName: string;
+ }
+
+ interface IfParams {
+ failingKeyword: string;
+ }
+
+ interface SwitchParams {
+ caseIndex: number;
+ }
+
+ interface NoParams { }
+
+ interface EnumParams {
+ allowedValues: Array;
+ }
+}
+
+export = ajv;
diff --git a/node_modules/har-validator/node_modules/ajv/lib/ajv.js b/node_modules/har-validator/node_modules/ajv/lib/ajv.js
new file mode 100644
index 0000000000000..06a45b650b3ac
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/ajv.js
@@ -0,0 +1,506 @@
+'use strict';
+
+var compileSchema = require('./compile')
+ , resolve = require('./compile/resolve')
+ , Cache = require('./cache')
+ , SchemaObject = require('./compile/schema_obj')
+ , stableStringify = require('fast-json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , $dataMetaSchema = require('./data')
+ , util = require('./compile/util');
+
+module.exports = Ajv;
+
+Ajv.prototype.validate = validate;
+Ajv.prototype.compile = compile;
+Ajv.prototype.addSchema = addSchema;
+Ajv.prototype.addMetaSchema = addMetaSchema;
+Ajv.prototype.validateSchema = validateSchema;
+Ajv.prototype.getSchema = getSchema;
+Ajv.prototype.removeSchema = removeSchema;
+Ajv.prototype.addFormat = addFormat;
+Ajv.prototype.errorsText = errorsText;
+
+Ajv.prototype._addSchema = _addSchema;
+Ajv.prototype._compile = _compile;
+
+Ajv.prototype.compileAsync = require('./compile/async');
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+Ajv.prototype.validateKeyword = customKeyword.validate;
+
+var errorClasses = require('./compile/error_classes');
+Ajv.ValidationError = errorClasses.Validation;
+Ajv.MissingRefError = errorClasses.MissingRef;
+Ajv.$dataMetaSchema = $dataMetaSchema;
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];
+var META_SUPPORT_DATA = ['/properties'];
+
+/**
+ * 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);
+ opts = this._opts = util.copy(opts) || {};
+ setLogger(this);
+ 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._getId = chooseGetId(opts);
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
+ this._metaOpts = getMetaSchemaOptions(this);
+
+ if (opts.formats) addInitialFormats(this);
+ if (opts.keywords) addInitialKeywords(this);
+ addDefaultMetaSchema(this);
+ if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
+ if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});
+ addInitialSchemas(this);
+}
+
+
+
+/**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
+ * @this Ajv
+ * @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 = this.getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = this._addSchema(schemaKeyRef);
+ v = schemaObj.validate || this._compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async !== true) this.errors = v.errors;
+ return valid;
+}
+
+
+/**
+ * Create validating function for passed schema.
+ * @this Ajv
+ * @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 = this._addSchema(schema, undefined, _meta);
+ return schemaObj.validate || this._compile(schemaObj);
+}
+
+
+/**
+ * Adds schema to the instance.
+ * @this Ajv
+ * @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.
+ * @return {Ajv} this for method chaining
+ */
+function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i} 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 || this.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%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
+// For the source: https://gist.github.com/dperini/729294
+// For test cases: https://mathiasbynens.be/demo/url-regex
+// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
+// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
+var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
+var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
+var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[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';
+ return util.copy(formats[mode]);
+}
+
+
+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|23:59:60)(?:\.\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|23:59:60)(?:\.\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,
+ 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ // 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,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ // 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,
+ 'uri-reference': URIREF,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ 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,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+function isLeapYear(year) {
+ // https://tools.ietf.org/html/rfc3339#appendix-C
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
+}
+
+
+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 year = +matches[1];
+ var month = +matches[2];
+ var day = +matches[3];
+
+ return month >= 1 && month <= 12 && day >= 1 &&
+ day <= (month == 2 && isLeapYear(year) ? 29 : 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) ||
+ (hour == 23 && minute == 59 && second == 60)) &&
+ (!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);
+}
+
+
+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);
+}
+
+
+var Z_ANCHOR = /[^\\]\\Z/;
+function regex(str) {
+ if (Z_ANCHOR.test(str)) return false;
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/compile/index.js b/node_modules/har-validator/node_modules/ajv/lib/compile/index.js
new file mode 100644
index 0000000000000..97518c42479db
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/compile/index.js
@@ -0,0 +1,387 @@
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , errorClasses = require('./error_classes')
+ , stableStringify = require('fast-json-stable-stringify');
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var ucs2length = util.ucs2length;
+var equal = require('fast-deep-equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = errorClasses.Validation;
+
+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 = [];
+
+ 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 (opts.sourceCode) cv.source = v.source;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ /* @this {*} - custom context, see passContext option */
+ function callValidate() {
+ /* jshint validthis: true */
+ var validate = compilation.validate;
+ var result = validate.apply(this, 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;
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ MissingRefError: errorClasses.MissingRef,
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ logger: self.logger,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode;
+
+ if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);
+ // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
+ var validate;
+ try {
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ sourceCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ self.logger.error('Error compiling schema, function code:', sourceCode);
+ 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 (opts.sourceCode === true) {
+ validate.source = {
+ code: sourceCode,
+ 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 === undefined) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v === undefined) {
+ removeLocalRef(ref);
+ } else {
+ 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 removeLocalRef(ref) {
+ delete refs[ref];
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object' || typeof refVal == 'boolean'
+ ? { 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) {
+ if (self._opts.validateSchema !== false) {
+ var deps = rule.definition.dependencies;
+ if (deps && !deps.every(function(keyword) {
+ return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
+ }))
+ throw new Error('parent schema must have all required keywords: ' + deps.join(','));
+
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') self.logger.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;
+ if (!validate) return;
+ }
+
+ if (validate === undefined)
+ throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
+
+ 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= 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/har-validator/node_modules/ajv/lib/compile/util.js b/node_modules/har-validator/node_modules/ajv/lib/compile/util.js
new file mode 100644
index 0000000000000..ef07b8c757972
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/compile/util.js
@@ -0,0 +1,239 @@
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ equal: require('fast-deep-equal'),
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ schemaUnknownRules: schemaUnknownRules,
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ unescapeJsonPointer: unescapeJsonPointer,
+ 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, strictNumbers, 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 +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data, strictNumbers) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, strictNumbers, 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, strictNumbers, 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= 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'
+ , $notOp = $isMax ? '>' : '<'
+ , $errorKeyword = undefined;
+
+ if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
+ throw new Error($keyword + ' must be number');
+ }
+ if (!($isDataExcl || $schemaExcl === undefined
+ || typeof $schemaExcl == 'number'
+ || typeof $schemaExcl == 'boolean')) {
+ throw new Error($exclusiveKeyword + ' must be number or boolean');
+ }
+}}
+
+{{? $isDataExcl }}
+ {{
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
+ , $exclusive = 'exclusive' + $lvl
+ , $exclType = 'exclType' + $lvl
+ , $exclIsNumber = 'exclIsNumber' + $lvl
+ , $opExpr = 'op' + $lvl
+ , $opStr = '\' + ' + $opExpr + ' + \'';
+ }}
+ var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
+ {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
+
+ var {{=$exclusive}};
+ var {{=$exclType}} = typeof {{=$schemaValueExcl}};
+ if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') {
+ {{ var $errorKeyword = $exclusiveKeyword; }}
+ {{# def.error:'_exclusiveLimit' }}
+ } else if ({{# def.$dataNotType:'number' }}
+ {{=$exclType}} == 'number'
+ ? (
+ ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}})
+ ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ )
+ : (
+ ({{=$exclusive}} = {{=$schemaValueExcl}} === true)
+ ? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ )
+ || {{=$data}} !== {{=$data}}) {
+ var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
+ {{
+ if ($schema === undefined) {
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaValueExcl;
+ $isData = $isDataExcl;
+ }
+ }}
+{{??}}
+ {{
+ var $exclIsNumber = typeof $schemaExcl == 'number'
+ , $opStr = $op; /*used in error*/
+ }}
+
+ {{? $exclIsNumber && $isData }}
+ {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }}
+ if ({{# def.$dataNotType:'number' }}
+ ( {{=$schemaValue}} === undefined
+ || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}}
+ ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}} )
+ || {{=$data}} !== {{=$data}}) {
+ {{??}}
+ {{
+ if ($exclIsNumber && $schema === undefined) {
+ {{# def.setExclusiveLimit }}
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber)
+ $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ {{# def.setExclusiveLimit }}
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+
+ var $opExpr = '\'' + $opStr + '\''; /*used in error*/
+ }}
+
+ if ({{# def.$dataNotType:'number' }}
+ {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ || {{=$data}} !== {{=$data}}) {
+ {{?}}
+{{?}}
+ {{ $errorKeyword = $errorKeyword || $keyword; }}
+ {{# def.error:'_limit' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/_limitItems.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/_limitItems.jst
new file mode 100644
index 0000000000000..741329e7769ff
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/_limitItems.jst
@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ 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/har-validator/node_modules/ajv/lib/dot/_limitLength.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/_limitLength.jst
new file mode 100644
index 0000000000000..285c66bd2eed2
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/_limitLength.jst
@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ 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/har-validator/node_modules/ajv/lib/dot/_limitProperties.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/_limitProperties.jst
new file mode 100644
index 0000000000000..c4c21551abc3d
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/_limitProperties.jst
@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ 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/har-validator/node_modules/ajv/lib/dot/allOf.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/allOf.jst
new file mode 100644
index 0000000000000..0e782fe98e2da
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/allOf.jst
@@ -0,0 +1,32 @@
+{{# 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) }}
+ {{?}}
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/anyOf.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/anyOf.jst
new file mode 100644
index 0000000000000..ea909ee628e6b
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/anyOf.jst
@@ -0,0 +1,46 @@
+{{# 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.extraError:'anyOf' }}
+ } else {
+ {{# def.resetErrors }}
+ {{? it.opts.allErrors }} } {{?}}
+{{??}}
+ {{? $breakOnError }}
+ if (true) {
+ {{?}}
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/coerce.def b/node_modules/har-validator/node_modules/ajv/lib/dot/coerce.def
new file mode 100644
index 0000000000000..c947ed6af81d2
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/coerce.def
@@ -0,0 +1,51 @@
+{{## def.coerceType:
+ {{
+ var $dataType = 'dataType' + $lvl
+ , $coerced = 'coerced' + $lvl;
+ }}
+ var {{=$dataType}} = typeof {{=$data}};
+ var {{=$coerced}} = undefined;
+
+ {{? it.opts.coerceTypes == 'array' }}
+ if ({{=$dataType}} == 'object' && Array.isArray({{=$data}}) && {{=$data}}.length == 1) {
+ {{=$data}} = {{=$data}}[0];
+ {{=$dataType}} = typeof {{=$data}};
+ if ({{=it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)}}) {{=$coerced}} = {{=$data}};
+ }
+ {{?}}
+
+ if ({{=$coerced}} !== undefined) ;
+ {{~ $coerceToTypes:$type:$i }}
+ {{? $type == 'string' }}
+ else if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean')
+ {{=$coerced}} = '' + {{=$data}};
+ else if ({{=$data}} === null) {{=$coerced}} = '';
+ {{?? $type == 'number' || $type == 'integer' }}
+ else if ({{=$dataType}} == 'boolean' || {{=$data}} === null
+ || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}}
+ {{? $type == 'integer' }} && !({{=$data}} % 1){{?}}))
+ {{=$coerced}} = +{{=$data}};
+ {{?? $type == 'boolean' }}
+ else if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null)
+ {{=$coerced}} = false;
+ else if ({{=$data}} === 'true' || {{=$data}} === 1)
+ {{=$coerced}} = true;
+ {{?? $type == 'null' }}
+ else if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false)
+ {{=$coerced}} = null;
+ {{?? it.opts.coerceTypes == 'array' && $type == 'array' }}
+ else if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null)
+ {{=$coerced}} = [{{=$data}}];
+ {{?}}
+ {{~}}
+ else {
+ {{# def.error:'type' }}
+ }
+
+ if ({{=$coerced}} !== undefined) {
+ {{# def.setParentData }}
+ {{=$data}} = {{=$coerced}};
+ {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}}
+ {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}};
+ }
+#}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/comment.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/comment.jst
new file mode 100644
index 0000000000000..f95915035c6b5
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/comment.jst
@@ -0,0 +1,9 @@
+{{# def.definitions }}
+{{# def.setupKeyword }}
+
+{{ var $comment = it.util.toQuotedString($schema); }}
+{{? it.opts.$comment === true }}
+ console.log({{=$comment}});
+{{?? typeof it.opts.$comment == 'function' }}
+ self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema);
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/const.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/const.jst
new file mode 100644
index 0000000000000..2aa22980d7fc6
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/const.jst
@@ -0,0 +1,11 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{? !$isData }}
+ var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
+{{# def.checkError:'const' }}
+{{? $breakOnError }} else { {{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/contains.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/contains.jst
new file mode 100644
index 0000000000000..4dc9967418dec
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/contains.jst
@@ -0,0 +1,55 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{
+ var $idx = 'i' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $currentBaseId = it.baseId
+ , $nonEmptySchema = {{# def.nonEmptySchema:$schema }};
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? $nonEmptySchema }}
+ {{# def.setCompositeRule }}
+
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ var {{=$nextValid}} = false;
+
+ 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;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ if ({{=$nextValid}}) break;
+ }
+
+ {{# def.resetCompositeRule }}
+ {{= $closingBraces }}
+
+ if (!{{=$nextValid}}) {
+{{??}}
+ if ({{=$data}}.length == 0) {
+{{?}}
+
+ {{# def.error:'contains' }}
+ } else {
+ {{? $nonEmptySchema }}
+ {{# def.resetErrors }}
+ {{?}}
+ {{? it.opts.allErrors }} } {{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/custom.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/custom.jst
new file mode 100644
index 0000000000000..d30588fb0b4b5
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/custom.jst
@@ -0,0 +1,191 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $rule = this
+ , $definition = 'definition' + $lvl
+ , $rDef = $rule.definition
+ , $closingBraces = '';
+ 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);
+ if (!$ruleValidate) return;
+ $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}} 0)
+ || _schema === false
+ : 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.$data:
+ {{
+ var $isData = it.opts.$data && $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.numberKeyword:
+ {{? !($isData || typeof $schema == 'number') }}
+ {{ throw new Error($keyword + ' must be number'); }}
+ {{?}}
+#}}
+
+
+{{## 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.iterateProperties:
+ {{? $ownProperties }}
+ {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}});
+ for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) {
+ var {{=$key}} = {{=$dataProperties}}[{{=$idx}}];
+ {{??}}
+ for (var {{=$key}} in {{=$data}}) {
+ {{?}}
+#}}
+
+
+{{## def.noPropertyInData:
+ {{=$useData}} === undefined
+ {{? $ownProperties }}
+ || !{{# def.isOwnProperty }}
+ {{?}}
+#}}
+
+
+{{## def.isOwnProperty:
+ Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}')
+#}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/dependencies.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/dependencies.jst
new file mode 100644
index 0000000000000..e4bdddec8eb95
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/dependencies.jst
@@ -0,0 +1,79 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.propertyInData:
+ {{=$data}}{{= it.util.getProperty($property) }} !== undefined
+ {{? $ownProperties }}
+ && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}')
+ {{?}}
+#}}
+
+
+{{
+ var $schemaDeps = {}
+ , $propertyDeps = {}
+ , $ownProperties = it.opts.ownProperties;
+
+ for ($property in $schema) {
+ if ($property == '__proto__') continue;
+ 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]; }}
+ {{? $deps.length }}
+ if ({{# def.propertyInData }}
+ {{? $breakOnError }}
+ && ({{# def.checkMissingProperty:$deps }})) {
+ {{# def.errorMissingProperty:'dependencies' }}
+ {{??}}
+ ) {
+ {{~ $deps:$propertyKey }}
+ {{# 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 ({{# def.propertyInData }}) {
+ {{
+ $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) {
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/enum.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/enum.jst
new file mode 100644
index 0000000000000..357c2e8c081d1
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/enum.jst
@@ -0,0 +1,30 @@
+{{# 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/har-validator/node_modules/ajv/lib/dot/errors.def b/node_modules/har-validator/node_modules/ajv/lib/dot/errors.def
new file mode 100644
index 0000000000000..5c5752cb04db9
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/errors.def
@@ -0,0 +1,194 @@
+{{# 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}}{{??}}{{=$schemaValue}}'{{?}}#}}
+{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
+
+{{## def._errorMessages = {
+ 'false schema': "'boolean schema is false'",
+ $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
+ additionalItems: "'should NOT have more than {{=$schema.length}} items'",
+ additionalProperties: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}should NOT have additional properties{{?}}'",
+ anyOf: "'should match some schema in anyOf'",
+ const: "'should be equal to constant'",
+ contains: "'should contain a valid item'",
+ 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}}\"'",
+ 'if': "'should match \"' + {{=$ifClause}} + '\" schema'",
+ _limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
+ _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
+ _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'",
+ _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
+ _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} 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}}\"'",
+ propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'",
+ 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'",
+ patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
+ switch: "'should pass \"switch\" keyword validation'",
+ _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 = {
+ 'false schema': "false",
+ $ref: "{{=it.util.toQuotedString($schema)}}",
+ additionalItems: "false",
+ additionalProperties: "false",
+ anyOf: "validate.schema{{=$schemaPath}}",
+ const: "validate.schema{{=$schemaPath}}",
+ contains: "validate.schema{{=$schemaPath}}",
+ dependencies: "validate.schema{{=$schemaPath}}",
+ 'enum': "validate.schema{{=$schemaPath}}",
+ format: "{{#def.schemaRefOrQS}}",
+ 'if': "validate.schema{{=$schemaPath}}",
+ _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}}",
+ propertyNames: "validate.schema{{=$schemaPath}}",
+ required: "validate.schema{{=$schemaPath}}",
+ type: "validate.schema{{=$schemaPath}}",
+ uniqueItems: "{{#def.schemaRefOrVal}}",
+ custom: "validate.schema{{=$schemaPath}}",
+ patternRequired: "validate.schema{{=$schemaPath}}",
+ switch: "validate.schema{{=$schemaPath}}",
+ _formatLimit: "{{#def.schemaRefOrQS}}",
+ _formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
+} #}}
+
+
+{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorParams = {
+ 'false schema': "{}",
+ $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
+ additionalItems: "{ limit: {{=$schema.length}} }",
+ additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
+ anyOf: "{}",
+ const: "{ allowedValue: schema{{=$lvl}} }",
+ contains: "{}",
+ 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}} }",
+ 'if': "{ failingKeyword: {{=$ifClause}} }",
+ _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
+ _exclusiveLimit: "{}",
+ _limitItems: "{ limit: {{=$schemaValue}} }",
+ _limitLength: "{ limit: {{=$schemaValue}} }",
+ _limitProperties:"{ limit: {{=$schemaValue}} }",
+ multipleOf: "{ multipleOf: {{=$schemaValue}} }",
+ not: "{}",
+ oneOf: "{ passingSchemas: {{=$passingSchemas}} }",
+ pattern: "{ pattern: {{#def.schemaValueQS}} }",
+ propertyNames: "{ propertyName: '{{=$invalidName}}' }",
+ required: "{ missingProperty: '{{=$missingProperty}}' }",
+ type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
+ uniqueItems: "{ i: i, j: j }",
+ custom: "{ keyword: '{{=$rule.keyword}}' }",
+ patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
+ switch: "{ caseIndex: {{=$caseIndex}} }",
+ _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
+ _formatExclusiveLimit: "{}"
+} #}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/format.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/format.jst
new file mode 100644
index 0000000000000..37f14da80ef8f
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/format.jst
@@ -0,0 +1,106 @@
+{{# 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 != 'ignore' }}
+ ({{=$schemaValue}} && !{{=$format}}
+ {{? $allowUnknown }}
+ && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
+ {{?}}) ||
+ {{?}}
+ ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}'
+ && !(typeof {{=$format}} == 'function'
+ ? {{? it.async}}
+ (async{{=$lvl}} ? await {{=$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
+ , $isObject = 'isObject' + $lvl
+ , $formatType = 'formatType' + $lvl;
+ }}
+ var {{=$format}} = formats[{{=$schemaValue}}];
+ var {{=$isObject}} = typeof {{=$format}} == 'object'
+ && !({{=$format}} instanceof RegExp)
+ && {{=$format}}.validate;
+ var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string';
+ if ({{=$isObject}}) {
+ {{? it.async}}
+ var async{{=$lvl}} = {{=$format}}.async;
+ {{?}}
+ {{=$format}} = {{=$format}}.validate;
+ }
+ if ({{# def.$dataCheckFormat }}) {
+{{??}}
+ {{ var $format = it.formats[$schema]; }}
+ {{? !$format }}
+ {{? $unknownFormats == 'ignore' }}
+ {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
+ {{# def.skipFormat }}
+ {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }}
+ {{# def.skipFormat }}
+ {{??}}
+ {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
+ {{?}}
+ {{?}}
+ {{
+ var $isObject = typeof $format == 'object'
+ && !($format instanceof RegExp)
+ && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ }}
+ {{? $formatType != $ruleType }}
+ {{# def.skipFormat }}
+ {{?}}
+ {{? $async }}
+ {{
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ }}
+ if (!(await {{=$formatRef}}({{=$data}}))) {
+ {{??}}
+ if (!{{# def.checkFormat }}) {
+ {{?}}
+{{?}}
+ {{# def.error:'format' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/if.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/if.jst
new file mode 100644
index 0000000000000..adb50361245a1
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/if.jst
@@ -0,0 +1,73 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateIfClause:_clause:
+ {{
+ $it.schema = it.schema['_clause'];
+ $it.schemaPath = it.schemaPath + '._clause';
+ $it.errSchemaPath = it.errSchemaPath + '/_clause';
+ }}
+ {{# def.insertSubschemaCode }}
+ {{=$valid}} = {{=$nextValid}};
+ {{? $thenPresent && $elsePresent }}
+ {{ $ifClause = 'ifClause' + $lvl; }}
+ var {{=$ifClause}} = '_clause';
+ {{??}}
+ {{ $ifClause = '\'_clause\''; }}
+ {{?}}
+#}}
+
+{{
+ var $thenSch = it.schema['then']
+ , $elseSch = it.schema['else']
+ , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }}
+ , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }}
+ , $currentBaseId = $it.baseId;
+}}
+
+{{? $thenPresent || $elsePresent }}
+ {{
+ var $ifClause;
+ $it.createErrors = false;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+ var {{=$errs}} = errors;
+ var {{=$valid}} = true;
+
+ {{# def.setCompositeRule }}
+ {{# def.insertSubschemaCode }}
+ {{ $it.createErrors = true; }}
+ {{# def.resetErrors }}
+ {{# def.resetCompositeRule }}
+
+ {{? $thenPresent }}
+ if ({{=$nextValid}}) {
+ {{# def.validateIfClause:then }}
+ }
+ {{? $elsePresent }}
+ else {
+ {{?}}
+ {{??}}
+ if (!{{=$nextValid}}) {
+ {{?}}
+
+ {{? $elsePresent }}
+ {{# def.validateIfClause:else }}
+ }
+ {{?}}
+
+ if (!{{=$valid}}) {
+ {{# def.extraError:'if' }}
+ }
+ {{? $breakOnError }} else { {{?}}
+{{??}}
+ {{? $breakOnError }}
+ if (true) {
+ {{?}}
+{{?}}
+
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/items.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/items.jst
new file mode 100644
index 0000000000000..acc932a26eea8
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/items.jst
@@ -0,0 +1,98 @@
+{{# 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 }}
+{{?}}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/missing.def b/node_modules/har-validator/node_modules/ajv/lib/dot/missing.def
new file mode 100644
index 0000000000000..a73b9f966e9e8
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/missing.def
@@ -0,0 +1,39 @@
+{{## def.checkMissingProperty:_properties:
+ {{~ _properties:$propertyKey:$i }}
+ {{?$i}} || {{?}}
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $useData = $data + $prop;
+ }}
+ ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $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($propertyKey)
+ , $missingProperty = it.util.escapeQuotes($propertyKey)
+ , $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ }}
+ if ({{# def.noPropertyInData }}) {
+ {{# def.addError:_error }}
+ }
+#}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/multipleOf.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/multipleOf.jst
new file mode 100644
index 0000000000000..6d88a456f3817
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/multipleOf.jst
@@ -0,0 +1,22 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+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/har-validator/node_modules/ajv/lib/dot/not.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/not.jst
new file mode 100644
index 0000000000000..e03185ae87405
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/not.jst
@@ -0,0 +1,43 @@
+{{# 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/har-validator/node_modules/ajv/lib/dot/oneOf.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/oneOf.jst
new file mode 100644
index 0000000000000..bcce2c6ed5afe
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/oneOf.jst
@@ -0,0 +1,54 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+ var $currentBaseId = $it.baseId
+ , $prevValid = 'prevValid' + $lvl
+ , $passingSchemas = 'passingSchemas' + $lvl;
+}}
+
+var {{=$errs}} = errors
+ , {{=$prevValid}} = false
+ , {{=$valid}} = false
+ , {{=$passingSchemas}} = null;
+
+{{# 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}}) {
+ {{=$valid}} = false;
+ {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}];
+ } else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ if ({{=$nextValid}}) {
+ {{=$valid}} = {{=$prevValid}} = true;
+ {{=$passingSchemas}} = {{=$i}};
+ }
+{{~}}
+
+{{# def.resetCompositeRule }}
+
+{{= $closingBraces }}
+
+if (!{{=$valid}}) {
+ {{# def.extraError:'oneOf' }}
+} else {
+ {{# def.resetErrors }}
+{{? it.opts.allErrors }} } {{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst
new file mode 100644
index 0000000000000..3a37ef6cb8560
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst
@@ -0,0 +1,14 @@
+{{# 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/har-validator/node_modules/ajv/lib/dot/properties.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/properties.jst
new file mode 100644
index 0000000000000..5cebb9b12e948
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/properties.jst
@@ -0,0 +1,245 @@
+{{# 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
+ , $idx = 'idx' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $dataProperties = 'dataProperties' + $lvl;
+
+ var $schemaKeys = Object.keys($schema || {}).filter(notProto)
+ , $pProperties = it.schema.patternProperties || {}
+ , $pPropertyKeys = Object.keys($pProperties).filter(notProto)
+ , $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.$data && $required.$data) && $required.length < it.opts.loopRequired) {
+ var $requiredHash = it.util.toHash($required);
+ }
+
+ function notProto(p) { return p !== '__proto__'; }
+}}
+
+
+var {{=$errs}} = errors;
+var {{=$nextValid}} = true;
+{{? $ownProperties }}
+ var {{=$dataProperties}} = undefined;
+{{?}}
+
+{{? $checkAdditional }}
+ {{# def.iterateProperties }}
+ {{? $someProperties }}
+ var isAdditional{{=$lvl}} = !(false
+ {{? $schemaKeys.length }}
+ {{? $schemaKeys.length > 8 }}
+ || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}})
+ {{??}}
+ {{~ $schemaKeys:$propertyKey }}
+ || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }}
+ {{~}}
+ {{?}}
+ {{?}}
+ {{? $pPropertyKeys.length }}
+ {{~ $pPropertyKeys:$pProperty:$i }}
+ || {{= it.usePattern($pProperty) }}.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 ({{# def.noPropertyInData }}) {
+ {{=$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 ({{# def.noPropertyInData }}) {
+ {{=$nextValid}} = true;
+ } else {
+ {{??}}
+ if ({{=$useData}} !== undefined
+ {{? $ownProperties }}
+ && {{# def.isOwnProperty }}
+ {{?}}
+ ) {
+ {{?}}
+ {{?}}
+
+ {{= $code }}
+ }
+ {{?}} {{ /* $hasDefault */ }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+
+ {{# def.ifResultValid }}
+ {{~}}
+{{?}}
+
+{{? $pPropertyKeys.length }}
+ {{~ $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);
+ }}
+
+ {{# def.iterateProperties }}
+ 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 */ }}
+ {{~}}
+{{?}}
+
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/propertyNames.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/propertyNames.jst
new file mode 100644
index 0000000000000..d456ccafc4b58
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/propertyNames.jst
@@ -0,0 +1,52 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+var {{=$errs}} = errors;
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ {{
+ var $key = 'key' + $lvl
+ , $idx = 'idx' + $lvl
+ , $i = 'i' + $lvl
+ , $invalidName = '\' + ' + $key + ' + \''
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $dataProperties = 'dataProperties' + $lvl
+ , $ownProperties = it.opts.ownProperties
+ , $currentBaseId = it.baseId;
+ }}
+
+ {{? $ownProperties }}
+ var {{=$dataProperties}} = undefined;
+ {{?}}
+ {{# def.iterateProperties }}
+ var startErrs{{=$lvl}} = errors;
+
+ {{ var $passData = $key; }}
+ {{# def.setCompositeRule }}
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+ {{# def.resetCompositeRule }}
+
+ if (!{{=$nextValid}}) {
+ for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}= it.opts.loopRequired
+ , $ownProperties = it.opts.ownProperties;
+ }}
+
+ {{? $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
+ {{? $ownProperties }}
+ && {{# def.isRequiredOwnProperty }}
+ {{?}};
+ 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
+ {{? $ownProperties }}
+ || !{{# def.isRequiredOwnProperty }}
+ {{?}}) {
+ {{# def.addError:'required' }}
+ }
+ }
+
+ {{? $isData }} } {{?}}
+ {{??}}
+ {{~ $required:$propertyKey }}
+ {{# def.allErrorsMissingProperty:'required' }}
+ {{~}}
+ {{?}}
+ {{?}}
+
+ {{ it.errorPath = $currentErrorPath; }}
+
+{{?? $breakOnError }}
+ if (true) {
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/uniqueItems.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/uniqueItems.jst
new file mode 100644
index 0000000000000..e69b8308d2c47
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/uniqueItems.jst
@@ -0,0 +1,62 @@
+{{# 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 i = {{=$data}}.length
+ , {{=$valid}} = true
+ , j;
+ if (i > 1) {
+ {{
+ var $itemType = it.schema.items && it.schema.items.type
+ , $typeIsArray = Array.isArray($itemType);
+ }}
+ {{? !$itemType || $itemType == 'object' || $itemType == 'array' ||
+ ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }}
+ outer:
+ for (;i--;) {
+ for (j = i; j--;) {
+ if (equal({{=$data}}[i], {{=$data}}[j])) {
+ {{=$valid}} = false;
+ break outer;
+ }
+ }
+ }
+ {{??}}
+ var itemIndices = {}, item;
+ for (;i--;) {
+ var item = {{=$data}}[i];
+ {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }}
+ if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue;
+ {{? $typeIsArray}}
+ if (typeof item == 'string') item = '"' + item;
+ {{?}}
+ if (typeof itemIndices[item] == 'number') {
+ {{=$valid}} = false;
+ j = itemIndices[item];
+ break;
+ }
+ itemIndices[item] = i;
+ }
+ {{?}}
+ }
+
+ {{? $isData }} } {{?}}
+
+ if (!{{=$valid}}) {
+ {{# def.error:'uniqueItems' }}
+ } {{? $breakOnError }} else { {{?}}
+{{??}}
+ {{? $breakOnError }} if (true) { {{?}}
+{{?}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dot/validate.jst b/node_modules/har-validator/node_modules/ajv/lib/dot/validate.jst
new file mode 100644
index 0000000000000..32087e71c0d53
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dot/validate.jst
@@ -0,0 +1,276 @@
+{{# 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
+ , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref')
+ , $id = it.self._getId(it.schema);
+}}
+
+{{
+ if (it.opts.strictKeywords) {
+ var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
+ if ($unknownKwd) {
+ var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
+ if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
+ else throw new Error($keywordsMsg);
+ }
+ }
+}}
+
+{{? it.isTop }}
+ var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ {{? $id && (it.opts.sourceCode || it.opts.processCode) }}
+ {{= '/\*# sourceURL=' + $id + ' */' }}
+ {{?}}
+{{?}}
+
+{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }}
+ {{ var $keyword = 'false schema'; }}
+ {{# def.setupKeyword }}
+ {{? it.schema === false}}
+ {{? it.isTop}}
+ {{ $breakOnError = true; }}
+ {{??}}
+ var {{=$valid}} = false;
+ {{?}}
+ {{# def.error:'false schema' }}
+ {{??}}
+ {{? it.isTop}}
+ {{? $async }}
+ return data;
+ {{??}}
+ validate.errors = null;
+ return true;
+ {{?}}
+ {{??}}
+ var {{=$valid}} = true;
+ {{?}}
+ {{?}}
+
+ {{? it.isTop}}
+ };
+ return validate;
+ {{?}}
+
+ {{ return out; }}
+{{?}}
+
+
+{{? it.isTop }}
+ {{
+ var $top = it.isTop
+ , $lvl = it.level = 0
+ , $dataLvl = it.dataLevel = 0
+ , $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+
+ it.dataPathArr = [""];
+
+ if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored in the schema root';
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ }}
+
+ var vErrors = null; {{ /* don't edit, used in replace */ }}
+ var errors = 0; {{ /* don't edit, used in replace */ }}
+ if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }}
+{{??}}
+ {{
+ var $lvl = it.level
+ , $dataLvl = it.dataLevel
+ , $data = 'data' + ($dataLvl || '');
+
+ if ($id) it.baseId = it.resolve.url(it.baseId, $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);
+
+ if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
+ if ($typeIsArray) {
+ if ($typeSchema.indexOf('null') == -1)
+ $typeSchema = $typeSchema.concat('null');
+ } else if ($typeSchema != 'null') {
+ $typeSchema = [$typeSchema, 'null'];
+ $typeIsArray = true;
+ }
+ }
+
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+}}
+
+{{## def.checkType:
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type'
+ , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ }}
+
+ if ({{= it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) }}) {
+#}}
+
+{{? it.schema.$ref && $refKeywords }}
+ {{? it.opts.extendRefs == 'fail' }}
+ {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }}
+ {{?? it.opts.extendRefs !== true }}
+ {{
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }}
+ {{?}}
+{{?}}
+
+{{? it.schema.$comment && it.opts.$comment }}
+ {{= it.RULES.all.$comment.code(it, '$comment') }}
+{{?}}
+
+{{? $typeSchema }}
+ {{? it.opts.coerceTypes }}
+ {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
+ {{?}}
+
+ {{ var $rulesGroup = it.RULES.types[$typeSchema]; }}
+ {{? $coerceToTypes || $typeIsArray || $rulesGroup === true ||
+ ($rulesGroup && !$shouldUseGroup($rulesGroup)) }}
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type';
+ }}
+ {{# def.checkType }}
+ {{? $coerceToTypes }}
+ {{# def.coerceType }}
+ {{??}}
+ {{# def.error:'type' }}
+ {{?}}
+ }
+ {{?}}
+{{?}}
+
+
+{{? 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.strictNumbers) }}) {
+ {{?}}
+ {{? it.opts.useDefaults }}
+ {{? $rulesGroup.type == 'object' && it.schema.properties }}
+ {{# def.defaultProperties }}
+ {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }}
+ {{# def.defaultItems }}
+ {{?}}
+ {{?}}
+ {{~ $rulesGroup.rules:$rule }}
+ {{? $shouldUseRule($rule) }}
+ {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }}
+ {{? $code }}
+ {{= $code }}
+ {{? $breakOnError }}
+ {{ $closingBraces1 += '}'; }}
+ {{?}}
+ {{?}}
+ {{?}}
+ {{~}}
+ {{? $breakOnError }}
+ {{= $closingBraces1 }}
+ {{ $closingBraces1 = ''; }}
+ {{?}}
+ {{? $rulesGroup.type }}
+ }
+ {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }}
+ else {
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type';
+ }}
+ {{# def.error:'type' }}
+ }
+ {{?}}
+ {{?}}
+
+ {{? $breakOnError }}
+ if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+ {{ $closingBraces2 += '}'; }}
+ {{?}}
+ {{?}}
+ {{~}}
+{{?}}
+
+{{? $breakOnError }} {{= $closingBraces2 }} {{?}}
+
+{{? $top }}
+ {{? $async }}
+ if (errors === 0) return data; {{ /* 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}};
+{{?}}
+
+{{
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i=0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i]))
+ return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined ||
+ ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i=0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined)
+ return true;
+ }
+}}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/README.md b/node_modules/har-validator/node_modules/ajv/lib/dotjs/README.md
new file mode 100644
index 0000000000000..4d994846c81f6
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/README.md
@@ -0,0 +1,3 @@
+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/har-validator/node_modules/ajv/lib/dotjs/_limit.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limit.js
new file mode 100644
index 0000000000000..05a1979dcb8e9
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limit.js
@@ -0,0 +1,163 @@
+'use strict';
+module.exports = function generate__limit(it, $keyword, $ruleType) {
+ 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.$data && $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.$data && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $notOp = $isMax ? '>' : '<',
+ $errorKeyword = undefined;
+ if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
+ throw new Error($keyword + ' must be number');
+ }
+ if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) {
+ throw new Error($exclusiveKeyword + ' must be number or boolean');
+ }
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $exclType = 'exclType' + $lvl,
+ $exclIsNumber = 'exclIsNumber' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ 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 += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; ';
+ if ($schema === undefined) {
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaValueExcl;
+ $isData = $isDataExcl;
+ }
+ } else {
+ var $exclIsNumber = typeof $schemaExcl == 'number',
+ $opStr = $op;
+ if ($exclIsNumber && $isData) {
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
+ } else {
+ if ($exclIsNumber && $schema === undefined) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ }
+ }
+ $errorKeyword = $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 += '' + ($schemaValue) + '\'';
+ }
+ }
+ 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/har-validator/node_modules/ajv/lib/dotjs/_limitItems.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitItems.js
new file mode 100644
index 0000000000000..e092a559ea0ae
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitItems.js
@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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 += 'fewer';
+ }
+ 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/har-validator/node_modules/ajv/lib/dotjs/_limitLength.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitLength.js
new file mode 100644
index 0000000000000..ecbd3fe1906f3
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitLength.js
@@ -0,0 +1,85 @@
+'use strict';
+module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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/har-validator/node_modules/ajv/lib/dotjs/_limitProperties.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitProperties.js
new file mode 100644
index 0000000000000..d232755ad0b21
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitProperties.js
@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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 += 'fewer';
+ }
+ 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/har-validator/node_modules/ajv/lib/dotjs/allOf.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/allOf.js
new file mode 100644
index 0000000000000..fb8c2e4bbefe9
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/allOf.js
@@ -0,0 +1,42 @@
+'use strict';
+module.exports = function generate_allOf(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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)) + ' ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/anyOf.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/anyOf.js
new file mode 100644
index 0000000000000..0600a9d42bce5
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/anyOf.js
@@ -0,0 +1,73 @@
+'use strict';
+module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/comment.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/comment.js
new file mode 100644
index 0000000000000..dd66bb8f0f951
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/comment.js
@@ -0,0 +1,14 @@
+'use strict';
+module.exports = function generate_comment(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $comment = it.util.toQuotedString($schema);
+ if (it.opts.$comment === true) {
+ out += ' console.log(' + ($comment) + ');';
+ } else if (typeof it.opts.$comment == 'function') {
+ out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/const.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/const.js
new file mode 100644
index 0000000000000..15b7c619fff05
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/const.js
@@ -0,0 +1,56 @@
+'use strict';
+module.exports = function generate_const(it, $keyword, $ruleType) {
+ 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.$data && $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: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';
+ 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 += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/contains.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/contains.js
new file mode 100644
index 0000000000000..7d763009073aa
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/contains.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate_contains(it, $keyword, $ruleType) {
+ 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,
+ $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all));
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($nonEmptySchema) {
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($nextValid) + ' = false; 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) + ' ';
+ }
+ out += ' if (' + ($nextValid) + ') break; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
+ } else {
+ out += ' if (' + ($data) + '.length == 0) {';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should contain a valid item\' ';
+ }
+ 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 ($nonEmptySchema) {
+ out += ' 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/har-validator/node_modules/ajv/lib/dotjs/custom.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/custom.js
new file mode 100644
index 0000000000000..f3e641e701709
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/custom.js
@@ -0,0 +1,228 @@
+'use strict';
+module.exports = function generate_custom(it, $keyword, $ruleType) {
+ 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.$data && $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,
+ $closingBraces = '';
+ 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);
+ if (!$ruleValidate) return;
+ $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 ($isData && $rDef.$data) {
+ $closingBraces += '}';
+ out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
+ if ($validateSchema) {
+ $closingBraces += '}';
+ 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);
+ var $closingBraces = '';
+ $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 += 'await ';
+ }
+ out += '' + (def_callRuleValidate) + '; ';
+ } else {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (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 += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ out += '' + ($closingBraces);
+ 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) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ out += ') { ';
+ $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) {';
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/enum.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/enum.js
new file mode 100644
index 0000000000000..90580b9ff7940
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/enum.js
@@ -0,0 +1,66 @@
+'use strict';
+module.exports = function generate_enum(it, $keyword, $ruleType) {
+ 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.$data && $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/har-validator/node_modules/ajv/lib/dotjs/format.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/format.js
new file mode 100644
index 0000000000000..cd9a5693e70e9
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/format.js
@@ -0,0 +1,150 @@
+'use strict';
+module.exports = function generate_format(it, $keyword, $ruleType) {
+ 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.$data && $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,
+ $isObject = 'isObject' + $lvl,
+ $formatType = 'formatType' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ 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 != 'ignore') {
+ out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
+ if ($allowUnknown) {
+ out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
+ }
+ out += ') || ';
+ }
+ out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($unknownFormats == 'ignore') {
+ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($formatType != $ruleType) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(await ' + ($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/har-validator/node_modules/ajv/lib/dotjs/if.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/if.js
new file mode 100644
index 0000000000000..94d27ad853836
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/if.js
@@ -0,0 +1,103 @@
+'use strict';
+module.exports = function generate_if(it, $keyword, $ruleType) {
+ 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);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $thenSch = it.schema['then'],
+ $elseSch = it.schema['else'],
+ $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)),
+ $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)),
+ $currentBaseId = $it.baseId;
+ if ($thenPresent || $elsePresent) {
+ var $ifClause;
+ $it.createErrors = false;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ $it.createErrors = true;
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ if ($thenPresent) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $it.schema = it.schema['then'];
+ $it.schemaPath = it.schemaPath + '.then';
+ $it.errSchemaPath = it.errSchemaPath + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'then\'; ';
+ } else {
+ $ifClause = '\'then\'';
+ }
+ out += ' } ';
+ if ($elsePresent) {
+ out += ' else { ';
+ }
+ } else {
+ out += ' if (!' + ($nextValid) + ') { ';
+ }
+ if ($elsePresent) {
+ $it.schema = it.schema['else'];
+ $it.schemaPath = it.schemaPath + '.else';
+ $it.errSchemaPath = it.errSchemaPath + '/else';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'else\'; ';
+ } else {
+ $ifClause = '\'else\'';
+ }
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' ';
+ }
+ 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; ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/index.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/index.js
new file mode 100644
index 0000000000000..2fb1b00ef69f6
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/index.js
@@ -0,0 +1,33 @@
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('./ref'),
+ allOf: require('./allOf'),
+ anyOf: require('./anyOf'),
+ '$comment': require('./comment'),
+ const: require('./const'),
+ contains: require('./contains'),
+ dependencies: require('./dependencies'),
+ 'enum': require('./enum'),
+ format: require('./format'),
+ 'if': require('./if'),
+ items: require('./items'),
+ maximum: require('./_limit'),
+ minimum: require('./_limit'),
+ maxItems: require('./_limitItems'),
+ minItems: require('./_limitItems'),
+ maxLength: require('./_limitLength'),
+ minLength: require('./_limitLength'),
+ maxProperties: require('./_limitProperties'),
+ minProperties: require('./_limitProperties'),
+ multipleOf: require('./multipleOf'),
+ not: require('./not'),
+ oneOf: require('./oneOf'),
+ pattern: require('./pattern'),
+ properties: require('./properties'),
+ propertyNames: require('./propertyNames'),
+ required: require('./required'),
+ uniqueItems: require('./uniqueItems'),
+ validate: require('./validate')
+};
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/items.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/items.js
new file mode 100644
index 0000000000000..bee5d67da246f
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/items.js
@@ -0,0 +1,140 @@
+'use strict';
+module.exports = function generate_items(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : 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.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : 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 += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/multipleOf.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/multipleOf.js
new file mode 100644
index 0000000000000..9d6401b8f723f
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/multipleOf.js
@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+ 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.$data && $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 || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ 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 += '' + ($schemaValue) + '\'';
+ }
+ }
+ 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/har-validator/node_modules/ajv/lib/dotjs/not.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/not.js
new file mode 100644
index 0000000000000..f50c93785b712
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/not.js
@@ -0,0 +1,84 @@
+'use strict';
+module.exports = function generate_not(it, $keyword, $ruleType) {
+ 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.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : 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/har-validator/node_modules/ajv/lib/dotjs/oneOf.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/oneOf.js
new file mode 100644
index 0000000000000..dfe2fd550ef28
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/oneOf.js
@@ -0,0 +1,73 @@
+'use strict';
+module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+ 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 $currentBaseId = $it.baseId,
+ $prevValid = 'prevValid' + $lvl,
+ $passingSchemas = 'passingSchemas' + $lvl;
+ out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; ';
+ 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.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } ';
+ 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 += ' {} ';
+ }
+ 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; ';
+ }
+ }
+ 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/har-validator/node_modules/ajv/lib/dotjs/pattern.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js
new file mode 100644
index 0000000000000..1d74d6b04be0a
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js
@@ -0,0 +1,75 @@
+'use strict';
+module.exports = function generate_pattern(it, $keyword, $ruleType) {
+ 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.$data && $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/har-validator/node_modules/ajv/lib/dotjs/properties.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/properties.js
new file mode 100644
index 0000000000000..bc5ee55478090
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/properties.js
@@ -0,0 +1,335 @@
+'use strict';
+module.exports = function generate_properties(it, $keyword, $ruleType) {
+ 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 $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl;
+ var $schemaKeys = Object.keys($schema || {}).filter(notProto),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties).filter(notProto),
+ $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.$data && $required.$data) && $required.length < it.opts.loopRequired) {
+ var $requiredHash = it.util.toHash($required);
+ }
+
+ function notProto(p) {
+ return p !== '__proto__';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined;';
+ }
+ if ($checkAdditional) {
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 8) {
+ out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($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) + ') ';
+ }
+ }
+ }
+ 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: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is an invalid additional property';
+ } else {
+ out += 'should NOT have additional properties';
+ }
+ out += '\' ';
+ }
+ 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 arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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 ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($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 ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ' ) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr4 = $pPropertyKeys;
+ if (arr4) {
+ var $pProperty, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $pProperty = arr4[i4 += 1];
+ var $sch = $pProperties[$pProperty];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : 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);
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ 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 ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/dotjs/propertyNames.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/propertyNames.js
new file mode 100644
index 0000000000000..2a54a08f45e54
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/propertyNames.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
+ 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;
+ out += 'var ' + ($errs) + ' = errors;';
+ if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $i = 'i' + $lvl,
+ $invalidName = '\' + ' + $key + ' + \'',
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined; ';
+ }
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' var startErrs' + ($lvl) + ' = errors; ';
+ var $passData = $key;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ 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) + ' ';
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : 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,
+ $ownProperties = it.opts.ownProperties;
+ 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 ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += '; 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 $propertyKey, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $propertyKey = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $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 ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += ') { 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 $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { 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/har-validator/node_modules/ajv/lib/dotjs/uniqueItems.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/uniqueItems.js
new file mode 100644
index 0000000000000..0736a0ed2333c
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/uniqueItems.js
@@ -0,0 +1,86 @@
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+ 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.$data && $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 i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';
+ var $itemType = it.schema.items && it.schema.items.type,
+ $typeIsArray = Array.isArray($itemType);
+ if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {
+ out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';
+ } else {
+ out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';
+ var $method = 'checkDataType' + ($typeIsArray ? 's' : '');
+ out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; ';
+ if ($typeIsArray) {
+ out += ' if (typeof item == \'string\') item = \'"\' + item; ';
+ }
+ out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';
+ }
+ out += ' } ';
+ 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/har-validator/node_modules/ajv/lib/dotjs/validate.js b/node_modules/har-validator/node_modules/ajv/lib/dotjs/validate.js
new file mode 100644
index 0000000000000..f295824b9325a
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/dotjs/validate.js
@@ -0,0 +1,482 @@
+'use strict';
+module.exports = function generate_validate(it, $keyword, $ruleType) {
+ var out = '';
+ var $async = it.schema.$async === true,
+ $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
+ $id = it.self._getId(it.schema);
+ if (it.opts.strictKeywords) {
+ var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
+ if ($unknownKwd) {
+ var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
+ if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
+ else throw new Error($keywordsMsg);
+ }
+ }
+ if (it.isTop) {
+ out += ' var validate = ';
+ if ($async) {
+ it.async = true;
+ out += 'async ';
+ }
+ out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
+ if ($id && (it.opts.sourceCode || it.opts.processCode)) {
+ out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
+ }
+ }
+ if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
+ var $keyword = 'false schema';
+ 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;
+ if (it.schema === false) {
+ if (it.isTop) {
+ $breakOnError = true;
+ } else {
+ out += ' var ' + ($valid) + ' = false; ';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'boolean schema is false\' ';
+ }
+ 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++; ';
+ }
+ } else {
+ if (it.isTop) {
+ if ($async) {
+ out += ' return data; ';
+ } else {
+ out += ' validate.errors = null; return true; ';
+ }
+ } else {
+ out += ' var ' + ($valid) + ' = true; ';
+ }
+ }
+ if (it.isTop) {
+ out += ' }; return validate; ';
+ }
+ return out;
+ }
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+ it.dataPathArr = [""];
+ if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored in the schema root';
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ out += ' 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 ($id) it.baseId = it.resolve.url(it.baseId, $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 $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
+ if ($typeIsArray) {
+ if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null');
+ } else if ($typeSchema != 'null') {
+ $typeSchema = [$typeSchema, 'null'];
+ $typeIsArray = true;
+ }
+ }
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+ if (it.schema.$ref && $refKeywords) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
+ } else if (it.opts.extendRefs !== true) {
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ if (it.schema.$comment && it.opts.$comment) {
+ out += ' ' + (it.RULES.all.$comment.code(it, '$comment'));
+ }
+ if ($typeSchema) {
+ if (it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ }
+ var $rulesGroup = it.RULES.types[$typeSchema];
+ if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { ';
+ if ($coerceToTypes) {
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } ';
+ }
+ out += ' if (' + ($coerced) + ' !== undefined) ; ';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($type == 'string') {
+ out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' else { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '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 (' + ($coerced) + ' !== undefined) { ';
+ 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) + '; } ';
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '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 (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, it.opts.strictNumbers)) + ') { ';
+ }
+ if (it.opts.useDefaults) {
+ 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);
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($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 + ']';
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($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)) {
+ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
+ if ($code) {
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
+ 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: \'' + ($errorKeyword || '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 ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return data; ';
+ 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) + ';';
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i = 0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i = 0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined) return true;
+ }
+ return out;
+}
diff --git a/node_modules/har-validator/node_modules/ajv/lib/keyword.js b/node_modules/har-validator/node_modules/ajv/lib/keyword.js
new file mode 100644
index 0000000000000..06da9a2dfbe5c
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/lib/keyword.js
@@ -0,0 +1,146 @@
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var customRuleCode = require('./dotjs/custom');
+var definitionSchema = require('./definition_schema');
+
+module.exports = {
+ add: addKeyword,
+ get: getKeyword,
+ remove: removeKeyword,
+ validate: validateKeyword
+};
+
+
+/**
+ * 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`.
+ * @return {Ajv} this for method chaining
+ */
+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) {
+ this.validateKeyword(definition, true);
+
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ for (var i=0; i ../ajv-dist/bower.json
+ cd ../ajv-dist
+
+ if [[ `git status --porcelain` ]]; then
+ echo "Changes detected. Updating master branch..."
+ git add -A
+ git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER"
+ git push --quiet origin master > /dev/null 2>&1
+ fi
+
+ echo "Publishing tag..."
+
+ git tag $TRAVIS_TAG
+ git push --tags > /dev/null 2>&1
+
+ echo "Done"
+fi
diff --git a/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages b/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages
new file mode 100644
index 0000000000000..b3d4f3d0f489d
--- /dev/null
+++ b/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages
@@ -0,0 +1,23 @@
+#!/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/ajv-validator/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/ ]+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/har-validator/node_modules/fast-deep-equal/LICENSE b/node_modules/har-validator/node_modules/fast-deep-equal/LICENSE
new file mode 100644
index 0000000000000..7f1543566f6ab
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 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/har-validator/node_modules/fast-deep-equal/README.md b/node_modules/har-validator/node_modules/fast-deep-equal/README.md
new file mode 100644
index 0000000000000..d3f4ffcc316f9
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/README.md
@@ -0,0 +1,96 @@
+# fast-deep-equal
+The fastest deep equal with ES6 Map, Set and Typed arrays support.
+
+[](https://travis-ci.org/epoberezkin/fast-deep-equal)
+[](https://www.npmjs.com/package/fast-deep-equal)
+[](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master)
+
+
+## Install
+
+```bash
+npm install fast-deep-equal
+```
+
+
+## Features
+
+- ES5 compatible
+- works in node.js (8+) and browsers (IE9+)
+- checks equality of Date and RegExp objects by value.
+
+ES6 equal (`require('fast-deep-equal/es6')`) also supports:
+- Maps
+- Sets
+- Typed arrays
+
+
+## Usage
+
+```javascript
+var equal = require('fast-deep-equal');
+console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true
+```
+
+To support ES6 Maps, Sets and Typed arrays equality use:
+
+```javascript
+var equal = require('fast-deep-equal/es6');
+console.log(equal(Int16Array([1, 2]), Int16Array([1, 2]))); // true
+```
+
+To use with React (avoiding the traversal of React elements' _owner
+property that contains circular references and is not needed when
+comparing the elements - borrowed from [react-fast-compare](https://github.com/FormidableLabs/react-fast-compare)):
+
+```javascript
+var equal = require('fast-deep-equal/react');
+var equal = require('fast-deep-equal/es6/react');
+```
+
+
+## Performance benchmark
+
+Node.js v12.6.0:
+
+```
+fast-deep-equal x 261,950 ops/sec ยฑ0.52% (89 runs sampled)
+fast-deep-equal/es6 x 212,991 ops/sec ยฑ0.34% (92 runs sampled)
+fast-equals x 230,957 ops/sec ยฑ0.83% (85 runs sampled)
+nano-equal x 187,995 ops/sec ยฑ0.53% (88 runs sampled)
+shallow-equal-fuzzy x 138,302 ops/sec ยฑ0.49% (90 runs sampled)
+underscore.isEqual x 74,423 ops/sec ยฑ0.38% (89 runs sampled)
+lodash.isEqual x 36,637 ops/sec ยฑ0.72% (90 runs sampled)
+deep-equal x 2,310 ops/sec ยฑ0.37% (90 runs sampled)
+deep-eql x 35,312 ops/sec ยฑ0.67% (91 runs sampled)
+ramda.equals x 12,054 ops/sec ยฑ0.40% (91 runs sampled)
+util.isDeepStrictEqual x 46,440 ops/sec ยฑ0.43% (90 runs sampled)
+assert.deepStrictEqual x 456 ops/sec ยฑ0.71% (88 runs sampled)
+
+The fastest is fast-deep-equal
+```
+
+To run benchmark (requires node.js 6+):
+
+```bash
+npm run benchmark
+```
+
+__Please note__: this benchmark runs against the available test cases. To choose the most performant library for your application, it is recommended to benchmark against your data and to NOT expect this benchmark to reflect the performance difference in your application.
+
+
+## Enterprise support
+
+fast-deep-equal package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-deep-equal?utm_source=npm-fast-deep-equal&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers.
+
+
+## Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues.
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE)
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/es6/index.d.ts b/node_modules/har-validator/node_modules/fast-deep-equal/es6/index.d.ts
new file mode 100644
index 0000000000000..c7eb9c79694cc
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/es6/index.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/es6/index.js b/node_modules/har-validator/node_modules/fast-deep-equal/es6/index.js
new file mode 100644
index 0000000000000..d980be2575b7f
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/es6/index.js
@@ -0,0 +1,72 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+ var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+ if ((a instanceof Map) && (b instanceof Map)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ for (i of a.entries())
+ if (!equal(i[1], b.get(i[0]))) return false;
+ return true;
+ }
+
+ if ((a instanceof Set) && (b instanceof Set)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ return true;
+ }
+
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (a[i] !== b[i]) return false;
+ return true;
+ }
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/es6/react.d.ts b/node_modules/har-validator/node_modules/fast-deep-equal/es6/react.d.ts
new file mode 100644
index 0000000000000..c7eb9c79694cc
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/es6/react.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/es6/react.js b/node_modules/har-validator/node_modules/fast-deep-equal/es6/react.js
new file mode 100644
index 0000000000000..98e2f9b71aa8b
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/es6/react.js
@@ -0,0 +1,79 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+ var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+ if ((a instanceof Map) && (b instanceof Map)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ for (i of a.entries())
+ if (!equal(i[1], b.get(i[0]))) return false;
+ return true;
+ }
+
+ if ((a instanceof Set) && (b instanceof Set)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ return true;
+ }
+
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (a[i] !== b[i]) return false;
+ return true;
+ }
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (key === '_owner' && a.$$typeof) {
+ // React-specific: avoid traversing React elements' _owner.
+ // _owner contains circular references
+ // and is not needed when comparing the actual elements (and not their owners)
+ continue;
+ }
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/index.d.ts b/node_modules/har-validator/node_modules/fast-deep-equal/index.d.ts
new file mode 100644
index 0000000000000..3c042caa7d591
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/index.d.ts
@@ -0,0 +1,4 @@
+declare module 'fast-deep-equal' {
+ const equal: (a: any, b: any) => boolean;
+ export = equal;
+}
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/index.js b/node_modules/har-validator/node_modules/fast-deep-equal/index.js
new file mode 100644
index 0000000000000..30dd1ba78cb49
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/index.js
@@ -0,0 +1,46 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/package.json b/node_modules/har-validator/node_modules/fast-deep-equal/package.json
new file mode 100644
index 0000000000000..1599876c0eda0
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/package.json
@@ -0,0 +1,88 @@
+{
+ "_from": "fast-deep-equal@^3.1.1",
+ "_id": "fast-deep-equal@3.1.3",
+ "_inBundle": false,
+ "_integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "_location": "/har-validator/fast-deep-equal",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "fast-deep-equal@^3.1.1",
+ "name": "fast-deep-equal",
+ "escapedName": "fast-deep-equal",
+ "rawSpec": "^3.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^3.1.1"
+ },
+ "_requiredBy": [
+ "/har-validator/ajv"
+ ],
+ "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "_shasum": "3a7d56b559d6cbc3eb512325244e619a65c6c525",
+ "_spec": "fast-deep-equal@^3.1.1",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli/node_modules/har-validator/node_modules/ajv",
+ "author": {
+ "name": "Evgeny Poberezkin"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/fast-deep-equal/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Fast deep equal",
+ "devDependencies": {
+ "coveralls": "^3.1.0",
+ "dot": "^1.1.2",
+ "eslint": "^7.2.0",
+ "mocha": "^7.2.0",
+ "nyc": "^15.1.0",
+ "pre-commit": "^1.2.2",
+ "react": "^16.12.0",
+ "react-test-renderer": "^16.12.0",
+ "sinon": "^9.0.2",
+ "typescript": "^3.9.5"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "react.js",
+ "react.d.ts",
+ "es6/"
+ ],
+ "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme",
+ "keywords": [
+ "fast",
+ "equal",
+ "deep-equal"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "fast-deep-equal",
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/fast-deep-equal.git"
+ },
+ "scripts": {
+ "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./",
+ "build": "node build",
+ "eslint": "eslint *.js benchmark/*.js spec/*.js",
+ "prepublish": "npm run build",
+ "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov",
+ "test-cov": "nyc npm run test-spec",
+ "test-spec": "mocha spec/*.spec.js -R spec",
+ "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts"
+ },
+ "types": "index.d.ts",
+ "version": "3.1.3"
+}
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/react.d.ts b/node_modules/har-validator/node_modules/fast-deep-equal/react.d.ts
new file mode 100644
index 0000000000000..c7eb9c79694cc
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/react.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/har-validator/node_modules/fast-deep-equal/react.js b/node_modules/har-validator/node_modules/fast-deep-equal/react.js
new file mode 100644
index 0000000000000..3489b9833f380
--- /dev/null
+++ b/node_modules/har-validator/node_modules/fast-deep-equal/react.js
@@ -0,0 +1,53 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (key === '_owner' && a.$$typeof) {
+ // React-specific: avoid traversing React elements' _owner.
+ // _owner contains circular references
+ // and is not needed when comparing the actual elements (and not their owners)
+ continue;
+ }
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/har-validator/node_modules/json-schema-traverse/.eslintrc.yml b/node_modules/har-validator/node_modules/json-schema-traverse/.eslintrc.yml
new file mode 100644
index 0000000000000..ab1762da9c119
--- /dev/null
+++ b/node_modules/har-validator/node_modules/json-schema-traverse/.eslintrc.yml
@@ -0,0 +1,27 @@
+extends: eslint:recommended
+env:
+ node: true
+ browser: true
+rules:
+ block-scoped-var: 2
+ complexity: [2, 13]
+ curly: [2, multi-or-nest, consistent]
+ dot-location: [2, property]
+ dot-notation: 2
+ indent: [2, 2, SwitchCase: 1]
+ linebreak-style: [2, unix]
+ new-cap: 2
+ no-console: [2, allow: [warn, error]]
+ no-else-return: 2
+ no-eq-null: 2
+ no-fallthrough: 2
+ no-invalid-this: 2
+ no-return-assign: 2
+ no-shadow: 1
+ no-trailing-spaces: 2
+ no-use-before-define: [2, nofunc]
+ quotes: [2, single, avoid-escape]
+ semi: [2, always]
+ strict: [2, global]
+ valid-jsdoc: [2, requireReturn: false]
+ no-control-regex: 0
diff --git a/node_modules/har-validator/node_modules/json-schema-traverse/.travis.yml b/node_modules/har-validator/node_modules/json-schema-traverse/.travis.yml
new file mode 100644
index 0000000000000..7ddce74b84199
--- /dev/null
+++ b/node_modules/har-validator/node_modules/json-schema-traverse/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "4"
+ - "6"
+ - "7"
+ - "8"
+after_script:
+ - coveralls < coverage/lcov.info
diff --git a/node_modules/har-validator/node_modules/json-schema-traverse/LICENSE b/node_modules/har-validator/node_modules/json-schema-traverse/LICENSE
new file mode 100644
index 0000000000000..7f1543566f6ab
--- /dev/null
+++ b/node_modules/har-validator/node_modules/json-schema-traverse/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 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/har-validator/node_modules/json-schema-traverse/README.md b/node_modules/har-validator/node_modules/json-schema-traverse/README.md
new file mode 100644
index 0000000000000..d5ccaf450a2a2
--- /dev/null
+++ b/node_modules/har-validator/node_modules/json-schema-traverse/README.md
@@ -0,0 +1,83 @@
+# json-schema-traverse
+Traverse JSON Schema passing each schema object to callback
+
+[](https://travis-ci.org/epoberezkin/json-schema-traverse)
+[](https://www.npmjs.com/package/json-schema-traverse)
+[](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)
+
+
+## Install
+
+```
+npm install json-schema-traverse
+```
+
+
+## Usage
+
+```javascript
+const traverse = require('json-schema-traverse');
+const schema = {
+ properties: {
+ foo: {type: 'string'},
+ bar: {type: 'integer'}
+ }
+};
+
+traverse(schema, {cb});
+// cb is called 3 times with:
+// 1. root schema
+// 2. {type: 'string'}
+// 3. {type: 'integer'}
+
+// Or:
+
+traverse(schema, {cb: {pre, post}});
+// pre is called 3 times with:
+// 1. root schema
+// 2. {type: 'string'}
+// 3. {type: 'integer'}
+//
+// post is called 3 times with:
+// 1. {type: 'string'}
+// 2. {type: 'integer'}
+// 3. root schema
+
+```
+
+Callback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed.
+
+Callback is passed these parameters:
+
+- _schema_: the current schema object
+- _JSON pointer_: from the root schema to the current schema object
+- _root schema_: the schema passed to `traverse` object
+- _parent JSON pointer_: from the root schema to the parent schema object (see below)
+- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)
+- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema
+- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`
+
+
+## Traverse objects in all unknown keywords
+
+```javascript
+const traverse = require('json-schema-traverse');
+const schema = {
+ mySchema: {
+ minimum: 1,
+ maximum: 2
+ }
+};
+
+traverse(schema, {allKeys: true, cb});
+// cb is called 2 times with:
+// 1. root schema
+// 2. mySchema
+```
+
+Without option `allKeys: true` callback will be called only with root schema.
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)
diff --git a/node_modules/har-validator/node_modules/json-schema-traverse/index.js b/node_modules/har-validator/node_modules/json-schema-traverse/index.js
new file mode 100644
index 0000000000000..d4a18dfc7b1c5
--- /dev/null
+++ b/node_modules/har-validator/node_modules/json-schema-traverse/index.js
@@ -0,0 +1,89 @@
+'use strict';
+
+var traverse = module.exports = function (schema, opts, cb) {
+ // Legacy support for v0.3.1 and earlier.
+ if (typeof opts == 'function') {
+ cb = opts;
+ opts = {};
+ }
+
+ cb = opts.cb || cb;
+ var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};
+ var post = cb.post || function() {};
+
+ _traverse(opts, pre, post, schema, '', schema);
+};
+
+
+traverse.keywords = {
+ additionalItems: true,
+ items: true,
+ contains: true,
+ additionalProperties: true,
+ propertyNames: true,
+ not: true
+};
+
+traverse.arrayKeywords = {
+ items: true,
+ allOf: true,
+ anyOf: true,
+ oneOf: true
+};
+
+traverse.propsKeywords = {
+ definitions: true,
+ properties: true,
+ patternProperties: true,
+ dependencies: true
+};
+
+traverse.skipKeywords = {
+ default: true,
+ enum: true,
+ const: true,
+ required: true,
+ maximum: true,
+ minimum: true,
+ exclusiveMaximum: true,
+ exclusiveMinimum: true,
+ multipleOf: true,
+ maxLength: true,
+ minLength: true,
+ pattern: true,
+ format: true,
+ maxItems: true,
+ minItems: true,
+ uniqueItems: true,
+ maxProperties: true,
+ minProperties: true
+};
+
+
+function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
+ pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
+ for (var key in schema) {
+ var sch = schema[key];
+ if (Array.isArray(sch)) {
+ if (key in traverse.arrayKeywords) {
+ for (var i=0; i=4"
+ "node": ">=6"
},
"files": [
"lib"
],
- "homepage": "https://github.com/ahmadnassri/har-validator",
+ "homepage": "https://github.com/ahmadnassri/node-har-validator",
"keywords": [
"har",
"cli",
@@ -58,18 +61,17 @@
"validate",
"validator"
],
- "license": "ISC",
+ "license": "MIT",
"main": "lib/promise.js",
"name": "har-validator",
"repository": {
"type": "git",
- "url": "git+https://github.com/ahmadnassri/har-validator.git"
+ "url": "git+https://github.com/ahmadnassri/node-har-validator.git"
},
"scripts": {
- "coverage": "tap test --reporter silent --coverage",
- "lint": "standard && echint",
- "pretest": "npm run lint",
- "test": "tap test"
+ "lint": "npx run-p lint:*",
+ "test": "tap test --no-coverage",
+ "test:coverage": "tap test --coverage-report=lcov --no-browser"
},
- "version": "5.1.0"
+ "version": "5.1.5"
}
diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md
index 479f24b6414eb..6987fb4aebb57 100644
--- a/node_modules/hosted-git-info/CHANGELOG.md
+++ b/node_modules/hosted-git-info/CHANGELOG.md
@@ -2,6 +2,42 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [2.8.9](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9) (2021-04-07)
+
+
+### Bug Fixes
+
+* backport regex fix from [#76](https://github.com/npm/hosted-git-info/issues/76) ([29adfe5](https://github.com/npm/hosted-git-info/commit/29adfe5)), closes [#84](https://github.com/npm/hosted-git-info/issues/84)
+
+
+
+
+## [2.8.8](https://github.com/npm/hosted-git-info/compare/v2.8.7...v2.8.8) (2020-02-29)
+
+
+### Bug Fixes
+
+* [#61](https://github.com/npm/hosted-git-info/issues/61) & [#65](https://github.com/npm/hosted-git-info/issues/65) addressing issues w/ url.URL implmentation which regressed node 6 support ([5038b18](https://github.com/npm/hosted-git-info/commit/5038b18)), closes [#66](https://github.com/npm/hosted-git-info/issues/66)
+
+
+
+
+## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26)
+
+
+### Bug Fixes
+
+* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62)
+* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60)
+
+
+
+
+## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25)
+
+
+
## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07)
diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js
index fc959cb0434c8..0885772256362 100644
--- a/node_modules/hosted-git-info/index.js
+++ b/node_modules/hosted-git-info/index.js
@@ -41,13 +41,13 @@ function fromUrl (giturl, opts) {
isGitHubShorthand(giturl) ? 'github:' + giturl : giturl
)
var parsed = parseGitUrl(url)
- var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)'))
+ var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/)
var matches = Object.keys(gitHosts).map(function (gitHostName) {
try {
var gitHostInfo = gitHosts[gitHostName]
var auth = null
if (parsed.auth && authProtocols[parsed.protocol]) {
- auth = decodeURIComponent(parsed.auth)
+ auth = parsed.auth
}
var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
var user = null
@@ -55,7 +55,7 @@ function fromUrl (giturl, opts) {
var defaultRepresentation = null
if (shortcutMatch && shortcutMatch[1] === gitHostName) {
user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2])
- project = decodeURIComponent(shortcutMatch[3])
+ project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, ''))
defaultRepresentation = 'shortcut'
} else {
if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return
@@ -106,7 +106,30 @@ function fixupUnqualifiedGist (giturl) {
function parseGitUrl (giturl) {
var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
- if (!matched) return url.parse(giturl)
+ if (!matched) {
+ var legacy = url.parse(giturl)
+ // If we don't have url.URL, then sorry, this is just not fixable.
+ // This affects Node <= 6.12.
+ if (legacy.auth && typeof url.URL === 'function') {
+ // git urls can be in the form of scp-style/ssh-connect strings, like
+ // git+ssh://user@host.com:some/path, which the legacy url parser
+ // supports, but WhatWG url.URL class does not. However, the legacy
+ // parser de-urlencodes the username and password, so something like
+ // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes
+ // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong.
+ // Pull off just the auth and host, so we dont' get the confusing
+ // scp-style URL, then pass that to the WhatWG parser to get the
+ // auth properly escaped.
+ var authmatch = giturl.match(/[^@]+@[^:/]+/)
+ /* istanbul ignore else - this should be impossible */
+ if (authmatch) {
+ var whatwg = new url.URL(authmatch[0])
+ legacy.auth = whatwg.username || ''
+ if (whatwg.password) legacy.auth += ':' + whatwg.password
+ }
+ }
+ return legacy
+ }
return {
protocol: 'git+ssh:',
slashes: true,
diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json
index 458b323a40518..d85189b536cec 100644
--- a/node_modules/hosted-git-info/package.json
+++ b/node_modules/hosted-git-info/package.json
@@ -1,19 +1,19 @@
{
- "_from": "hosted-git-info@2.8.5",
- "_id": "hosted-git-info@2.8.5",
+ "_from": "hosted-git-info@2.8.9",
+ "_id": "hosted-git-info@2.8.9",
"_inBundle": false,
- "_integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==",
+ "_integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"_location": "/hosted-git-info",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "hosted-git-info@2.8.5",
+ "raw": "hosted-git-info@2.8.9",
"name": "hosted-git-info",
"escapedName": "hosted-git-info",
- "rawSpec": "2.8.5",
+ "rawSpec": "2.8.9",
"saveSpec": null,
- "fetchSpec": "2.8.5"
+ "fetchSpec": "2.8.9"
},
"_requiredBy": [
"#USER",
@@ -21,10 +21,10 @@
"/normalize-package-data",
"/npm-package-arg"
],
- "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz",
- "_shasum": "759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c",
- "_spec": "hosted-git-info@2.8.5",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+ "_shasum": "dffc0bf9a21c02209090f2aa69429e1414daf3f9",
+ "_spec": "hosted-git-info@2.8.9",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/legacy",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -62,11 +62,11 @@
},
"scripts": {
"postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags",
+ "posttest": "standard",
"prerelease": "npm t",
- "pretest": "standard",
"release": "standard-version -s",
- "test": "tap -J --100 --no-esm test/*.js",
- "test:coverage": "tap --coverage-report=html -J --100 --no-esm test/*.js"
+ "test": "tap -J --coverage=90 --no-esm test/*.js",
+ "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js"
},
- "version": "2.8.5"
+ "version": "2.8.9"
}
diff --git a/node_modules/html-escaper/LICENSE.txt b/node_modules/html-escaper/LICENSE.txt
new file mode 100644
index 0000000000000..dcfa0aebdc54c
--- /dev/null
+++ b/node_modules/html-escaper/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection
+
+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/html-escaper/README.md b/node_modules/html-escaper/README.md
new file mode 100644
index 0000000000000..3dca3412f019b
--- /dev/null
+++ b/node_modules/html-escaper/README.md
@@ -0,0 +1,97 @@
+# html-escaper [](https://travis-ci.org/WebReflection/html-escaper) [](https://coveralls.io/github/WebReflection/html-escaper?branch=master)
+A simple module to escape/unescape common problematic entities.
+
+
+### How
+This package is available in npm so `npm install html-escaper` is all you need to do, using eventually the global flag too.
+
+Once the module is present
+```js
+var html = require('html-escaper');
+
+// two basic methods
+html.escape('string');
+html.unescape('escaped string');
+```
+
+
+### Why
+there is basically one rule only: do not **ever** replace one char after another if you are transforming a string into another.
+
+```js
+// WARNING: THIS IS WRONG
+// if you are that kind of dev that does this
+function escape(s) {
+ return s.replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(/'/g, "'")
+ .replace(/"/g, """);
+}
+
+// you might be the same dev that does this too
+function unescape(s) {
+ return s.replace(/&/g, "&")
+ .replace(/</g, "<")
+ .replace(/>/g, ">")
+ .replace(/'/g, "'")
+ .replace(/"/g, '"');
+}
+
+// guess what we have here ?
+unescape('<');
+
+// now guess this XSS too ...
+unescape('<script>alert("yo")</script>');
+
+
+```
+
+The last example will produce `` instead of the expected `<script>alert("yo")</script>`.
+
+Nothing like this could possibly happen if we grab all chars at once and either ways.
+It's just a fortunate case that after swapping `&` with `&` no other replace will be affected, but it's not portable and universally a bad practice.
+
+Grab all chars at once, no excuses!
+
+
+
+**more details**
+As somebody might think it's an `unescape` issue only, it's not. Being an anti-pattern with side effects works both ways.
+
+As example, changing the order of the replacement in escaping would produce the unexpected:
+```js
+function escape(s) {
+ return s.replace(//g, ">")
+ .replace(/'/g, "'")
+ .replace(/"/g, """)
+ .replace(/&/g, "&");
+}
+
+escape('<'); // < instead of <
+```
+If we do not want to code with the fear that the order wasn't perfect or that our order in either escaping or unescaping is different from the order another method or function used, if we understand the issue and we agree it's potentially a disaster prone approach, if we add the fact in this case creating 4 RegExp objects each time and invoking 4 times `.replace` trough the `String.prototype` is also potentially slower than creating one function only holding one object, or holding the function too, we should agree there is not absolutely any valid reason to keep proposing a char-by-char implementation.
+
+We have proofs this approach can fail already so ... why should we risk? Just avoid and grab all chars at once or simply use this tiny utility.
+
+### Backtick
+Internt explorer < 9 has [some backtick issue](https://html5sec.org/#102)
+
+For compatibility sake with common server-side HTML entities encoders and decoders, and in order to have the most reliable I/O, this little utility will NOT fix this IE < 9 problem.
+
+It is also important to note that if we create valid HTML and we set attributes at runtime through this utility, backticks in strings cannot possibly affect attribute behaviors.
+
+```js
+var img = new Image();
+img.src = html.escape(
+ 'x` `"` `'
+);
+// it won't cause problems even in IE < 9
+```
+
+**However**, if you use `innerHTML` and you target IE < 9 then [this **might** be a problem](https://github.com/nette/nette/issues/1496).
+
+Accordingly, if you need more chars and/or backticks to be escaped and unescaped, feel free to use alternatives like [lodash](https://github.com/lodash/lodash) or [he](https://www.npmjs.com/package/he)
+
+Here a bit more of [my POV](https://github.com/WebReflection/html-escaper/commit/52d554fc6e8583b6ffdd357967cf71962fc07cf6#commitcomment-10625122) and why I haven't implemented same thing alternatives did. Good news: those are alternatives ;-)
\ No newline at end of file
diff --git a/node_modules/html-escaper/cjs/index.js b/node_modules/html-escaper/cjs/index.js
new file mode 100644
index 0000000000000..164a34cb6fd4f
--- /dev/null
+++ b/node_modules/html-escaper/cjs/index.js
@@ -0,0 +1,65 @@
+'use strict';
+/**
+ * Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection
+ *
+ * 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.
+ */
+
+var replace = ''.replace;
+
+var ca = /[&<>'"]/g;
+var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
+
+var esca = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ "'": ''',
+ '"': '"'
+};
+var unes = {
+ '&': '&',
+ '&': '&',
+ '<': '<',
+ '<': '<',
+ '>': '>',
+ '>': '>',
+ ''': "'",
+ ''': "'",
+ '"': '"',
+ '"': '"'
+};
+
+function escape(es) {
+ return replace.call(es, ca, pe);
+}
+exports.escape = escape;
+
+function unescape(un) {
+ return replace.call(un, es, cape);
+}
+exports.unescape = unescape;
+
+function pe(m) {
+ return esca[m];
+}
+
+function cape(m) {
+ return unes[m];
+}
diff --git a/node_modules/html-escaper/cjs/package.json b/node_modules/html-escaper/cjs/package.json
new file mode 100644
index 0000000000000..0292b9956f2e4
--- /dev/null
+++ b/node_modules/html-escaper/cjs/package.json
@@ -0,0 +1 @@
+{"type":"commonjs"}
\ No newline at end of file
diff --git a/node_modules/html-escaper/esm/index.js b/node_modules/html-escaper/esm/index.js
new file mode 100644
index 0000000000000..e05b93f6a1760
--- /dev/null
+++ b/node_modules/html-escaper/esm/index.js
@@ -0,0 +1,62 @@
+/**
+ * Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection
+ *
+ * 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.
+ */
+
+var replace = ''.replace;
+
+var ca = /[&<>'"]/g;
+var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
+
+var esca = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ "'": ''',
+ '"': '"'
+};
+var unes = {
+ '&': '&',
+ '&': '&',
+ '<': '<',
+ '<': '<',
+ '>': '>',
+ '>': '>',
+ ''': "'",
+ ''': "'",
+ '"': '"',
+ '"': '"'
+};
+
+export function escape(es) {
+ return replace.call(es, ca, pe);
+};
+
+export function unescape(un) {
+ return replace.call(un, es, cape);
+};
+
+function pe(m) {
+ return esca[m];
+}
+
+function cape(m) {
+ return unes[m];
+}
diff --git a/node_modules/html-escaper/index.js b/node_modules/html-escaper/index.js
new file mode 100644
index 0000000000000..6c3f2ab4dfea3
--- /dev/null
+++ b/node_modules/html-escaper/index.js
@@ -0,0 +1,70 @@
+var html = (function (exports) {
+ 'use strict';
+
+ /**
+ * Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection
+ *
+ * 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.
+ */
+
+ var replace = ''.replace;
+
+ var ca = /[&<>'"]/g;
+ var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
+
+ var esca = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ "'": ''',
+ '"': '"'
+ };
+ var unes = {
+ '&': '&',
+ '&': '&',
+ '<': '<',
+ '<': '<',
+ '>': '>',
+ '>': '>',
+ ''': "'",
+ ''': "'",
+ '"': '"',
+ '"': '"'
+ };
+
+ function escape(es) {
+ return replace.call(es, ca, pe);
+ }
+ function unescape(un) {
+ return replace.call(un, es, cape);
+ }
+ function pe(m) {
+ return esca[m];
+ }
+
+ function cape(m) {
+ return unes[m];
+ }
+
+ exports.escape = escape;
+ exports.unescape = unescape;
+
+ return exports;
+
+}({}));
diff --git a/node_modules/html-escaper/min.js b/node_modules/html-escaper/min.js
new file mode 100644
index 0000000000000..54d0c2356b834
--- /dev/null
+++ b/node_modules/html-escaper/min.js
@@ -0,0 +1 @@
+var html=function(t){"use strict";var n="".replace,u=/[&<>'"]/g,r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,a={"&":"&","<":"<",">":">","'":"'",'"':"""},e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'};function c(t){return a[t]}function o(t){return e[t]}return t.escape=function(t){return n.call(t,u,c)},t.unescape=function(t){return n.call(t,r,o)},t}({});
\ No newline at end of file
diff --git a/node_modules/html-escaper/package.json b/node_modules/html-escaper/package.json
new file mode 100644
index 0000000000000..15e3a466e5e5f
--- /dev/null
+++ b/node_modules/html-escaper/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "html-escaper@^2.0.0",
+ "_id": "html-escaper@2.0.2",
+ "_inBundle": false,
+ "_integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
+ "_location": "/html-escaper",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "html-escaper@^2.0.0",
+ "name": "html-escaper",
+ "escapedName": "html-escaper",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/istanbul-reports"
+ ],
+ "_resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
+ "_shasum": "dfd60027da36a36dfcbe236262c00a5822681453",
+ "_spec": "html-escaper@^2.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/istanbul-reports",
+ "author": {
+ "name": "Andrea Giammarchi"
+ },
+ "bugs": {
+ "url": "https://github.com/WebReflection/html-escaper/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "fast and safe way to escape and unescape &<>'\" chars",
+ "devDependencies": {
+ "ascjs": "^3.1.2",
+ "coveralls": "^3.0.11",
+ "istanbul": "^0.4.5",
+ "rollup": "^2.1.0",
+ "uglify-js": "^3.8.0"
+ },
+ "homepage": "https://github.com/WebReflection/html-escaper",
+ "keywords": [
+ "html",
+ "escape",
+ "encode",
+ "unescape",
+ "decode",
+ "entities"
+ ],
+ "license": "MIT",
+ "main": "./cjs/index.js",
+ "module": "./esm/index.js",
+ "name": "html-escaper",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/WebReflection/html-escaper.git"
+ },
+ "scripts": {
+ "build": "npm run cjs && npm run rollup && npm run minify && npm test && npm run size",
+ "cjs": "ascjs esm cjs",
+ "coveralls": "cat ./coverage/lcov.info | coveralls",
+ "minify": "uglifyjs index.js --comments=/^!/ --compress --mangle -o min.js",
+ "rollup": "rollup --config rollup.config.js",
+ "size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c min.js | wc -c",
+ "test": "istanbul cover ./test/index.js"
+ },
+ "unpkg": "min.js",
+ "version": "2.0.2"
+}
diff --git a/node_modules/html-escaper/test/index.js b/node_modules/html-escaper/test/index.js
new file mode 100644
index 0000000000000..0eb00dee48636
--- /dev/null
+++ b/node_modules/html-escaper/test/index.js
@@ -0,0 +1,23 @@
+delete Object.freeze;
+
+var html = require('../cjs');
+
+console.assert(
+ html.escape('&<>\'"') === '&<>'"',
+ 'correct escape'
+);
+
+console.assert(
+ html.escape('<>\'"&') === '<>'"&',
+ 'correct inverted escape'
+);
+
+console.assert(
+ '&<>\'"' === html.unescape('&<>'"'),
+ 'correct unescape'
+);
+
+console.assert(
+ '<>\'"&' === html.unescape('<>'"&'),
+ 'correct inverted unescape'
+);
diff --git a/node_modules/html-escaper/test/package.json b/node_modules/html-escaper/test/package.json
new file mode 100644
index 0000000000000..0292b9956f2e4
--- /dev/null
+++ b/node_modules/html-escaper/test/package.json
@@ -0,0 +1 @@
+{"type":"commonjs"}
\ No newline at end of file
diff --git a/node_modules/ini/ini.js b/node_modules/ini/ini.js
index 590195dd31478..b576f08d7a6bb 100644
--- a/node_modules/ini/ini.js
+++ b/node_modules/ini/ini.js
@@ -15,7 +15,7 @@ function encode (obj, opt) {
if (typeof opt === 'string') {
opt = {
section: opt,
- whitespace: false
+ whitespace: false,
}
} else {
opt = opt || {}
@@ -30,27 +30,25 @@ function encode (obj, opt) {
val.forEach(function (item) {
out += safe(k + '[]') + separator + safe(item) + '\n'
})
- } else if (val && typeof val === 'object') {
+ } else if (val && typeof val === 'object')
children.push(k)
- } else {
+ else
out += safe(k) + separator + safe(val) + eol
- }
})
- if (opt.section && out.length) {
+ if (opt.section && out.length)
out = '[' + safe(opt.section) + ']' + eol + out
- }
children.forEach(function (k, _, __) {
var nk = dotSplit(k).join('\\.')
var section = (opt.section ? opt.section + '.' : '') + nk
var child = encode(obj[k], {
section: section,
- whitespace: opt.whitespace
+ whitespace: opt.whitespace,
})
- if (out.length && child.length) {
+ if (out.length && child.length)
out += eol
- }
+
out += child
})
@@ -62,7 +60,7 @@ function dotSplit (str) {
.replace(/\\\./g, '\u0001')
.split(/\./).map(function (part) {
return part.replace(/\1/g, '\\.')
- .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
+ .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
})
}
@@ -75,15 +73,25 @@ function decode (str) {
var lines = str.split(/[\r\n]+/g)
lines.forEach(function (line, _, __) {
- if (!line || line.match(/^\s*[;#]/)) return
+ if (!line || line.match(/^\s*[;#]/))
+ return
var match = line.match(re)
- if (!match) return
+ if (!match)
+ return
if (match[1] !== undefined) {
section = unsafe(match[1])
+ if (section === '__proto__') {
+ // not allowed
+ // keep parsing the section, but don't attach it.
+ p = {}
+ return
+ }
p = out[section] = out[section] || {}
return
}
var key = unsafe(match[2])
+ if (key === '__proto__')
+ return
var value = match[3] ? unsafe(match[4]) : true
switch (value) {
case 'true':
@@ -94,20 +102,20 @@ function decode (str) {
// Convert keys with '[]' suffix to an array
if (key.length > 2 && key.slice(-2) === '[]') {
key = key.substring(0, key.length - 2)
- if (!p[key]) {
+ if (key === '__proto__')
+ return
+ if (!p[key])
p[key] = []
- } else if (!Array.isArray(p[key])) {
+ else if (!Array.isArray(p[key]))
p[key] = [p[key]]
- }
}
// safeguard against resetting a previously defined
// array by accidentally forgetting the brackets
- if (Array.isArray(p[key])) {
+ if (Array.isArray(p[key]))
p[key].push(value)
- } else {
+ else
p[key] = value
- }
})
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
@@ -115,9 +123,9 @@ function decode (str) {
Object.keys(out).filter(function (k, _, __) {
if (!out[k] ||
typeof out[k] !== 'object' ||
- Array.isArray(out[k])) {
+ Array.isArray(out[k]))
return false
- }
+
// see if the parent section is also an object.
// if so, add it to that, and mark this one for deletion
var parts = dotSplit(k)
@@ -125,12 +133,15 @@ function decode (str) {
var l = parts.pop()
var nl = l.replace(/\\\./g, '.')
parts.forEach(function (part, _, __) {
- if (!p[part] || typeof p[part] !== 'object') p[part] = {}
+ if (part === '__proto__')
+ return
+ if (!p[part] || typeof p[part] !== 'object')
+ p[part] = {}
p = p[part]
})
- if (p === out && nl === l) {
+ if (p === out && nl === l)
return false
- }
+
p[nl] = out[k]
return true
}).forEach(function (del, _, __) {
@@ -152,18 +163,20 @@ function safe (val) {
(val.length > 1 &&
isQuoted(val)) ||
val !== val.trim())
- ? JSON.stringify(val)
- : val.replace(/;/g, '\\;').replace(/#/g, '\\#')
+ ? JSON.stringify(val)
+ : val.replace(/;/g, '\\;').replace(/#/g, '\\#')
}
function unsafe (val, doUnesc) {
val = (val || '').trim()
if (isQuoted(val)) {
// remove the single quotes before calling JSON.parse
- if (val.charAt(0) === "'") {
+ if (val.charAt(0) === "'")
val = val.substr(1, val.length - 2)
- }
- try { val = JSON.parse(val) } catch (_) {}
+
+ try {
+ val = JSON.parse(val)
+ } catch (_) {}
} else {
// walk the val to find the first not-escaped ; character
var esc = false
@@ -171,23 +184,22 @@ function unsafe (val, doUnesc) {
for (var i = 0, l = val.length; i < l; i++) {
var c = val.charAt(i)
if (esc) {
- if ('\\;#'.indexOf(c) !== -1) {
+ if ('\\;#'.indexOf(c) !== -1)
unesc += c
- } else {
+ else
unesc += '\\' + c
- }
+
esc = false
- } else if (';#'.indexOf(c) !== -1) {
+ } else if (';#'.indexOf(c) !== -1)
break
- } else if (c === '\\') {
+ else if (c === '\\')
esc = true
- } else {
+ else
unesc += c
- }
}
- if (esc) {
+ if (esc)
unesc += '\\'
- }
+
return unesc.trim()
}
return val
diff --git a/node_modules/ini/package.json b/node_modules/ini/package.json
index e2d4423dcf76d..80ec6c26a95a2 100644
--- a/node_modules/ini/package.json
+++ b/node_modules/ini/package.json
@@ -1,35 +1,33 @@
{
- "_args": [
- [
- "ini@1.3.5",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "ini@1.3.5",
- "_id": "ini@1.3.5",
+ "_from": "ini@1.3.8",
+ "_id": "ini@1.3.8",
"_inBundle": false,
- "_integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
+ "_integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
"_location": "/ini",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "ini@1.3.5",
+ "raw": "ini@1.3.8",
"name": "ini",
"escapedName": "ini",
- "rawSpec": "1.3.5",
+ "rawSpec": "1.3.8",
"saveSpec": null,
- "fetchSpec": "1.3.5"
+ "fetchSpec": "1.3.8"
},
"_requiredBy": [
+ "#USER",
"/",
"/config-chain",
"/global-dirs",
+ "/libcipm",
+ "/libnpmconfig",
"/rc"
],
- "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
- "_spec": "1.3.5",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "_shasum": "a29da425b48806f34767a4efce397269af28432c",
+ "_spec": "ini@1.3.8",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -38,14 +36,16 @@
"bugs": {
"url": "https://github.com/isaacs/ini/issues"
},
- "dependencies": {},
+ "bundleDependencies": false,
+ "deprecated": false,
"description": "An ini encoder/decoder for node",
"devDependencies": {
- "standard": "^10.0.3",
- "tap": "^10.7.3 || 11"
- },
- "engines": {
- "node": "*"
+ "eslint": "^7.9.0",
+ "eslint-plugin-import": "^2.22.0",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^4.2.1",
+ "eslint-plugin-standard": "^4.0.1",
+ "tap": "14"
},
"files": [
"ini.js"
@@ -59,11 +59,14 @@
"url": "git://github.com/isaacs/ini.git"
},
"scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
+ "eslint": "eslint",
+ "lint": "npm run eslint -- ini.js test/*.js",
+ "lintfix": "npm run lint -- --fix",
+ "posttest": "npm run lint",
"postversion": "npm publish",
- "pretest": "standard ini.js",
+ "prepublishOnly": "git push origin --follow-tags",
"preversion": "npm test",
- "test": "tap test/*.js --100 -J"
+ "test": "tap"
},
- "version": "1.3.5"
+ "version": "1.3.8"
}
diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js
deleted file mode 100644
index 27f9cbb8eaf28..0000000000000
--- a/node_modules/invert-kv/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-module.exports = object => {
- if (typeof object !== 'object') {
- throw new TypeError('Expected an object');
- }
-
- const ret = {};
-
- for (const key of Object.keys(object)) {
- const value = object[key];
- ret[value] = key;
- }
-
- return ret;
-};
diff --git a/node_modules/invert-kv/package.json b/node_modules/invert-kv/package.json
deleted file mode 100644
index beb77fa37f6fa..0000000000000
--- a/node_modules/invert-kv/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "_from": "invert-kv@^2.0.0",
- "_id": "invert-kv@2.0.0",
- "_inBundle": false,
- "_integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
- "_location": "/invert-kv",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "invert-kv@^2.0.0",
- "name": "invert-kv",
- "escapedName": "invert-kv",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/lcid"
- ],
- "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
- "_shasum": "7393f5afa59ec9ff5f67a27620d11c226e3eec02",
- "_spec": "invert-kv@^2.0.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/lcid",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/invert-kv/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Invert the key/value of an object. Example: `{foo: 'bar'}` โ `{bar: 'foo'}`",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/invert-kv#readme",
- "keywords": [
- "object",
- "key",
- "value",
- "kv",
- "invert"
- ],
- "license": "MIT",
- "name": "invert-kv",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/invert-kv.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "2.0.0"
-}
diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md
deleted file mode 100644
index 365a97997cac3..0000000000000
--- a/node_modules/invert-kv/readme.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# invert-kv [](https://travis-ci.org/sindresorhus/invert-kv)
-
-> Invert the key/value of an object. Example: `{foo: 'bar'}` โ `{bar: 'foo'}`
-
-
-## Install
-
-```
-$ npm install invert-kv
-```
-
-
-## Usage
-
-```js
-const invertKv = require('invert-kv');
-
-invertKv({foo: 'bar', unicorn: 'rainbow'});
-//=> {bar: 'foo', rainbow: 'unicorn'}
-```
-
-
-## License
-
-MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/is-ci/.travis.yml b/node_modules/is-ci/.travis.yml
deleted file mode 100644
index 21f721050948b..0000000000000
--- a/node_modules/is-ci/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: node_js
-node_js:
-- '6'
-- '5'
-- '4'
-- '0.12'
-- '0.10'
diff --git a/node_modules/is-ci/README.md b/node_modules/is-ci/README.md
index 0e49db91bbe4c..bc3840a220cfb 100644
--- a/node_modules/is-ci/README.md
+++ b/node_modules/is-ci/README.md
@@ -6,12 +6,13 @@ server.
Please [open an issue](https://github.com/watson/is-ci/issues) if your
CI server isn't properly detected :)
+[](https://www.npmjs.com/package/is-ci)
[](https://travis-ci.org/watson/is-ci)
[](https://github.com/feross/standard)
## Installation
-```
+```bash
npm install is-ci --save
```
@@ -36,34 +37,14 @@ There's a few ways to do that:
- Or provide the full path to the executable, e.g.
`./node_modules/.bin/is-ci`
-```
+```bash
is-ci && echo "This is a CI server"
```
## Supported CI tools
-Officially supported CI servers:
-
-- [Travis CI](http://travis-ci.org)
-- [CircleCI](http://circleci.com)
-- [Jenkins CI](https://jenkins-ci.org)
-- [Hudson](http://hudson-ci.org)
-- [Bamboo](https://www.atlassian.com/software/bamboo)
-- [TeamCity](https://www.jetbrains.com/teamcity/)
-- [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx)
-- [GitLab CI](https://about.gitlab.com/gitlab-ci/)
-- [Codeship](https://codeship.com)
-- [Drone.io](https://drone.io)
-- [Magnum CI](https://magnum-ci.com)
-- [Semaphore](https://semaphoreci.com)
-- [AppVeyor](http://www.appveyor.com)
-- [Buildkite](https://buildkite.com)
-- [TaskCluster](http://docs.taskcluster.net)
-- [GoCD](https://www.go.cd/)
-- [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines)
-
-Other CI tools using environment variables like `BUILD_ID` or `CI` would be detected as well.
+Refer to [ci-info](https://github.com/watson/ci-info#supported-ci-tools) docs for all supported CI's
## License
-MIT
+[MIT](LICENSE)
diff --git a/node_modules/is-ci/package.json b/node_modules/is-ci/package.json
index e87ba5d7fd903..344aa2a1f5952 100644
--- a/node_modules/is-ci/package.json
+++ b/node_modules/is-ci/package.json
@@ -1,8 +1,8 @@
{
"_from": "is-ci@^1.0.10",
- "_id": "is-ci@1.1.0",
+ "_id": "is-ci@1.2.1",
"_inBundle": false,
- "_integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==",
+ "_integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==",
"_location": "/is-ci",
"_phantomChildren": {},
"_requested": {
@@ -18,10 +18,10 @@
"_requiredBy": [
"/update-notifier"
],
- "_resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz",
- "_shasum": "247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5",
+ "_resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz",
+ "_shasum": "e3779c8ee17fccf428488f6e281187f2e632841c",
"_spec": "is-ci@^1.0.10",
- "_where": "/Users/rebecca/code/npm/node_modules/update-notifier",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/node_modules/update-notifier",
"author": {
"name": "Thomas Watson Steen",
"email": "w@tson.dk",
@@ -35,17 +35,17 @@
},
"bundleDependencies": false,
"coordinates": [
- 56.0093252,
- 11.9592058
+ 55.778255,
+ 12.593033
],
"dependencies": {
- "ci-info": "^1.0.0"
+ "ci-info": "^1.5.0"
},
"deprecated": false,
- "description": "Detect if your code is running on a CI server",
+ "description": "Detect if the current environment is a CI server",
"devDependencies": {
"clear-require": "^1.0.1",
- "standard": "^10.0.3"
+ "standard": "^11.0.1"
},
"homepage": "https://github.com/watson/is-ci",
"keywords": [
@@ -65,5 +65,5 @@
"scripts": {
"test": "standard && node test.js"
},
- "version": "1.1.0"
+ "version": "1.2.1"
}
diff --git a/node_modules/is-ci/test.js b/node_modules/is-ci/test.js
deleted file mode 100644
index a9938bbdb8ecf..0000000000000
--- a/node_modules/is-ci/test.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict'
-
-var assert = require('assert')
-var clearRequire = require('clear-require')
-
-process.env.CI = 'true'
-
-var isCI = require('./')
-assert(isCI)
-
-delete process.env.CI
-delete process.env.CONTINUOUS_INTEGRATION
-delete process.env.BUILD_NUMBER
-delete process.env.TRAVIS
-
-clearRequire('./')
-clearRequire('ci-info')
-isCI = require('./')
-assert(!isCI)
diff --git a/node_modules/is-retry-allowed/index.js b/node_modules/is-retry-allowed/index.js
index 663ee338fce94..3bab6c16b26b9 100644
--- a/node_modules/is-retry-allowed/index.js
+++ b/node_modules/is-retry-allowed/index.js
@@ -6,7 +6,9 @@ var WHITELIST = [
'EADDRINUSE',
'ESOCKETTIMEDOUT',
'ECONNREFUSED',
- 'EPIPE'
+ 'EPIPE',
+ 'EHOSTUNREACH',
+ 'EAI_AGAIN'
];
var BLACKLIST = [
diff --git a/node_modules/is-retry-allowed/package.json b/node_modules/is-retry-allowed/package.json
index e494bb3f7841a..7bae1606a740c 100644
--- a/node_modules/is-retry-allowed/package.json
+++ b/node_modules/is-retry-allowed/package.json
@@ -1,8 +1,8 @@
{
"_from": "is-retry-allowed@^1.0.0",
- "_id": "is-retry-allowed@1.1.0",
+ "_id": "is-retry-allowed@1.2.0",
"_inBundle": false,
- "_integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=",
+ "_integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==",
"_location": "/is-retry-allowed",
"_phantomChildren": {},
"_requested": {
@@ -18,10 +18,10 @@
"_requiredBy": [
"/got"
],
- "_resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
- "_shasum": "11a060568b67339444033d0125a61a20d564fb34",
+ "_resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz",
+ "_shasum": "d778488bd0a4666a3be8a1482b9f2baafedea8b4",
"_spec": "is-retry-allowed@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/got",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/node_modules/got",
"author": {
"name": "Vsevolod Strukchinsky",
"email": "floatdrop@gmail.com",
@@ -33,7 +33,7 @@
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
- "description": "My prime module",
+ "description": "Is retry allowed for Error?",
"devDependencies": {
"ava": "^0.8.0",
"xo": "^0.12.1"
@@ -55,5 +55,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "1.1.0"
+ "version": "1.2.0"
}
diff --git a/node_modules/jsprim/CONTRIBUTING.md b/node_modules/jsprim/CONTRIBUTING.md
deleted file mode 100644
index 750cef8dfd54a..0000000000000
--- a/node_modules/jsprim/CONTRIBUTING.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Contributing
-
-This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new
-changes. Anyone can submit changes. To get started, see the [cr.joyent.us user
-guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md).
-This repo does not use GitHub pull requests.
-
-See the [Joyent Engineering
-Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general
-best practices expected in this repository.
-
-Contributions should be "make prepush" clean. The "prepush" target runs the
-"check" target, which requires these separate tools:
-
-* https://github.com/davepacheco/jsstyle
-* https://github.com/davepacheco/javascriptlint
-
-If you're changing something non-trivial or user-facing, you may want to submit
-an issue first.
diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js
deleted file mode 100644
index b666ef00a4504..0000000000000
--- a/node_modules/lcid/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-const invertKv = require('invert-kv');
-const all = require('./lcid.json');
-
-const inverted = invertKv(all);
-
-exports.from = lcidCode => {
- if (typeof lcidCode !== 'number') {
- throw new TypeError('Expected a number');
- }
-
- return inverted[lcidCode];
-};
-
-exports.to = localeId => {
- if (typeof localeId !== 'string') {
- throw new TypeError('Expected a string');
- }
-
- return all[localeId];
-};
-
-exports.all = all;
diff --git a/node_modules/lcid/lcid.json b/node_modules/lcid/lcid.json
deleted file mode 100644
index 9c89f6a496548..0000000000000
--- a/node_modules/lcid/lcid.json
+++ /dev/null
@@ -1,203 +0,0 @@
-{
- "af_ZA": 1078,
- "am_ET": 1118,
- "ar_AE": 14337,
- "ar_BH": 15361,
- "ar_DZ": 5121,
- "ar_EG": 3073,
- "ar_IQ": 2049,
- "ar_JO": 11265,
- "ar_KW": 13313,
- "ar_LB": 12289,
- "ar_LY": 4097,
- "ar_MA": 6145,
- "ar_OM": 8193,
- "ar_QA": 16385,
- "ar_SA": 1025,
- "ar_SY": 10241,
- "ar_TN": 7169,
- "ar_YE": 9217,
- "arn_CL": 1146,
- "as_IN": 1101,
- "az_AZ": 2092,
- "ba_RU": 1133,
- "be_BY": 1059,
- "bg_BG": 1026,
- "bn_IN": 1093,
- "bo_BT": 2129,
- "bo_CN": 1105,
- "br_FR": 1150,
- "bs_BA": 8218,
- "ca_ES": 1027,
- "co_FR": 1155,
- "cs_CZ": 1029,
- "cy_GB": 1106,
- "da_DK": 1030,
- "de_AT": 3079,
- "de_CH": 2055,
- "de_DE": 1031,
- "de_LI": 5127,
- "de_LU": 4103,
- "div_MV": 1125,
- "dsb_DE": 2094,
- "el_GR": 1032,
- "en_AU": 3081,
- "en_BZ": 10249,
- "en_CA": 4105,
- "en_CB": 9225,
- "en_GB": 2057,
- "en_IE": 6153,
- "en_IN": 18441,
- "en_JA": 8201,
- "en_MY": 17417,
- "en_NZ": 5129,
- "en_PH": 13321,
- "en_TT": 11273,
- "en_US": 1033,
- "en_ZA": 7177,
- "en_ZW": 12297,
- "es_AR": 11274,
- "es_BO": 16394,
- "es_CL": 13322,
- "es_CO": 9226,
- "es_CR": 5130,
- "es_DO": 7178,
- "es_EC": 12298,
- "es_ES": 3082,
- "es_GT": 4106,
- "es_HN": 18442,
- "es_MX": 2058,
- "es_NI": 19466,
- "es_PA": 6154,
- "es_PE": 10250,
- "es_PR": 20490,
- "es_PY": 15370,
- "es_SV": 17418,
- "es_UR": 14346,
- "es_US": 21514,
- "es_VE": 8202,
- "et_EE": 1061,
- "eu_ES": 1069,
- "fa_IR": 1065,
- "fi_FI": 1035,
- "fil_PH": 1124,
- "fo_FO": 1080,
- "fr_BE": 2060,
- "fr_CA": 3084,
- "fr_CH": 4108,
- "fr_FR": 1036,
- "fr_LU": 5132,
- "fr_MC": 6156,
- "fy_NL": 1122,
- "ga_IE": 2108,
- "gbz_AF": 1164,
- "gl_ES": 1110,
- "gsw_FR": 1156,
- "gu_IN": 1095,
- "ha_NG": 1128,
- "he_IL": 1037,
- "hi_IN": 1081,
- "hr_BA": 4122,
- "hr_HR": 1050,
- "hu_HU": 1038,
- "hy_AM": 1067,
- "id_ID": 1057,
- "ii_CN": 1144,
- "is_IS": 1039,
- "it_CH": 2064,
- "it_IT": 1040,
- "iu_CA": 2141,
- "ja_JP": 1041,
- "ka_GE": 1079,
- "kh_KH": 1107,
- "kk_KZ": 1087,
- "kl_GL": 1135,
- "kn_IN": 1099,
- "ko_KR": 1042,
- "kok_IN": 1111,
- "ky_KG": 1088,
- "lb_LU": 1134,
- "lo_LA": 1108,
- "lt_LT": 1063,
- "lv_LV": 1062,
- "mi_NZ": 1153,
- "mk_MK": 1071,
- "ml_IN": 1100,
- "mn_CN": 2128,
- "mn_MN": 1104,
- "moh_CA": 1148,
- "mr_IN": 1102,
- "ms_BN": 2110,
- "ms_MY": 1086,
- "mt_MT": 1082,
- "my_MM": 1109,
- "nb_NO": 1044,
- "ne_NP": 1121,
- "nl_BE": 2067,
- "nl_NL": 1043,
- "nn_NO": 2068,
- "ns_ZA": 1132,
- "oc_FR": 1154,
- "or_IN": 1096,
- "pa_IN": 1094,
- "pl_PL": 1045,
- "ps_AF": 1123,
- "pt_BR": 1046,
- "pt_PT": 2070,
- "qut_GT": 1158,
- "quz_BO": 1131,
- "quz_EC": 2155,
- "quz_PE": 3179,
- "rm_CH": 1047,
- "ro_RO": 1048,
- "ru_RU": 1049,
- "rw_RW": 1159,
- "sa_IN": 1103,
- "sah_RU": 1157,
- "se_FI": 3131,
- "se_NO": 1083,
- "se_SE": 2107,
- "si_LK": 1115,
- "sk_SK": 1051,
- "sl_SI": 1060,
- "sma_NO": 6203,
- "sma_SE": 7227,
- "smj_NO": 4155,
- "smj_SE": 5179,
- "smn_FI": 9275,
- "sms_FI": 8251,
- "sq_AL": 1052,
- "sr_BA": 7194,
- "sr_SP": 3098,
- "sv_FI": 2077,
- "sv_SE": 1053,
- "sw_KE": 1089,
- "syr_SY": 1114,
- "ta_IN": 1097,
- "te_IN": 1098,
- "tg_TJ": 1064,
- "th_TH": 1054,
- "tk_TM": 1090,
- "tmz_DZ": 2143,
- "tn_ZA": 1074,
- "tr_TR": 1055,
- "tt_RU": 1092,
- "ug_CN": 1152,
- "uk_UA": 1058,
- "ur_IN": 2080,
- "ur_PK": 1056,
- "uz_UZ": 2115,
- "vi_VN": 1066,
- "wen_DE": 1070,
- "wo_SN": 1160,
- "xh_ZA": 1076,
- "yo_NG": 1130,
- "zh_CHS": 4,
- "zh_CHT": 31748,
- "zh_CN": 2052,
- "zh_HK": 3076,
- "zh_MO": 5124,
- "zh_SG": 4100,
- "zh_TW": 1028,
- "zu_ZA": 1077
-}
diff --git a/node_modules/lcid/package.json b/node_modules/lcid/package.json
deleted file mode 100644
index 3de023722441e..0000000000000
--- a/node_modules/lcid/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "_from": "lcid@^2.0.0",
- "_id": "lcid@2.0.0",
- "_inBundle": false,
- "_integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
- "_location": "/lcid",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "lcid@^2.0.0",
- "name": "lcid",
- "escapedName": "lcid",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/os-locale"
- ],
- "_resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
- "_shasum": "6ef5d2df60e52f82eb228a4c373e8d1f397253cf",
- "_spec": "lcid@^2.0.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/lcid/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "invert-kv": "^2.0.0"
- },
- "deprecated": false,
- "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=6"
- },
- "files": [
- "index.js",
- "lcid.json"
- ],
- "homepage": "https://github.com/sindresorhus/lcid#readme",
- "keywords": [
- "lcid",
- "locale",
- "string",
- "str",
- "id",
- "identifier",
- "windows",
- "language",
- "lang",
- "map",
- "mapping",
- "convert",
- "json",
- "bcp47",
- "ietf",
- "tag"
- ],
- "license": "MIT",
- "name": "lcid",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/lcid.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "2.0.0"
-}
diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md
deleted file mode 100644
index 2b1aa798b6930..0000000000000
--- a/node_modules/lcid/readme.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# lcid [](https://travis-ci.org/sindresorhus/lcid)
-
-> Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms)
-
-Based on the [mapping](https://github.com/python/cpython/blob/8f7bb100d0fa7fb2714f3953b5b627878277c7c6/Lib/locale.py#L1465-L1674) used in the Python standard library.
-
-The mapping itself is just a [JSON file](lcid.json) and can be used wherever.
-
-
-## Install
-
-```
-$ npm install lcid
-```
-
-
-## Usage
-
-```js
-const lcid = require('lcid');
-
-lcid.from(1044);
-//=> 'nb_NO'
-
-lcid.to('nb_NO');
-//=> 1044
-
-lcid.all;
-//=> {'af_ZA': 1078, ...}
-```
-
-
-## License
-
-MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/libcipm/CHANGELOG.md b/node_modules/libcipm/CHANGELOG.md
index 80411f300698c..985d6df39e5f7 100644
--- a/node_modules/libcipm/CHANGELOG.md
+++ b/node_modules/libcipm/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [4.0.8](https://github.com/npm/libcipm/compare/v4.0.7...v4.0.8) (2020-03-25)
+
+
+### Bug Fixes
+
+* add repo to bin pkg, bump to 2.0.1 ([ed2d735](https://github.com/npm/libcipm/commit/ed2d735))
+
+
+
## [4.0.7](https://github.com/npm/libcipm/compare/v4.0.4...v4.0.7) (2019-10-09)
diff --git a/node_modules/libcipm/README.md b/node_modules/libcipm/README.md
index 3dd9cbe149220..2316f0eaabf85 100644
--- a/node_modules/libcipm/README.md
+++ b/node_modules/libcipm/README.md
@@ -1,4 +1,9 @@
-[](https://npm.im/libcipm) [](https://npm.im/libcipm) [](https://travis-ci.org/npm/libcipm) [](https://ci.appveyor.com/project/npm/libcipm) [](https://coveralls.io/github/npm/libcipm?branch=latest)
+# Note: pending imminent deprecation
+
+**This module will be deprecated once npm v7 is released. Please do not rely
+on it more than absolutely necessary.**
+
+----
[`libcipm`](https://github.com/npm/libcipm) installs npm projects in a way that's
optimized for continuous integration/deployment/etc scenarios. It gives up
@@ -16,7 +21,6 @@ For documentation about the associated command-line tool, see
## Table of Contents
* [Features](#features)
-* [Contributing](#contributing)
* [API](#api)
### Features
@@ -26,12 +30,3 @@ For documentation about the associated command-line tool, see
* blazing fast
* npm-compatible caching
* errors if `package.json` and `package-lock.json` are out of sync, instead of fixing it like npm does. Essentially provides a `--frozen` install.
-
-### Contributing
-
-The libcipm team enthusiastically welcomes contributions and project
-participation! There's a bunch of things you can do if you want to contribute!
-The [Contributor Guide](CONTRIBUTING.md) has all the information you need for
-everything from reporting bugs to contributing entire new features. Please don't
-hesitate to jump in if you'd like to, or even ask us questions if something
-isn't clear.
diff --git a/node_modules/libcipm/package.json b/node_modules/libcipm/package.json
index 1411b40950004..f2317ba5f5fe8 100644
--- a/node_modules/libcipm/package.json
+++ b/node_modules/libcipm/package.json
@@ -1,28 +1,28 @@
{
- "_from": "libcipm@4.0.7",
- "_id": "libcipm@4.0.7",
+ "_from": "libcipm@4.0.8",
+ "_id": "libcipm@4.0.8",
"_inBundle": false,
- "_integrity": "sha512-fTq33otU3PNXxxCTCYCYe7V96o59v/o7bvtspmbORXpgFk+wcWrGf5x6tBgui5gCed/45/wtPomBsZBYm5KbIw==",
+ "_integrity": "sha512-IN3hh2yDJQtZZ5paSV4fbvJg4aHxCCg5tcZID/dSVlTuUiWktsgaldVljJv6Z5OUlYspx6xQkbR0efNodnIrOA==",
"_location": "/libcipm",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "libcipm@4.0.7",
+ "raw": "libcipm@4.0.8",
"name": "libcipm",
"escapedName": "libcipm",
- "rawSpec": "4.0.7",
+ "rawSpec": "4.0.8",
"saveSpec": null,
- "fetchSpec": "4.0.7"
+ "fetchSpec": "4.0.8"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.7.tgz",
- "_shasum": "76cd675c98bdaae64db88b782b01b804b6d02c8a",
- "_spec": "libcipm@4.0.7",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.8.tgz",
+ "_shasum": "dcea4919e10dfbce420327e63901613b9141bc89",
+ "_spec": "libcipm@4.0.8",
+ "_where": "/Users/claudiahdz/npm/cli",
"author": {
"name": "Kat Marchรกn",
"email": "kzm@sykosomatic.org"
@@ -46,7 +46,7 @@
"find-npm-prefix": "^1.0.2",
"graceful-fs": "^4.1.11",
"ini": "^1.3.5",
- "lock-verify": "^2.0.2",
+ "lock-verify": "^2.1.0",
"mkdirp": "^0.5.1",
"npm-lifecycle": "^3.0.0",
"npm-logical-tree": "^1.2.1",
@@ -65,9 +65,7 @@
"standard": "^11.0.1",
"standard-version": "^4.4.0",
"tacks": "^1.2.6",
- "tap": "^12.0.1",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
+ "tap": "^12.0.1"
},
"files": [
"*.js",
@@ -92,9 +90,7 @@
"prerelease": "npm t",
"pretest": "standard",
"release": "standard-version -s",
- "test": "tap -J --nyc-arg=--all --coverage test/specs",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ "test": "tap -J --nyc-arg=--all --coverage test/specs"
},
- "version": "4.0.7"
+ "version": "4.0.8"
}
diff --git a/node_modules/libnpmaccess/CODE_OF_CONDUCT.md b/node_modules/libnpmaccess/CODE_OF_CONDUCT.md
deleted file mode 100644
index aeb72f598dcb4..0000000000000
--- a/node_modules/libnpmaccess/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,151 +0,0 @@
-# Code of Conduct
-
-## When Something Happens
-
-If you see a Code of Conduct violation, follow these steps:
-
-1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
-2. That person should immediately stop the behavior and correct the issue.
-3. If this doesnโt happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
-4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
-
-When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
-
-**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
- * Using welcoming and inclusive language.
- * Being respectful of differing viewpoints and experiences.
- * Gracefully accepting constructive feedback.
- * Focusing on what is best for the community.
- * Showing empathy and kindness towards other community members.
- * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
-
-Examples of unacceptable behavior by participants include:
-
- * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
- * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
- * Making light of/making mocking comments about trigger warnings and content warnings.
- * Trolling, insulting/derogatory comments, and personal or political attacks.
- * Public or private harassment, deliberate intimidation, or threats.
- * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
- * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
- * Publishing of private communication that doesn't have to do with reporting harrassment.
- * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
- * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
- * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
- * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
- * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
- * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
-
-## Scope
-
-This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
-
-Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
-
-### Other Community Standards
-
-As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
-
-Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
-
-Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
-
-## Maintainer Enforcement Process
-
-Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
-
-### Contacting Maintainers
-
-You may get in touch with the maintainer team through any of the following methods:
-
- * Through email:
- * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchรกn)
-
- * Through Twitter:
- * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchรกn)
-
-### Further Enforcement
-
-If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
-
- 1. Repeat the request to stop.
- 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
- 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
- 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
-
-On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
-
-Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
-
-Members expelled from events or venues with any sort of paid attendance will not be refunded.
-
-### Who Watches the Watchers?
-
-Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
-
-Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
-
-### Enforcement Examples
-
-#### The Best Case
-
-The vast majority of situations work out like this. This interaction is common, and generally positive.
-
-> Alex: "Yeah I used X and it was really crazy!"
-
-> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
-
-> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
-
-#### The Maintainer Case
-
-Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
-
-> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
-
-> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
-
-> Patt: "I'm not attacking anyone, what's your problem?"
-
-> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
-
-> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
-
-> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
-
-> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
-
-> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
-
-> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
-
-#### The Nope Case
-
-> PepeTheFrog๐ธ: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
-
-> Patt: "NOOOOPE. OH NOPE NOPE."
-
-> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
-
-> KeeperOfCommitBits: "๐ Nope. NOPE NOPE NOPE. ๐ฅ"
-
-> PepeTheFrog๐ธ has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
-
-## Attribution
-
-This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
-Conduct](https://wealljs.org/code-of-conduct), which is itself based on
-[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
-at
-[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
-and the LGBTQ in Technology Slack [Code of
-Conduct](http://lgbtq.technology/coc.html).
diff --git a/node_modules/libnpmaccess/CONTRIBUTING.md b/node_modules/libnpmaccess/CONTRIBUTING.md
deleted file mode 100644
index e13356ea44497..0000000000000
--- a/node_modules/libnpmaccess/CONTRIBUTING.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Contributing
-
-## How do I...
-
-* [Use This Guide](#introduction)?
-* Ask or Say Something? ๐ค๐๐ฑ
- * [Request Support](#request-support)
- * [Report an Error or Bug](#report-an-error-or-bug)
- * [Request a Feature](#request-a-feature)
-* Make Something? ๐ค๐ฉ๐ฝโ๐ป๐๐ณ
- * [Project Setup](#project-setup)
- * [Contribute Documentation](#contribute-documentation)
- * [Contribute Code](#contribute-code)
-* Manage Something โ
๐๐ผ๐๐
- * [Provide Support on Issues](#provide-support-on-issues)
- * [Label Issues](#label-issues)
- * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
- * [Review Pull Requests](#review-pull-requests)
- * [Merge Pull Requests](#merge-pull-requests)
- * [Tag a Release](#tag-a-release)
- * [Join the Project Team](#join-the-project-team)
-* Add a Guide Like This One [To My Project](#attribution)? ๐ค๐ป๐ป
-
-## Introduction
-
-Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!๐
-
-Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. ๐
-
-The [Project Team](#join-the-project-team) looks forward to your contributions. ๐๐พโจ
-
-## Request Support
-
-If you have a question about this project, how to use it, or just need clarification about something:
-
-* Open an Issue at https://github.com/npm/libnpmaccess/issues
-* Provide as much context as you can about what you're running into.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* Someone will try to have a response soon.
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-
-## Report an Error or Bug
-
-If you run into an error or bug with the project:
-
-* Open an Issue at https://github.com/npm/libnpmaccess/issues
-* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
-* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
-
-## Request a Feature
-
-If the project doesn't do something you need or want it to do:
-
-* Open an Issue at https://github.com/npm/libnpmaccess/issues
-* Provide as much context as you can about what you're running into.
-* Please try and be clear about why existing features and alternatives would not work for you.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
-* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
-
-Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
-
-## Project Setup
-
-So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
-
-If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
-
-If you want to go the usual route and run the project locally, though:
-
-* [Install Node.js](https://nodejs.org/en/download/)
-* [Fork the project](https://guides.github.com/activities/forking/#fork)
-
-Then in your terminal:
-* `cd path/to/your/clone`
-* `npm install`
-* `npm test`
-
-And you should be ready to go!
-
-## Contribute Documentation
-
-Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
-
-Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
-
-To contribute documentation:
-
-* [Set up the project](#project-setup).
-* Edit or add any relevant documentation.
-* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
-* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
-* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `.
-* Go to https://github.com/npm/libnpmaccess/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Contribute Code
-
-We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
-
-Code contributions of just about any size are acceptable!
-
-The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
-
-To contribute code:
-
-* [Set up the project](#project-setup).
-* Make any necessary changes to the source code.
-* Include any [additional documentation](#contribute-documentation) the changes might need.
-* Write tests that verify that your contribution works as expected.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
-* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion.
-* Go to https://github.com/npm/libnpmaccess/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Provide Support on Issues
-
-[Needs Collaborator](#join-the-project-team): none
-
-Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
-
-Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
-
-In order to help other folks out with their questions:
-
-* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmaccess/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
-* Read through the list until you find something that you're familiar enough with to give an answer to.
-* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
-* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
-
-Some notes on picking up support issues:
-
-* Avoid responding to issues you don't know you can answer accurately.
-* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
-* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
-
-## Label Issues
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
-
-In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmaccess/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
-
-Label | Apply When | Notes
---- | --- | ---
-`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
-`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
-`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
-`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
-`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
-`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
-`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
-`performance` | This issue or PR is directly related to improving performance. |
-`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
-`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
-`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
-`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
-`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
-
-## Clean Up Issues and PRs
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
-
-In these cases, they should be closed until they're brought up again or the interaction starts over.
-
-To clean up issues and PRs:
-
-* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
-* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
- * not opened by a maintainer
- * not marked as `critical`
- * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
- * no explicit messages in the comments asking for it to be left open
- * does not belong to a milestone
-* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmaccess/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
-
-## Review Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
-
-PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
-
-Some notes:
-
-* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
-* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
-* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
-* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
-
-## Merge Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process.
-
-## Tag A Release
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
-
-## Join the Project Team
-
-### Ways to Join
-
-There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
-
-All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
-
-You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
-
-Permission | Description
---- | ---
-Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
-Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
-Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
-
-## Attribution
-
-This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/node_modules/libnpmconfig/CODE_OF_CONDUCT.md b/node_modules/libnpmconfig/CODE_OF_CONDUCT.md
deleted file mode 100644
index aeb72f598dcb4..0000000000000
--- a/node_modules/libnpmconfig/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,151 +0,0 @@
-# Code of Conduct
-
-## When Something Happens
-
-If you see a Code of Conduct violation, follow these steps:
-
-1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
-2. That person should immediately stop the behavior and correct the issue.
-3. If this doesnโt happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
-4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
-
-When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
-
-**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
- * Using welcoming and inclusive language.
- * Being respectful of differing viewpoints and experiences.
- * Gracefully accepting constructive feedback.
- * Focusing on what is best for the community.
- * Showing empathy and kindness towards other community members.
- * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
-
-Examples of unacceptable behavior by participants include:
-
- * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
- * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
- * Making light of/making mocking comments about trigger warnings and content warnings.
- * Trolling, insulting/derogatory comments, and personal or political attacks.
- * Public or private harassment, deliberate intimidation, or threats.
- * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
- * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
- * Publishing of private communication that doesn't have to do with reporting harrassment.
- * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
- * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
- * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
- * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
- * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
- * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
-
-## Scope
-
-This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
-
-Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
-
-### Other Community Standards
-
-As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
-
-Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
-
-Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
-
-## Maintainer Enforcement Process
-
-Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
-
-### Contacting Maintainers
-
-You may get in touch with the maintainer team through any of the following methods:
-
- * Through email:
- * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchรกn)
-
- * Through Twitter:
- * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchรกn)
-
-### Further Enforcement
-
-If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
-
- 1. Repeat the request to stop.
- 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
- 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
- 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
-
-On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
-
-Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
-
-Members expelled from events or venues with any sort of paid attendance will not be refunded.
-
-### Who Watches the Watchers?
-
-Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
-
-Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
-
-### Enforcement Examples
-
-#### The Best Case
-
-The vast majority of situations work out like this. This interaction is common, and generally positive.
-
-> Alex: "Yeah I used X and it was really crazy!"
-
-> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
-
-> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
-
-#### The Maintainer Case
-
-Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
-
-> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
-
-> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
-
-> Patt: "I'm not attacking anyone, what's your problem?"
-
-> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
-
-> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
-
-> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
-
-> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
-
-> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
-
-> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
-
-#### The Nope Case
-
-> PepeTheFrog๐ธ: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
-
-> Patt: "NOOOOPE. OH NOPE NOPE."
-
-> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
-
-> KeeperOfCommitBits: "๐ Nope. NOPE NOPE NOPE. ๐ฅ"
-
-> PepeTheFrog๐ธ has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
-
-## Attribution
-
-This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
-Conduct](https://wealljs.org/code-of-conduct), which is itself based on
-[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
-at
-[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
-and the LGBTQ in Technology Slack [Code of
-Conduct](http://lgbtq.technology/coc.html).
diff --git a/node_modules/libnpmconfig/CONTRIBUTING.md b/node_modules/libnpmconfig/CONTRIBUTING.md
deleted file mode 100644
index 970c1cf43aca0..0000000000000
--- a/node_modules/libnpmconfig/CONTRIBUTING.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Contributing
-
-## How do I...
-
-* [Use This Guide](#introduction)?
-* Ask or Say Something? ๐ค๐๐ฑ
- * [Request Support](#request-support)
- * [Report an Error or Bug](#report-an-error-or-bug)
- * [Request a Feature](#request-a-feature)
-* Make Something? ๐ค๐ฉ๐ฝโ๐ป๐๐ณ
- * [Project Setup](#project-setup)
- * [Contribute Documentation](#contribute-documentation)
- * [Contribute Code](#contribute-code)
-* Manage Something โ
๐๐ผ๐๐
- * [Provide Support on Issues](#provide-support-on-issues)
- * [Label Issues](#label-issues)
- * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
- * [Review Pull Requests](#review-pull-requests)
- * [Merge Pull Requests](#merge-pull-requests)
- * [Tag a Release](#tag-a-release)
- * [Join the Project Team](#join-the-project-team)
-* Add a Guide Like This One [To My Project](#attribution)? ๐ค๐ป๐ป
-
-## Introduction
-
-Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!๐
-
-Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. ๐
-
-The [Project Team](#join-the-project-team) looks forward to your contributions. ๐๐พโจ
-
-## Request Support
-
-If you have a question about this project, how to use it, or just need clarification about something:
-
-* Open an Issue at https://github.com/npm/libnpmconfig/issues
-* Provide as much context as you can about what you're running into.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* Someone will try to have a response soon.
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-
-## Report an Error or Bug
-
-If you run into an error or bug with the project:
-
-* Open an Issue at https://github.com/npm/libnpmconfig/issues
-* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
-* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
-
-## Request a Feature
-
-If the project doesn't do something you need or want it to do:
-
-* Open an Issue at https://github.com/npm/libnpmconfig/issues
-* Provide as much context as you can about what you're running into.
-* Please try and be clear about why existing features and alternatives would not work for you.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
-* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
-
-Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
-
-## Project Setup
-
-So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
-
-If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
-
-If you want to go the usual route and run the project locally, though:
-
-* [Install Node.js](https://nodejs.org/en/download/)
-* [Fork the project](https://guides.github.com/activities/forking/#fork)
-
-Then in your terminal:
-* `cd path/to/your/clone`
-* `npm install`
-* `npm test`
-
-And you should be ready to go!
-
-## Contribute Documentation
-
-Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
-
-Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
-
-To contribute documentation:
-
-* [Set up the project](#project-setup).
-* Edit or add any relevant documentation.
-* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
-* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
-* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `.
-* Go to https://github.com/npm/libnpmconfig/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Contribute Code
-
-We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
-
-Code contributions of just about any size are acceptable!
-
-The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
-
-To contribute code:
-
-* [Set up the project](#project-setup).
-* Make any necessary changes to the source code.
-* Include any [additional documentation](#contribute-documentation) the changes might need.
-* Write tests that verify that your contribution works as expected.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
-* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion.
-* Go to https://github.com/npm/libnpmconfig/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Provide Support on Issues
-
-[Needs Collaborator](#join-the-project-team): none
-
-Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
-
-Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
-
-In order to help other folks out with their questions:
-
-* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmconfig/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
-* Read through the list until you find something that you're familiar enough with to give an answer to.
-* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
-* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
-
-Some notes on picking up support issues:
-
-* Avoid responding to issues you don't know you can answer accurately.
-* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
-* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
-
-## Label Issues
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
-
-In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmconfig/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
-
-Label | Apply When | Notes
---- | --- | ---
-`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
-`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
-`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
-`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
-`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
-`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
-`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
-`performance` | This issue or PR is directly related to improving performance. |
-`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
-`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
-`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
-`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
-`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
-
-## Clean Up Issues and PRs
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
-
-In these cases, they should be closed until they're brought up again or the interaction starts over.
-
-To clean up issues and PRs:
-
-* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
-* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
- * not opened by a maintainer
- * not marked as `critical`
- * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
- * no explicit messages in the comments asking for it to be left open
- * does not belong to a milestone
-* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmconfig/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
-
-## Review Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
-
-PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
-
-Some notes:
-
-* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
-* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
-* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
-* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
-
-## Merge Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process.
-
-## Tag A Release
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
-
-## Join the Project Team
-
-### Ways to Join
-
-There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
-
-All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
-
-You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
-
-Permission | Description
---- | ---
-Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
-Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
-Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
-
-## Attribution
-
-This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/node_modules/libnpmorg/CODE_OF_CONDUCT.md b/node_modules/libnpmorg/CODE_OF_CONDUCT.md
deleted file mode 100644
index aeb72f598dcb4..0000000000000
--- a/node_modules/libnpmorg/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,151 +0,0 @@
-# Code of Conduct
-
-## When Something Happens
-
-If you see a Code of Conduct violation, follow these steps:
-
-1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
-2. That person should immediately stop the behavior and correct the issue.
-3. If this doesnโt happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
-4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
-
-When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
-
-**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
- * Using welcoming and inclusive language.
- * Being respectful of differing viewpoints and experiences.
- * Gracefully accepting constructive feedback.
- * Focusing on what is best for the community.
- * Showing empathy and kindness towards other community members.
- * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
-
-Examples of unacceptable behavior by participants include:
-
- * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
- * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
- * Making light of/making mocking comments about trigger warnings and content warnings.
- * Trolling, insulting/derogatory comments, and personal or political attacks.
- * Public or private harassment, deliberate intimidation, or threats.
- * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
- * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
- * Publishing of private communication that doesn't have to do with reporting harrassment.
- * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
- * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
- * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
- * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
- * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
- * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
-
-## Scope
-
-This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
-
-Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
-
-### Other Community Standards
-
-As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
-
-Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
-
-Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
-
-## Maintainer Enforcement Process
-
-Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
-
-### Contacting Maintainers
-
-You may get in touch with the maintainer team through any of the following methods:
-
- * Through email:
- * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchรกn)
-
- * Through Twitter:
- * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchรกn)
-
-### Further Enforcement
-
-If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
-
- 1. Repeat the request to stop.
- 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
- 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
- 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
-
-On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
-
-Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
-
-Members expelled from events or venues with any sort of paid attendance will not be refunded.
-
-### Who Watches the Watchers?
-
-Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
-
-Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
-
-### Enforcement Examples
-
-#### The Best Case
-
-The vast majority of situations work out like this. This interaction is common, and generally positive.
-
-> Alex: "Yeah I used X and it was really crazy!"
-
-> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
-
-> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
-
-#### The Maintainer Case
-
-Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
-
-> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
-
-> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
-
-> Patt: "I'm not attacking anyone, what's your problem?"
-
-> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
-
-> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
-
-> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
-
-> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
-
-> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
-
-> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
-
-#### The Nope Case
-
-> PepeTheFrog๐ธ: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
-
-> Patt: "NOOOOPE. OH NOPE NOPE."
-
-> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
-
-> KeeperOfCommitBits: "๐ Nope. NOPE NOPE NOPE. ๐ฅ"
-
-> PepeTheFrog๐ธ has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
-
-## Attribution
-
-This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
-Conduct](https://wealljs.org/code-of-conduct), which is itself based on
-[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
-at
-[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
-and the LGBTQ in Technology Slack [Code of
-Conduct](http://lgbtq.technology/coc.html).
diff --git a/node_modules/libnpmorg/CONTRIBUTING.md b/node_modules/libnpmorg/CONTRIBUTING.md
deleted file mode 100644
index eb4b58b03ef1a..0000000000000
--- a/node_modules/libnpmorg/CONTRIBUTING.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Contributing
-
-## How do I...
-
-* [Use This Guide](#introduction)?
-* Ask or Say Something? ๐ค๐๐ฑ
- * [Request Support](#request-support)
- * [Report an Error or Bug](#report-an-error-or-bug)
- * [Request a Feature](#request-a-feature)
-* Make Something? ๐ค๐ฉ๐ฝโ๐ป๐๐ณ
- * [Project Setup](#project-setup)
- * [Contribute Documentation](#contribute-documentation)
- * [Contribute Code](#contribute-code)
-* Manage Something โ
๐๐ผ๐๐
- * [Provide Support on Issues](#provide-support-on-issues)
- * [Label Issues](#label-issues)
- * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
- * [Review Pull Requests](#review-pull-requests)
- * [Merge Pull Requests](#merge-pull-requests)
- * [Tag a Release](#tag-a-release)
- * [Join the Project Team](#join-the-project-team)
-* Add a Guide Like This One [To My Project](#attribution)? ๐ค๐ป๐ป
-
-## Introduction
-
-Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!๐
-
-Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. ๐
-
-The [Project Team](#join-the-project-team) looks forward to your contributions. ๐๐พโจ
-
-## Request Support
-
-If you have a question about this project, how to use it, or just need clarification about something:
-
-* Open an Issue at https://github.com/npm/libnpmorg/issues
-* Provide as much context as you can about what you're running into.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* Someone will try to have a response soon.
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-
-## Report an Error or Bug
-
-If you run into an error or bug with the project:
-
-* Open an Issue at https://github.com/npm/libnpmorg/issues
-* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
-* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
-
-## Request a Feature
-
-If the project doesn't do something you need or want it to do:
-
-* Open an Issue at https://github.com/npm/libnpmorg/issues
-* Provide as much context as you can about what you're running into.
-* Please try and be clear about why existing features and alternatives would not work for you.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
-* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
-
-Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
-
-## Project Setup
-
-So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
-
-If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
-
-If you want to go the usual route and run the project locally, though:
-
-* [Install Node.js](https://nodejs.org/en/download/)
-* [Fork the project](https://guides.github.com/activities/forking/#fork)
-
-Then in your terminal:
-* `cd path/to/your/clone`
-* `npm install`
-* `npm test`
-
-And you should be ready to go!
-
-## Contribute Documentation
-
-Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
-
-Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
-
-To contribute documentation:
-
-* [Set up the project](#project-setup).
-* Edit or add any relevant documentation.
-* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
-* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
-* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `.
-* Go to https://github.com/npm/libnpmorg/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Contribute Code
-
-We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
-
-Code contributions of just about any size are acceptable!
-
-The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
-
-To contribute code:
-
-* [Set up the project](#project-setup).
-* Make any necessary changes to the source code.
-* Include any [additional documentation](#contribute-documentation) the changes might need.
-* Write tests that verify that your contribution works as expected.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
-* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion.
-* Go to https://github.com/npm/libnpmorg/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Provide Support on Issues
-
-[Needs Collaborator](#join-the-project-team): none
-
-Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
-
-Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
-
-In order to help other folks out with their questions:
-
-* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmorg/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
-* Read through the list until you find something that you're familiar enough with to give an answer to.
-* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
-* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
-
-Some notes on picking up support issues:
-
-* Avoid responding to issues you don't know you can answer accurately.
-* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
-* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
-
-## Label Issues
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
-
-In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmorg/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
-
-Label | Apply When | Notes
---- | --- | ---
-`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
-`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
-`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
-`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
-`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
-`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
-`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
-`performance` | This issue or PR is directly related to improving performance. |
-`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
-`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
-`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
-`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
-`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
-
-## Clean Up Issues and PRs
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
-
-In these cases, they should be closed until they're brought up again or the interaction starts over.
-
-To clean up issues and PRs:
-
-* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
-* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
- * not opened by a maintainer
- * not marked as `critical`
- * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
- * no explicit messages in the comments asking for it to be left open
- * does not belong to a milestone
-* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmorg/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
-
-## Review Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
-
-PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
-
-Some notes:
-
-* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
-* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
-* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
-* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
-
-## Merge Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process.
-
-## Tag A Release
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
-
-## Join the Project Team
-
-### Ways to Join
-
-There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
-
-All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
-
-You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
-
-Permission | Description
---- | ---
-Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
-Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
-Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
-
-## Attribution
-
-This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/node_modules/libnpmpublish/CODE_OF_CONDUCT.md b/node_modules/libnpmpublish/CODE_OF_CONDUCT.md
deleted file mode 100644
index aeb72f598dcb4..0000000000000
--- a/node_modules/libnpmpublish/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,151 +0,0 @@
-# Code of Conduct
-
-## When Something Happens
-
-If you see a Code of Conduct violation, follow these steps:
-
-1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
-2. That person should immediately stop the behavior and correct the issue.
-3. If this doesnโt happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
-4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
-
-When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
-
-**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
- * Using welcoming and inclusive language.
- * Being respectful of differing viewpoints and experiences.
- * Gracefully accepting constructive feedback.
- * Focusing on what is best for the community.
- * Showing empathy and kindness towards other community members.
- * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
-
-Examples of unacceptable behavior by participants include:
-
- * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
- * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
- * Making light of/making mocking comments about trigger warnings and content warnings.
- * Trolling, insulting/derogatory comments, and personal or political attacks.
- * Public or private harassment, deliberate intimidation, or threats.
- * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
- * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
- * Publishing of private communication that doesn't have to do with reporting harrassment.
- * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
- * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
- * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
- * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
- * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
- * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
-
-## Scope
-
-This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
-
-Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
-
-### Other Community Standards
-
-As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
-
-Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
-
-Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
-
-## Maintainer Enforcement Process
-
-Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
-
-### Contacting Maintainers
-
-You may get in touch with the maintainer team through any of the following methods:
-
- * Through email:
- * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchรกn)
-
- * Through Twitter:
- * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchรกn)
-
-### Further Enforcement
-
-If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
-
- 1. Repeat the request to stop.
- 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
- 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
- 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
-
-On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
-
-Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
-
-Members expelled from events or venues with any sort of paid attendance will not be refunded.
-
-### Who Watches the Watchers?
-
-Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
-
-Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
-
-### Enforcement Examples
-
-#### The Best Case
-
-The vast majority of situations work out like this. This interaction is common, and generally positive.
-
-> Alex: "Yeah I used X and it was really crazy!"
-
-> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
-
-> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
-
-#### The Maintainer Case
-
-Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
-
-> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
-
-> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
-
-> Patt: "I'm not attacking anyone, what's your problem?"
-
-> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
-
-> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
-
-> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
-
-> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
-
-> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
-
-> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
-
-#### The Nope Case
-
-> PepeTheFrog๐ธ: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
-
-> Patt: "NOOOOPE. OH NOPE NOPE."
-
-> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
-
-> KeeperOfCommitBits: "๐ Nope. NOPE NOPE NOPE. ๐ฅ"
-
-> PepeTheFrog๐ธ has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
-
-## Attribution
-
-This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
-Conduct](https://wealljs.org/code-of-conduct), which is itself based on
-[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
-at
-[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
-and the LGBTQ in Technology Slack [Code of
-Conduct](http://lgbtq.technology/coc.html).
diff --git a/node_modules/libnpmpublish/CONTRIBUTING.md b/node_modules/libnpmpublish/CONTRIBUTING.md
deleted file mode 100644
index 780044ffcc0f3..0000000000000
--- a/node_modules/libnpmpublish/CONTRIBUTING.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Contributing
-
-## How do I...
-
-* [Use This Guide](#introduction)?
-* Ask or Say Something? ๐ค๐๐ฑ
- * [Request Support](#request-support)
- * [Report an Error or Bug](#report-an-error-or-bug)
- * [Request a Feature](#request-a-feature)
-* Make Something? ๐ค๐ฉ๐ฝโ๐ป๐๐ณ
- * [Project Setup](#project-setup)
- * [Contribute Documentation](#contribute-documentation)
- * [Contribute Code](#contribute-code)
-* Manage Something โ
๐๐ผ๐๐
- * [Provide Support on Issues](#provide-support-on-issues)
- * [Label Issues](#label-issues)
- * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
- * [Review Pull Requests](#review-pull-requests)
- * [Merge Pull Requests](#merge-pull-requests)
- * [Tag a Release](#tag-a-release)
- * [Join the Project Team](#join-the-project-team)
-* Add a Guide Like This One [To My Project](#attribution)? ๐ค๐ป๐ป
-
-## Introduction
-
-Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!๐
-
-Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. ๐
-
-The [Project Team](#join-the-project-team) looks forward to your contributions. ๐๐พโจ
-
-## Request Support
-
-If you have a question about this project, how to use it, or just need clarification about something:
-
-* Open an Issue at https://github.com/npm/libnpmpublish/issues
-* Provide as much context as you can about what you're running into.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* Someone will try to have a response soon.
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-
-## Report an Error or Bug
-
-If you run into an error or bug with the project:
-
-* Open an Issue at https://github.com/npm/libnpmpublish/issues
-* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
-* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
-
-## Request a Feature
-
-If the project doesn't do something you need or want it to do:
-
-* Open an Issue at https://github.com/npm/libnpmpublish/issues
-* Provide as much context as you can about what you're running into.
-* Please try and be clear about why existing features and alternatives would not work for you.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
-* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
-
-Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
-
-## Project Setup
-
-So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
-
-If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
-
-If you want to go the usual route and run the project locally, though:
-
-* [Install Node.js](https://nodejs.org/en/download/)
-* [Fork the project](https://guides.github.com/activities/forking/#fork)
-
-Then in your terminal:
-* `cd path/to/your/clone`
-* `npm install`
-* `npm test`
-
-And you should be ready to go!
-
-## Contribute Documentation
-
-Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
-
-Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
-
-To contribute documentation:
-
-* [Set up the project](#project-setup).
-* Edit or add any relevant documentation.
-* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
-* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
-* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `.
-* Go to https://github.com/npm/libnpmpublish/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Contribute Code
-
-We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
-
-Code contributions of just about any size are acceptable!
-
-The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
-
-To contribute code:
-
-* [Set up the project](#project-setup).
-* Make any necessary changes to the source code.
-* Include any [additional documentation](#contribute-documentation) the changes might need.
-* Write tests that verify that your contribution works as expected.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
-* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion.
-* Go to https://github.com/npm/libnpmpublish/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Provide Support on Issues
-
-[Needs Collaborator](#join-the-project-team): none
-
-Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
-
-Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
-
-In order to help other folks out with their questions:
-
-* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmpublish/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
-* Read through the list until you find something that you're familiar enough with to give an answer to.
-* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
-* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
-
-Some notes on picking up support issues:
-
-* Avoid responding to issues you don't know you can answer accurately.
-* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
-* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
-
-## Label Issues
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
-
-In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmpublish/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
-
-Label | Apply When | Notes
---- | --- | ---
-`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
-`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
-`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
-`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
-`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
-`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
-`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
-`performance` | This issue or PR is directly related to improving performance. |
-`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
-`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
-`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
-`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
-`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
-
-## Clean Up Issues and PRs
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
-
-In these cases, they should be closed until they're brought up again or the interaction starts over.
-
-To clean up issues and PRs:
-
-* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
-* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
- * not opened by a maintainer
- * not marked as `critical`
- * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
- * no explicit messages in the comments asking for it to be left open
- * does not belong to a milestone
-* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmpublish/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
-
-## Review Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
-
-PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
-
-Some notes:
-
-* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
-* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
-* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
-* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
-
-## Merge Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process.
-
-## Tag A Release
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
-
-## Join the Project Team
-
-### Ways to Join
-
-There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
-
-All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
-
-You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
-
-Permission | Description
---- | ---
-Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
-Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
-Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
-
-## Attribution
-
-This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/node_modules/libnpmsearch/CODE_OF_CONDUCT.md b/node_modules/libnpmsearch/CODE_OF_CONDUCT.md
deleted file mode 100644
index aeb72f598dcb4..0000000000000
--- a/node_modules/libnpmsearch/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,151 +0,0 @@
-# Code of Conduct
-
-## When Something Happens
-
-If you see a Code of Conduct violation, follow these steps:
-
-1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
-2. That person should immediately stop the behavior and correct the issue.
-3. If this doesnโt happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
-4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
-
-When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
-
-**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
- * Using welcoming and inclusive language.
- * Being respectful of differing viewpoints and experiences.
- * Gracefully accepting constructive feedback.
- * Focusing on what is best for the community.
- * Showing empathy and kindness towards other community members.
- * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
-
-Examples of unacceptable behavior by participants include:
-
- * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
- * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
- * Making light of/making mocking comments about trigger warnings and content warnings.
- * Trolling, insulting/derogatory comments, and personal or political attacks.
- * Public or private harassment, deliberate intimidation, or threats.
- * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
- * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
- * Publishing of private communication that doesn't have to do with reporting harrassment.
- * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
- * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
- * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
- * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
- * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
- * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
-
-## Scope
-
-This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
-
-Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
-
-### Other Community Standards
-
-As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
-
-Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
-
-Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
-
-## Maintainer Enforcement Process
-
-Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
-
-### Contacting Maintainers
-
-You may get in touch with the maintainer team through any of the following methods:
-
- * Through email:
- * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchรกn)
-
- * Through Twitter:
- * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchรกn)
-
-### Further Enforcement
-
-If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
-
- 1. Repeat the request to stop.
- 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
- 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
- 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
-
-On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
-
-Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
-
-Members expelled from events or venues with any sort of paid attendance will not be refunded.
-
-### Who Watches the Watchers?
-
-Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
-
-Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
-
-### Enforcement Examples
-
-#### The Best Case
-
-The vast majority of situations work out like this. This interaction is common, and generally positive.
-
-> Alex: "Yeah I used X and it was really crazy!"
-
-> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
-
-> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
-
-#### The Maintainer Case
-
-Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
-
-> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
-
-> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
-
-> Patt: "I'm not attacking anyone, what's your problem?"
-
-> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
-
-> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
-
-> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
-
-> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
-
-> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
-
-> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
-
-#### The Nope Case
-
-> PepeTheFrog๐ธ: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
-
-> Patt: "NOOOOPE. OH NOPE NOPE."
-
-> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
-
-> KeeperOfCommitBits: "๐ Nope. NOPE NOPE NOPE. ๐ฅ"
-
-> PepeTheFrog๐ธ has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
-
-## Attribution
-
-This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
-Conduct](https://wealljs.org/code-of-conduct), which is itself based on
-[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
-at
-[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
-and the LGBTQ in Technology Slack [Code of
-Conduct](http://lgbtq.technology/coc.html).
diff --git a/node_modules/libnpmsearch/CONTRIBUTING.md b/node_modules/libnpmsearch/CONTRIBUTING.md
deleted file mode 100644
index 1a61601a16dba..0000000000000
--- a/node_modules/libnpmsearch/CONTRIBUTING.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Contributing
-
-## How do I...
-
-* [Use This Guide](#introduction)?
-* Ask or Say Something? ๐ค๐๐ฑ
- * [Request Support](#request-support)
- * [Report an Error or Bug](#report-an-error-or-bug)
- * [Request a Feature](#request-a-feature)
-* Make Something? ๐ค๐ฉ๐ฝโ๐ป๐๐ณ
- * [Project Setup](#project-setup)
- * [Contribute Documentation](#contribute-documentation)
- * [Contribute Code](#contribute-code)
-* Manage Something โ
๐๐ผ๐๐
- * [Provide Support on Issues](#provide-support-on-issues)
- * [Label Issues](#label-issues)
- * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
- * [Review Pull Requests](#review-pull-requests)
- * [Merge Pull Requests](#merge-pull-requests)
- * [Tag a Release](#tag-a-release)
- * [Join the Project Team](#join-the-project-team)
-* Add a Guide Like This One [To My Project](#attribution)? ๐ค๐ป๐ป
-
-## Introduction
-
-Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!๐
-
-Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. ๐
-
-The [Project Team](#join-the-project-team) looks forward to your contributions. ๐๐พโจ
-
-## Request Support
-
-If you have a question about this project, how to use it, or just need clarification about something:
-
-* Open an Issue at https://github.com/npm/libnpmsearch/issues
-* Provide as much context as you can about what you're running into.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* Someone will try to have a response soon.
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-
-## Report an Error or Bug
-
-If you run into an error or bug with the project:
-
-* Open an Issue at https://github.com/npm/libnpmsearch/issues
-* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
-* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
-
-## Request a Feature
-
-If the project doesn't do something you need or want it to do:
-
-* Open an Issue at https://github.com/npm/libnpmsearch/issues
-* Provide as much context as you can about what you're running into.
-* Please try and be clear about why existing features and alternatives would not work for you.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
-* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
-
-Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
-
-## Project Setup
-
-So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
-
-If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
-
-If you want to go the usual route and run the project locally, though:
-
-* [Install Node.js](https://nodejs.org/en/download/)
-* [Fork the project](https://guides.github.com/activities/forking/#fork)
-
-Then in your terminal:
-* `cd path/to/your/clone`
-* `npm install`
-* `npm test`
-
-And you should be ready to go!
-
-## Contribute Documentation
-
-Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
-
-Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
-
-To contribute documentation:
-
-* [Set up the project](#project-setup).
-* Edit or add any relevant documentation.
-* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
-* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
-* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `.
-* Go to https://github.com/npm/libnpmsearch/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Contribute Code
-
-We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
-
-Code contributions of just about any size are acceptable!
-
-The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
-
-To contribute code:
-
-* [Set up the project](#project-setup).
-* Make any necessary changes to the source code.
-* Include any [additional documentation](#contribute-documentation) the changes might need.
-* Write tests that verify that your contribution works as expected.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
-* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion.
-* Go to https://github.com/npm/libnpmsearch/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Provide Support on Issues
-
-[Needs Collaborator](#join-the-project-team): none
-
-Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
-
-Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
-
-In order to help other folks out with their questions:
-
-* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmsearch/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
-* Read through the list until you find something that you're familiar enough with to give an answer to.
-* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
-* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
-
-Some notes on picking up support issues:
-
-* Avoid responding to issues you don't know you can answer accurately.
-* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
-* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
-
-## Label Issues
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
-
-In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmsearch/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
-
-Label | Apply When | Notes
---- | --- | ---
-`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
-`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
-`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
-`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
-`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
-`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
-`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
-`performance` | This issue or PR is directly related to improving performance. |
-`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
-`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
-`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
-`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
-`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
-
-## Clean Up Issues and PRs
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
-
-In these cases, they should be closed until they're brought up again or the interaction starts over.
-
-To clean up issues and PRs:
-
-* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
-* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
- * not opened by a maintainer
- * not marked as `critical`
- * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
- * no explicit messages in the comments asking for it to be left open
- * does not belong to a milestone
-* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmsearch/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
-
-## Review Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
-
-PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
-
-Some notes:
-
-* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
-* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
-* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
-* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
-
-## Merge Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process.
-
-## Tag A Release
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
-
-## Join the Project Team
-
-### Ways to Join
-
-There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
-
-All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
-
-You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
-
-Permission | Description
---- | ---
-Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
-Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
-Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
-
-## Attribution
-
-This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/node_modules/libnpmteam/CODE_OF_CONDUCT.md b/node_modules/libnpmteam/CODE_OF_CONDUCT.md
deleted file mode 100644
index aeb72f598dcb4..0000000000000
--- a/node_modules/libnpmteam/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,151 +0,0 @@
-# Code of Conduct
-
-## When Something Happens
-
-If you see a Code of Conduct violation, follow these steps:
-
-1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
-2. That person should immediately stop the behavior and correct the issue.
-3. If this doesnโt happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
-4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
-
-When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
-
-**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
- * Using welcoming and inclusive language.
- * Being respectful of differing viewpoints and experiences.
- * Gracefully accepting constructive feedback.
- * Focusing on what is best for the community.
- * Showing empathy and kindness towards other community members.
- * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
-
-Examples of unacceptable behavior by participants include:
-
- * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
- * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
- * Making light of/making mocking comments about trigger warnings and content warnings.
- * Trolling, insulting/derogatory comments, and personal or political attacks.
- * Public or private harassment, deliberate intimidation, or threats.
- * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
- * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
- * Publishing of private communication that doesn't have to do with reporting harrassment.
- * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
- * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
- * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
- * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
- * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
- * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
-
-## Scope
-
-This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
-
-Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
-
-### Other Community Standards
-
-As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
-
-Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
-
-Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
-
-## Maintainer Enforcement Process
-
-Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
-
-### Contacting Maintainers
-
-You may get in touch with the maintainer team through any of the following methods:
-
- * Through email:
- * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchรกn)
-
- * Through Twitter:
- * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchรกn)
-
-### Further Enforcement
-
-If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
-
- 1. Repeat the request to stop.
- 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
- 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
- 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
-
-On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
-
-Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
-
-Members expelled from events or venues with any sort of paid attendance will not be refunded.
-
-### Who Watches the Watchers?
-
-Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
-
-Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
-
-### Enforcement Examples
-
-#### The Best Case
-
-The vast majority of situations work out like this. This interaction is common, and generally positive.
-
-> Alex: "Yeah I used X and it was really crazy!"
-
-> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
-
-> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
-
-#### The Maintainer Case
-
-Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
-
-> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
-
-> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
-
-> Patt: "I'm not attacking anyone, what's your problem?"
-
-> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
-
-> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
-
-> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
-
-> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
-
-> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
-
-> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
-
-#### The Nope Case
-
-> PepeTheFrog๐ธ: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
-
-> Patt: "NOOOOPE. OH NOPE NOPE."
-
-> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
-
-> KeeperOfCommitBits: "๐ Nope. NOPE NOPE NOPE. ๐ฅ"
-
-> PepeTheFrog๐ธ has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
-
-## Attribution
-
-This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
-Conduct](https://wealljs.org/code-of-conduct), which is itself based on
-[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
-at
-[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
-and the LGBTQ in Technology Slack [Code of
-Conduct](http://lgbtq.technology/coc.html).
diff --git a/node_modules/libnpmteam/CONTRIBUTING.md b/node_modules/libnpmteam/CONTRIBUTING.md
deleted file mode 100644
index 3fd40076caae8..0000000000000
--- a/node_modules/libnpmteam/CONTRIBUTING.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Contributing
-
-## How do I...
-
-* [Use This Guide](#introduction)?
-* Ask or Say Something? ๐ค๐๐ฑ
- * [Request Support](#request-support)
- * [Report an Error or Bug](#report-an-error-or-bug)
- * [Request a Feature](#request-a-feature)
-* Make Something? ๐ค๐ฉ๐ฝโ๐ป๐๐ณ
- * [Project Setup](#project-setup)
- * [Contribute Documentation](#contribute-documentation)
- * [Contribute Code](#contribute-code)
-* Manage Something โ
๐๐ผ๐๐
- * [Provide Support on Issues](#provide-support-on-issues)
- * [Label Issues](#label-issues)
- * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
- * [Review Pull Requests](#review-pull-requests)
- * [Merge Pull Requests](#merge-pull-requests)
- * [Tag a Release](#tag-a-release)
- * [Join the Project Team](#join-the-project-team)
-* Add a Guide Like This One [To My Project](#attribution)? ๐ค๐ป๐ป
-
-## Introduction
-
-Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!๐
-
-Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. ๐
-
-The [Project Team](#join-the-project-team) looks forward to your contributions. ๐๐พโจ
-
-## Request Support
-
-If you have a question about this project, how to use it, or just need clarification about something:
-
-* Open an Issue at https://github.com/npm/libnpmteam/issues
-* Provide as much context as you can about what you're running into.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* Someone will try to have a response soon.
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-
-## Report an Error or Bug
-
-If you run into an error or bug with the project:
-
-* Open an Issue at https://github.com/npm/libnpmteam/issues
-* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
-* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
-* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
-* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
-* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
-
-## Request a Feature
-
-If the project doesn't do something you need or want it to do:
-
-* Open an Issue at https://github.com/npm/libnpmteam/issues
-* Provide as much context as you can about what you're running into.
-* Please try and be clear about why existing features and alternatives would not work for you.
-
-Once it's filed:
-
-* The project team will [label the issue](#label-issues).
-* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
-* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
-
-Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
-
-## Project Setup
-
-So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
-
-If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
-
-If you want to go the usual route and run the project locally, though:
-
-* [Install Node.js](https://nodejs.org/en/download/)
-* [Fork the project](https://guides.github.com/activities/forking/#fork)
-
-Then in your terminal:
-* `cd path/to/your/clone`
-* `npm install`
-* `npm test`
-
-And you should be ready to go!
-
-## Contribute Documentation
-
-Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
-
-Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
-
-To contribute documentation:
-
-* [Set up the project](#project-setup).
-* Edit or add any relevant documentation.
-* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
-* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
-* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `.
-* Go to https://github.com/npm/libnpmteam/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Contribute Code
-
-We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
-
-Code contributions of just about any size are acceptable!
-
-The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
-
-To contribute code:
-
-* [Set up the project](#project-setup).
-* Make any necessary changes to the source code.
-* Include any [additional documentation](#contribute-documentation) the changes might need.
-* Write tests that verify that your contribution works as expected.
-* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
-* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion.
-* Go to https://github.com/npm/libnpmteam/pulls and open a new pull request with your changes.
-* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
-
-Once you've filed the PR:
-
-* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
-* One or more maintainers will use GitHub's review feature to review your PR.
-* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
-* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. ๐
-* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
-
-## Provide Support on Issues
-
-[Needs Collaborator](#join-the-project-team): none
-
-Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
-
-Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
-
-In order to help other folks out with their questions:
-
-* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmteam/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
-* Read through the list until you find something that you're familiar enough with to give an answer to.
-* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
-* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
-
-Some notes on picking up support issues:
-
-* Avoid responding to issues you don't know you can answer accurately.
-* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
-* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
-
-## Label Issues
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
-
-In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmteam/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
-
-Label | Apply When | Notes
---- | --- | ---
-`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
-`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
-`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
-`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
-`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
-`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
-`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
-`performance` | This issue or PR is directly related to improving performance. |
-`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
-`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
-`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
-`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
-`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
-
-## Clean Up Issues and PRs
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
-
-In these cases, they should be closed until they're brought up again or the interaction starts over.
-
-To clean up issues and PRs:
-
-* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
-* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
- * not opened by a maintainer
- * not marked as `critical`
- * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
- * no explicit messages in the comments asking for it to be left open
- * does not belong to a milestone
-* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmteam/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
-
-## Review Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Issue Tracker
-
-While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
-
-PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
-
-Some notes:
-
-* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
-* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
-* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
-* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
-
-## Merge Pull Requests
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process.
-
-## Tag A Release
-
-[Needs Collaborator](#join-the-project-team): Committer
-
-TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
-
-## Join the Project Team
-
-### Ways to Join
-
-There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
-
-All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
-
-You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
-
-Permission | Description
---- | ---
-Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
-Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
-Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
-
-## Attribution
-
-This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/node_modules/libnpx/CHANGELOG.md b/node_modules/libnpx/CHANGELOG.md
index 74da62235d696..d8ea8b4e87411 100644
--- a/node_modules/libnpx/CHANGELOG.md
+++ b/node_modules/libnpx/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [10.2.4](https://github.com/npm/npx/compare/v10.2.3...v10.2.4) (2020-07-20)
+
+
+
+
+## [10.2.3](https://github.com/npm/npx/compare/v10.2.2...v10.2.3) (2020-03-24)
+
+
+
## [10.2.2](https://github.com/npm/npx/compare/v10.2.1...v10.2.2) (2020-01-28)
diff --git a/node_modules/libnpx/libnpx.1 b/node_modules/libnpx/libnpx.1
index aea3ffe8f4192..1f5669d3c9d76 100644
--- a/node_modules/libnpx/libnpx.1
+++ b/node_modules/libnpx/libnpx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "January 2020" "libnpx@10.2.1" "User Commands"
+.TH "NPX" "1" "July 2020" "libnpx@10.2.3" "User Commands"
.SH "NAME"
\fBnpx\fR \- execute npm package binaries
.SH SYNOPSIS
diff --git a/node_modules/libnpx/package.json b/node_modules/libnpx/package.json
index 9b9949cd3ca4f..53073ae79a2a0 100644
--- a/node_modules/libnpx/package.json
+++ b/node_modules/libnpx/package.json
@@ -1,28 +1,28 @@
{
- "_from": "libnpx@10.2.2",
- "_id": "libnpx@10.2.2",
+ "_from": "libnpx@10.2.4",
+ "_id": "libnpx@10.2.4",
"_inBundle": false,
- "_integrity": "sha512-ujaYToga1SAX5r7FU5ShMFi88CWpY75meNZtr6RtEyv4l2ZK3+Wgvxq2IqlwWBiDZOqhumdeiocPS1aKrCMe3A==",
+ "_integrity": "sha512-BPc0D1cOjBeS8VIBKUu5F80s6njm0wbVt7CsGMrIcJ+SI7pi7V0uVPGpEMH9H5L8csOcclTxAXFE2VAsJXUhfA==",
"_location": "/libnpx",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "libnpx@10.2.2",
+ "raw": "libnpx@10.2.4",
"name": "libnpx",
"escapedName": "libnpx",
- "rawSpec": "10.2.2",
+ "rawSpec": "10.2.4",
"saveSpec": null,
- "fetchSpec": "10.2.2"
+ "fetchSpec": "10.2.4"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.2.tgz",
- "_shasum": "5a4171b9b92dd031463ef66a4af9f5cbd6b09572",
- "_spec": "libnpx@10.2.2",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.4.tgz",
+ "_shasum": "ef0e3258e29aef2ec7ee3276115e20e67f67d4ee",
+ "_spec": "libnpx@10.2.4",
+ "_where": "/Users/claudiahdz/npm/cli",
"author": {
"name": "Kat Marchรกn",
"email": "kzm@sykosomatic.org"
@@ -47,7 +47,7 @@
"update-notifier": "^2.3.0",
"which": "^1.3.0",
"y18n": "^4.0.0",
- "yargs": "^11.0.0"
+ "yargs": "^14.2.3"
},
"deprecated": false,
"description": "support library for npx -- an tool for executing npm-based packages.",
@@ -62,9 +62,7 @@
"standard": "^11.0.0",
"standard-version": "^4.3.0",
"tacks": "^1.2.6",
- "tap": "^11.1.2",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
+ "tap": "^11.1.2"
},
"engines": {
"node": ">=4"
@@ -101,9 +99,7 @@
"pretest": "standard *.js test bin/*.js locales",
"publish-bin": "npm run bin && cd bin && npm publish",
"release": "standard-version -s",
- "test": "cross-env NPX_UPDATE_LOCALE_FILES=true LC_ALL=en nyc --all -- tap -J test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ "test": "cross-env NPX_UPDATE_LOCALE_FILES=true LC_ALL=en nyc --all -- tap -J test/*.js"
},
- "version": "10.2.2"
+ "version": "10.2.4"
}
diff --git a/node_modules/meant/.github/workflows/ci.yml b/node_modules/meant/.github/workflows/ci.yml
new file mode 100644
index 0000000000000..b11451fa603d5
--- /dev/null
+++ b/node_modules/meant/.github/workflows/ci.yml
@@ -0,0 +1,20 @@
+name: Node.js CI
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ node-version: [6.x, 8.x, 10.x, 12.x]
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - run: npm install
+ - run: npm test
diff --git a/node_modules/meant/.npmignore b/node_modules/meant/.npmignore
deleted file mode 100644
index 5148e527a7e28..0000000000000
--- a/node_modules/meant/.npmignore
+++ /dev/null
@@ -1,37 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-
-# Runtime data
-pids
-*.pid
-*.seed
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-
-# nyc test coverage
-.nyc_output
-
-# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (http://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
-node_modules
-jspm_packages
-
-# Optional npm cache directory
-.npm
-
-# Optional REPL history
-.node_repl_history
diff --git a/node_modules/meant/.travis.yml b/node_modules/meant/.travis.yml
deleted file mode 100644
index 413d5de7f1a64..0000000000000
--- a/node_modules/meant/.travis.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-script:
- - "npm test"
-
-language: node_js
-
-node_js:
- - "5"
- - "4"
- - iojs
- - "0.12"
-
-sudo: false
-
-cache:
- directories:
- - node_modules
diff --git a/node_modules/meant/CHANGELOG.md b/node_modules/meant/CHANGELOG.md
index a26b8aadfa1f5..89b0e6f94e1cc 100644
--- a/node_modules/meant/CHANGELOG.md
+++ b/node_modules/meant/CHANGELOG.md
@@ -1,7 +1,15 @@
-# Change Log
+# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+### [1.0.2](https://github.com/watilde/meant/compare/v1.0.1...v1.0.2) (2020-07-19)
+
+
+### Bug Fixes
+
+* **deps:** bump standard, standard-version and tap ([d31fb06](https://github.com/watilde/meant/commit/d31fb064495b031dd1152726da9bd2198daa36ff))
+* **deps:** patch update in lock file ([4e699ee](https://github.com/watilde/meant/commit/4e699ee8751a69923dddf18c940acce630f4bf29))
+
## [1.0.1](https://github.com/watilde/meant/compare/v1.0.0...v1.0.1) (2017-08-23)
diff --git a/node_modules/meant/README.md b/node_modules/meant/README.md
index 90cc0ac77c16b..2fe43b610a71d 100644
--- a/node_modules/meant/README.md
+++ b/node_modules/meant/README.md
@@ -1,4 +1,4 @@
-# meant [](https://travis-ci.org/watilde/meant)
+# meant 
Like the `Did you mean?` in git for npm
diff --git a/node_modules/meant/package.json b/node_modules/meant/package.json
index a22398f4bd24e..64fb15b983f08 100644
--- a/node_modules/meant/package.json
+++ b/node_modules/meant/package.json
@@ -1,43 +1,41 @@
{
- "_args": [
- [
- "meant@1.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "meant@1.0.1",
- "_id": "meant@1.0.1",
+ "_from": "meant@1.0.2",
+ "_id": "meant@1.0.2",
"_inBundle": false,
- "_integrity": "sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg==",
+ "_integrity": "sha512-KN+1uowN/NK+sT/Lzx7WSGIj2u+3xe5n2LbwObfjOhPZiA+cCfCm6idVl0RkEfjThkw5XJ96CyRcanq6GmKtUg==",
"_location": "/meant",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "meant@1.0.1",
+ "raw": "meant@1.0.2",
"name": "meant",
"escapedName": "meant",
- "rawSpec": "1.0.1",
+ "rawSpec": "1.0.2",
"saveSpec": null,
- "fetchSpec": "1.0.1"
+ "fetchSpec": "1.0.2"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/meant/-/meant-1.0.1.tgz",
- "_spec": "1.0.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/meant/-/meant-1.0.2.tgz",
+ "_shasum": "5d0c78310a3d8ae1408a16be0fe0bd42a969f560",
+ "_spec": "meant@1.0.2",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/latest",
"author": {
"name": "Daijiro Wachi"
},
"bugs": {
"url": "https://github.com/watilde/meant/issues"
},
+ "bundleDependencies": false,
+ "deprecated": false,
"description": "Like the `Did you mean?` in git for npm",
"devDependencies": {
- "standard": "^8.0.0",
- "standard-version": "^2.4.0",
- "tap": "^7.1.1"
+ "standard": "^11.0.1",
+ "standard-version": "^8.0.1",
+ "tap": "^12.7.0"
},
"homepage": "https://github.com/watilde/meant#readme",
"keywords": [
@@ -54,5 +52,5 @@
"release": "standard-version",
"test": "standard && tap test.js"
},
- "version": "1.0.1"
+ "version": "1.0.2"
}
diff --git a/node_modules/mem/index.d.ts b/node_modules/mem/index.d.ts
deleted file mode 100644
index 786625520b203..0000000000000
--- a/node_modules/mem/index.d.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-declare namespace mem {
- interface CacheStorage {
- has(key: KeyType): boolean;
- get(key: KeyType): ValueType | undefined;
- set(key: KeyType, value: ValueType): void;
- delete(key: KeyType): void;
- clear?: () => void;
- }
-
- interface Options<
- ArgumentsType extends unknown[],
- CacheKeyType extends unknown,
- ReturnType extends unknown
- > {
- /**
- Milliseconds until the cache expires.
-
- @default Infinity
- */
- readonly maxAge?: number;
-
- /**
- Determines the cache key for storing the result based on the function arguments. By default, if there's only one argument and it's a [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive), it's used directly as a key, otherwise it's all the function arguments JSON stringified as an array.
-
- You could for example change it to only cache on the first argument `x => JSON.stringify(x)`.
- */
- readonly cacheKey?: (...arguments: ArgumentsType) => CacheKeyType;
-
- /**
- Use a different cache storage. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache.
-
- @default new Map()
- */
- readonly cache?: CacheStorage;
-
- /**
- Cache rejected promises.
-
- @default false
- */
- readonly cachePromiseRejection?: boolean;
- }
-}
-
-declare const mem: {
- /**
- [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input.
-
- @param fn - Function to be memoized.
-
- @example
- ```
- import mem = require('mem');
-
- let i = 0;
- const counter = () => ++i;
- const memoized = mem(counter);
-
- memoized('foo');
- //=> 1
-
- // Cached as it's the same arguments
- memoized('foo');
- //=> 1
-
- // Not cached anymore as the arguments changed
- memoized('bar');
- //=> 2
-
- memoized('bar');
- //=> 2
- ```
- */
- <
- ArgumentsType extends unknown[],
- ReturnType extends unknown,
- CacheKeyType extends unknown
- >(
- fn: (...arguments: ArgumentsType) => ReturnType,
- options?: mem.Options
- ): (...arguments: ArgumentsType) => ReturnType;
-
- /**
- Clear all cached data of a memoized function.
-
- @param fn - Memoized function.
- */
- clear(
- fn: (...arguments: ArgumentsType) => ReturnType
- ): void;
-
- // TODO: Remove this for the next major release
- default: typeof mem;
-};
-
-export = mem;
diff --git a/node_modules/mem/index.js b/node_modules/mem/index.js
deleted file mode 100644
index 51faf012c2fc4..0000000000000
--- a/node_modules/mem/index.js
+++ /dev/null
@@ -1,88 +0,0 @@
-'use strict';
-const mimicFn = require('mimic-fn');
-const isPromise = require('p-is-promise');
-const mapAgeCleaner = require('map-age-cleaner');
-
-const cacheStore = new WeakMap();
-
-const defaultCacheKey = (...arguments_) => {
- if (arguments_.length === 0) {
- return '__defaultKey';
- }
-
- if (arguments_.length === 1) {
- const [firstArgument] = arguments_;
- if (
- firstArgument === null ||
- firstArgument === undefined ||
- (typeof firstArgument !== 'function' && typeof firstArgument !== 'object')
- ) {
- return firstArgument;
- }
- }
-
- return JSON.stringify(arguments_);
-};
-
-const mem = (fn, options) => {
- options = Object.assign({
- cacheKey: defaultCacheKey,
- cache: new Map(),
- cachePromiseRejection: false
- }, options);
-
- if (typeof options.maxAge === 'number') {
- mapAgeCleaner(options.cache);
- }
-
- const {cache} = options;
- options.maxAge = options.maxAge || 0;
-
- const setData = (key, data) => {
- cache.set(key, {
- data,
- maxAge: Date.now() + options.maxAge
- });
- };
-
- const memoized = function (...arguments_) {
- const key = options.cacheKey(...arguments_);
-
- if (cache.has(key)) {
- return cache.get(key).data;
- }
-
- const cacheItem = fn.call(this, ...arguments_);
-
- setData(key, cacheItem);
-
- if (isPromise(cacheItem) && options.cachePromiseRejection === false) {
- // Remove rejected promises from cache unless `cachePromiseRejection` is set to `true`
- cacheItem.catch(() => cache.delete(key));
- }
-
- return cacheItem;
- };
-
- try {
- // The below call will throw in some host environments
- // See https://github.com/sindresorhus/mimic-fn/issues/10
- mimicFn(memoized, fn);
- } catch (_) {}
-
- cacheStore.set(memoized, options.cache);
-
- return memoized;
-};
-
-module.exports = mem;
-// TODO: Remove this for the next major release
-module.exports.default = mem;
-
-module.exports.clear = fn => {
- const cache = cacheStore.get(fn);
-
- if (cache && typeof cache.clear === 'function') {
- cache.clear();
- }
-};
diff --git a/node_modules/mem/node_modules/mimic-fn/index.d.ts b/node_modules/mem/node_modules/mimic-fn/index.d.ts
deleted file mode 100644
index b4047d58902eb..0000000000000
--- a/node_modules/mem/node_modules/mimic-fn/index.d.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-declare const mimicFn: {
- /**
- Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
-
- @param to - Mimicking function.
- @param from - Function to mimic.
- @returns The modified `to` function.
-
- @example
- ```
- import mimicFn = require('mimic-fn');
-
- function foo() {}
- foo.unicorn = '๐ฆ';
-
- function wrapper() {
- return foo();
- }
-
- console.log(wrapper.name);
- //=> 'wrapper'
-
- mimicFn(wrapper, foo);
-
- console.log(wrapper.name);
- //=> 'foo'
-
- console.log(wrapper.unicorn);
- //=> '๐ฆ'
- ```
- */
- <
- ArgumentsType extends unknown[],
- ReturnType,
- FunctionType extends (...arguments: ArgumentsType) => ReturnType
- >(
- to: (...arguments: ArgumentsType) => ReturnType,
- from: FunctionType
- ): FunctionType;
-
- // TODO: Remove this for the next major release, refactor the whole definition to:
- // declare function mimicFn<
- // ArgumentsType extends unknown[],
- // ReturnType,
- // FunctionType extends (...arguments: ArgumentsType) => ReturnType
- // >(
- // to: (...arguments: ArgumentsType) => ReturnType,
- // from: FunctionType
- // ): FunctionType;
- // export = mimicFn;
- default: typeof mimicFn;
-};
-
-export = mimicFn;
diff --git a/node_modules/mem/node_modules/mimic-fn/index.js b/node_modules/mem/node_modules/mimic-fn/index.js
deleted file mode 100644
index 1a597051750da..0000000000000
--- a/node_modules/mem/node_modules/mimic-fn/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-const mimicFn = (to, from) => {
- for (const prop of Reflect.ownKeys(from)) {
- Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
- }
-
- return to;
-};
-
-module.exports = mimicFn;
-// TODO: Remove this for the next major release
-module.exports.default = mimicFn;
diff --git a/node_modules/mem/node_modules/mimic-fn/package.json b/node_modules/mem/node_modules/mimic-fn/package.json
deleted file mode 100644
index b4970a28d40c8..0000000000000
--- a/node_modules/mem/node_modules/mimic-fn/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "_from": "mimic-fn@^2.0.0",
- "_id": "mimic-fn@2.1.0",
- "_inBundle": false,
- "_integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "_location": "/mem/mimic-fn",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mimic-fn@^2.0.0",
- "name": "mimic-fn",
- "escapedName": "mimic-fn",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/mem"
- ],
- "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "_shasum": "7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b",
- "_spec": "mimic-fn@^2.0.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/mem",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/mimic-fn/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Make a function mimic another one",
- "devDependencies": {
- "ava": "^1.4.1",
- "tsd": "^0.7.1",
- "xo": "^0.24.0"
- },
- "engines": {
- "node": ">=6"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "homepage": "https://github.com/sindresorhus/mimic-fn#readme",
- "keywords": [
- "function",
- "mimic",
- "imitate",
- "rename",
- "copy",
- "inherit",
- "properties",
- "name",
- "func",
- "fn",
- "set",
- "infer",
- "change"
- ],
- "license": "MIT",
- "name": "mimic-fn",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/mimic-fn.git"
- },
- "scripts": {
- "test": "xo && ava && tsd"
- },
- "version": "2.1.0"
-}
diff --git a/node_modules/mem/node_modules/mimic-fn/readme.md b/node_modules/mem/node_modules/mimic-fn/readme.md
deleted file mode 100644
index 0ef8a13d7e0d9..0000000000000
--- a/node_modules/mem/node_modules/mimic-fn/readme.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# mimic-fn [](https://travis-ci.org/sindresorhus/mimic-fn)
-
-> Make a function mimic another one
-
-Useful when you wrap a function in another function and like to preserve the original name and other properties.
-
-
-## Install
-
-```
-$ npm install mimic-fn
-```
-
-
-## Usage
-
-```js
-const mimicFn = require('mimic-fn');
-
-function foo() {}
-foo.unicorn = '๐ฆ';
-
-function wrapper() {
- return foo();
-}
-
-console.log(wrapper.name);
-//=> 'wrapper'
-
-mimicFn(wrapper, foo);
-
-console.log(wrapper.name);
-//=> 'foo'
-
-console.log(wrapper.unicorn);
-//=> '๐ฆ'
-```
-
-
-## API
-
-It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
-
-### mimicFn(to, from)
-
-Modifies the `to` function and returns it.
-
-#### to
-
-Type: `Function`
-
-Mimicking function.
-
-#### from
-
-Type: `Function`
-
-Function to mimic.
-
-
-## Related
-
-- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
-- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
-
-
-## License
-
-MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/mem/package.json b/node_modules/mem/package.json
deleted file mode 100644
index eedf07469c4c3..0000000000000
--- a/node_modules/mem/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "_from": "mem@^4.0.0",
- "_id": "mem@4.3.0",
- "_inBundle": false,
- "_integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
- "_location": "/mem",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mem@^4.0.0",
- "name": "mem",
- "escapedName": "mem",
- "rawSpec": "^4.0.0",
- "saveSpec": null,
- "fetchSpec": "^4.0.0"
- },
- "_requiredBy": [
- "/os-locale"
- ],
- "_resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
- "_shasum": "461af497bc4ae09608cdb2e60eefb69bff744178",
- "_spec": "mem@^4.0.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/mem/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "map-age-cleaner": "^0.1.1",
- "mimic-fn": "^2.0.0",
- "p-is-promise": "^2.0.0"
- },
- "deprecated": false,
- "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
- "devDependencies": {
- "ava": "^1.4.1",
- "delay": "^4.1.0",
- "tsd": "^0.7.1",
- "xo": "^0.24.0"
- },
- "engines": {
- "node": ">=6"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "homepage": "https://github.com/sindresorhus/mem#readme",
- "keywords": [
- "memoize",
- "function",
- "mem",
- "memoization",
- "cache",
- "caching",
- "optimize",
- "performance",
- "ttl",
- "expire",
- "promise"
- ],
- "license": "MIT",
- "name": "mem",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/mem.git"
- },
- "scripts": {
- "test": "xo && ava && tsd"
- },
- "version": "4.3.0"
-}
diff --git a/node_modules/mem/readme.md b/node_modules/mem/readme.md
deleted file mode 100644
index add4222b62d71..0000000000000
--- a/node_modules/mem/readme.md
+++ /dev/null
@@ -1,167 +0,0 @@
-# mem [](https://travis-ci.org/sindresorhus/mem)
-
-> [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input
-
-Memory is automatically released when an item expires.
-
-
-## Install
-
-```
-$ npm install mem
-```
-
-
-## Usage
-
-```js
-const mem = require('mem');
-
-let i = 0;
-const counter = () => ++i;
-const memoized = mem(counter);
-
-memoized('foo');
-//=> 1
-
-// Cached as it's the same arguments
-memoized('foo');
-//=> 1
-
-// Not cached anymore as the arguments changed
-memoized('bar');
-//=> 2
-
-memoized('bar');
-//=> 2
-```
-
-##### Works fine with promise returning functions
-
-```js
-const mem = require('mem');
-
-let i = 0;
-const counter = async () => ++i;
-const memoized = mem(counter);
-
-(async () => {
- console.log(await memoized());
- //=> 1
-
- // The return value didn't increase as it's cached
- console.log(await memoized());
- //=> 1
-})();
-```
-
-```js
-const mem = require('mem');
-const got = require('got');
-const delay = require('delay');
-
-const memGot = mem(got, {maxAge: 1000});
-
-(async () => {
- await memGot('sindresorhus.com');
-
- // This call is cached
- await memGot('sindresorhus.com');
-
- await delay(2000);
-
- // This call is not cached as the cache has expired
- await memGot('sindresorhus.com');
-})();
-```
-
-
-## API
-
-### mem(fn, [options])
-
-#### fn
-
-Type: `Function`
-
-Function to be memoized.
-
-#### options
-
-Type: `Object`
-
-##### maxAge
-
-Type: `number`
-Default: `Infinity`
-
-Milliseconds until the cache expires.
-
-##### cacheKey
-
-Type: `Function`
-
-Determines the cache key for storing the result based on the function arguments. By default, if there's only one argument and it's a [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive), it's used directly as a key, otherwise it's all the function arguments JSON stringified as an array.
-
-You could for example change it to only cache on the first argument `x => JSON.stringify(x)`.
-
-##### cache
-
-Type: `Object`
-Default: `new Map()`
-
-Use a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, `.delete(key)`, and optionally `.clear()`. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache.
-
-##### cachePromiseRejection
-
-Type: `boolean`
-Default: `false`
-
-Cache rejected promises.
-
-### mem.clear(fn)
-
-Clear all cached data of a memoized function.
-
-#### fn
-
-Type: `Function`
-
-Memoized function.
-
-
-## Tips
-
-### Cache statistics
-
-If you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache.
-
-#### Example
-
-```js
-const mem = require('mem');
-const StatsMap = require('stats-map');
-const got = require('got');
-
-const cache = new StatsMap();
-const memGot = mem(got, {cache});
-
-(async () => {
- await memGot('sindresorhus.com');
- await memGot('sindresorhus.com');
- await memGot('sindresorhus.com');
-
- console.log(cache.stats);
- //=> {hits: 2, misses: 1}
-})();
-```
-
-
-## Related
-
-- [p-memoize](https://github.com/sindresorhus/p-memoize) - Memoize promise-returning & async functions
-
-
-## License
-
-MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml
index cc4dba29d959a..74c57bf15e239 100644
--- a/node_modules/minimist/.travis.yml
+++ b/node_modules/minimist/.travis.yml
@@ -2,3 +2,7 @@ language: node_js
node_js:
- "0.8"
- "0.10"
+ - "0.12"
+ - "iojs"
+before_install:
+ - npm install -g npm@~1.4.6
diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js
index abff3e8ee8f5e..f7c8d49807f32 100644
--- a/node_modules/minimist/example/parse.js
+++ b/node_modules/minimist/example/parse.js
@@ -1,2 +1,2 @@
var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
+console.log(argv);
diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js
index 584f551a6da73..d2afe5e4d4056 100644
--- a/node_modules/minimist/index.js
+++ b/node_modules/minimist/index.js
@@ -1,15 +1,19 @@
module.exports = function (args, opts) {
if (!opts) opts = {};
- var flags = { bools : {}, strings : {} };
-
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- });
+ var flags = { bools : {}, strings : {}, unknownFn: null };
+
+ if (typeof opts['unknown'] === 'function') {
+ flags.unknownFn = opts['unknown'];
+ }
+
+ if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
+ flags.allBools = true;
+ } else {
+ [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ });
+ }
var aliases = {};
Object.keys(opts.alias || {}).forEach(function (key) {
@@ -20,7 +24,14 @@ module.exports = function (args, opts) {
}));
});
});
-
+
+ [].concat(opts.string).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ if (aliases[key]) {
+ flags.strings[aliases[key]] = true;
+ }
+ });
+
var defaults = opts['default'] || {};
var argv = { _ : [] };
@@ -35,7 +46,16 @@ module.exports = function (args, opts) {
args = args.slice(0, args.indexOf('--'));
}
- function setArg (key, val) {
+ function argDefined(key, arg) {
+ return (flags.allBools && /^--[^=]+$/.test(arg)) ||
+ flags.strings[key] || flags.bools[key] || aliases[key];
+ }
+
+ function setArg (key, val, arg) {
+ if (arg && flags.unknownFn && !argDefined(key, arg)) {
+ if (flags.unknownFn(arg) === false) return;
+ }
+
var value = !flags.strings[key] && isNumber(val)
? Number(val) : val
;
@@ -45,7 +65,41 @@ module.exports = function (args, opts) {
setKey(argv, x.split('.'), value);
});
}
+
+ function setKey (obj, keys, value) {
+ var o = obj;
+ for (var i = 0; i < keys.length-1; i++) {
+ var key = keys[i];
+ if (key === '__proto__') return;
+ if (o[key] === undefined) o[key] = {};
+ if (o[key] === Object.prototype || o[key] === Number.prototype
+ || o[key] === String.prototype) o[key] = {};
+ if (o[key] === Array.prototype) o[key] = [];
+ o = o[key];
+ }
+
+ var key = keys[keys.length - 1];
+ if (key === '__proto__') return;
+ if (o === Object.prototype || o === Number.prototype
+ || o === String.prototype) o = {};
+ if (o === Array.prototype) o = [];
+ if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
+ o[key] = value;
+ }
+ else if (Array.isArray(o[key])) {
+ o[key].push(value);
+ }
+ else {
+ o[key] = [ o[key], value ];
+ }
+ }
+ function aliasIsBoolean(key) {
+ return aliases[key].some(function (x) {
+ return flags.bools[x];
+ });
+ }
+
for (var i = 0; i < args.length; i++) {
var arg = args[i];
@@ -54,27 +108,33 @@ module.exports = function (args, opts) {
// 'dotall' regex modifier. See:
// http://stackoverflow.com/a/1068308/13216
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
+ var key = m[1];
+ var value = m[2];
+ if (flags.bools[key]) {
+ value = value !== 'false';
+ }
+ setArg(key, value, arg);
}
else if (/^--no-.+/.test(arg)) {
var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
+ setArg(key, false, arg);
}
else if (/^--.+/.test(arg)) {
var key = arg.match(/^--(.+)/)[1];
var next = args[i + 1];
if (next !== undefined && !/^-/.test(next)
&& !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
+ && !flags.allBools
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, next, arg);
i++;
}
else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
+ setArg(key, next === 'true', arg);
i++;
}
else {
- setArg(key, flags.strings[key] ? '' : true);
+ setArg(key, flags.strings[key] ? '' : true, arg);
}
}
else if (/^-[^-]+/.test(arg)) {
@@ -85,24 +145,30 @@ module.exports = function (args, opts) {
var next = arg.slice(j+2);
if (next === '-') {
- setArg(letters[j], next)
+ setArg(letters[j], next, arg)
continue;
}
+ if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
+ setArg(letters[j], next.split('=')[1], arg);
+ broken = true;
+ break;
+ }
+
if (/[A-Za-z]/.test(letters[j])
&& /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
+ setArg(letters[j], next, arg);
broken = true;
break;
}
if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
+ setArg(letters[j], arg.slice(j+2), arg);
broken = true;
break;
}
else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
+ setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
}
}
@@ -110,23 +176,29 @@ module.exports = function (args, opts) {
if (!broken && key !== '-') {
if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
&& !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, args[i+1], arg);
i++;
}
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
+ else if (args[i+1] && /^(true|false)$/.test(args[i+1])) {
+ setArg(key, args[i+1] === 'true', arg);
i++;
}
else {
- setArg(key, flags.strings[key] ? '' : true);
+ setArg(key, flags.strings[key] ? '' : true, arg);
}
}
}
else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
+ if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
+ argv._.push(
+ flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+ );
+ }
+ if (opts.stopEarly) {
+ argv._.push.apply(argv._, args.slice(i + 1));
+ break;
+ }
}
}
@@ -140,9 +212,17 @@ module.exports = function (args, opts) {
}
});
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
+ if (opts['--']) {
+ argv['--'] = new Array();
+ notFlags.forEach(function(key) {
+ argv['--'].push(key);
+ });
+ }
+ else {
+ notFlags.forEach(function(key) {
+ argv._.push(key);
+ });
+ }
return argv;
};
@@ -157,31 +237,9 @@ function hasKey (obj, keys) {
return key in o;
}
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
function isNumber (x) {
if (typeof x === 'number') return true;
if (/^0x[0-9a-f]+$/i.test(x)) return true;
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
}
-function longest (xs) {
- return Math.max.apply(null, xs.map(function (x) { return x.length }));
-}
diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json
index 0a1961342b71b..502b798942f81 100644
--- a/node_modules/minimist/package.json
+++ b/node_modules/minimist/package.json
@@ -1,27 +1,27 @@
{
- "_from": "minimist@0.0.8",
- "_id": "minimist@0.0.8",
+ "_from": "minimist@^1.2.0",
+ "_id": "minimist@1.2.5",
"_inBundle": false,
- "_integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"_location": "/minimist",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "minimist@0.0.8",
+ "raw": "minimist@^1.2.0",
"name": "minimist",
"escapedName": "minimist",
- "rawSpec": "0.0.8",
+ "rawSpec": "^1.2.0",
"saveSpec": null,
- "fetchSpec": "0.0.8"
+ "fetchSpec": "^1.2.0"
},
"_requiredBy": [
- "/mkdirp"
+ "/rc"
],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "_spec": "minimist@0.0.8",
- "_where": "/Users/rebecca/code/npm/node_modules/mkdirp",
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "_shasum": "67d66014b66a6a8aaa0c083c5fd58df4e4e97602",
+ "_spec": "minimist@^1.2.0",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/latest/node_modules/rc",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
@@ -34,8 +34,9 @@
"deprecated": false,
"description": "parse argument options",
"devDependencies": {
+ "covert": "^1.0.0",
"tap": "~0.4.0",
- "tape": "~1.0.4"
+ "tape": "^3.5.0"
},
"homepage": "https://github.com/substack/minimist",
"keywords": [
@@ -52,6 +53,7 @@
"url": "git://github.com/substack/minimist.git"
},
"scripts": {
+ "coverage": "covert test/*.js",
"test": "tap test/*.js"
},
"testling": {
@@ -67,5 +69,5 @@
"opera/12"
]
},
- "version": "0.0.8"
+ "version": "1.2.5"
}
diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown
index c25635323e166..5fd97ab11ee9d 100644
--- a/node_modules/minimist/readme.markdown
+++ b/node_modules/minimist/readme.markdown
@@ -5,15 +5,11 @@ parse argument options
This module is the guts of optimist's argument parser without all the
fanciful decoration.
-[](http://ci.testling.com/substack/minimist)
-
-[](http://travis-ci.org/substack/minimist)
-
# example
``` js
var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
+console.log(argv);
```
```
@@ -33,6 +29,13 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
beep: 'boop' }
```
+# security
+
+Previous versions had a prototype pollution bug that could cause privilege
+escalation in some circumstances when handling untrusted user input.
+
+Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764
+
# methods
``` js
@@ -55,10 +58,29 @@ options can be:
* `opts.string` - a string or array of strings argument names to always treat as
strings
-* `opts.boolean` - a string or array of strings to always treat as booleans
+* `opts.boolean` - a boolean, string or array of strings to always treat as
+booleans. if `true` will treat all double hyphenated arguments without equal signs
+as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
* `opts.alias` - an object mapping string names to strings or arrays of string
argument names to use as aliases
* `opts.default` - an object mapping string argument names to default values
+* `opts.stopEarly` - when true, populate `argv._` with everything after the
+first non-option
+* `opts['--']` - when true, populate `argv._` with everything before the `--`
+and `argv['--']` with everything after the `--`. Here's an example:
+
+ ```
+ > require('./')('one two three -- four five --six'.split(' '), { '--': true })
+ { _: [ 'one', 'two', 'three' ],
+ '--': [ 'four', 'five', '--six' ] }
+ ```
+
+ Note that with `opts['--']` set, parsing for arguments still stops after the
+ `--`.
+
+* `opts.unknown` - a function which is invoked with a command line parameter not
+defined in the `opts` configuration object. If the function returns `false`, the
+unknown option is not added to `argv`.
# install
diff --git a/node_modules/rc/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/all_bool.js
rename to node_modules/minimist/test/all_bool.js
diff --git a/node_modules/rc/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js
similarity index 93%
rename from node_modules/rc/node_modules/minimist/test/bool.js
rename to node_modules/minimist/test/bool.js
index 14b0717cefd5e..5f7dbde16cc91 100644
--- a/node_modules/rc/node_modules/minimist/test/bool.js
+++ b/node_modules/minimist/test/bool.js
@@ -164,3 +164,15 @@ test('boolean --boool=false', function (t) {
t.same(parsed.boool, false);
t.end();
});
+
+test('boolean using something similar to true', function (t) {
+ var opts = { boolean: 'h' };
+ var result = parse(['-h', 'true.txt'], opts);
+ var expected = {
+ h: true,
+ '_': ['true.txt']
+ };
+
+ t.same(result, expected);
+ t.end();
+});
\ No newline at end of file
diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js
index 8b034b99a9eac..5a4fa5be41859 100644
--- a/node_modules/minimist/test/dash.js
+++ b/node_modules/minimist/test/dash.js
@@ -22,3 +22,10 @@ test('-a -- b', function (t) {
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
});
+
+test('move arguments after the -- into their own `--` array', function(t) {
+ t.plan(1);
+ t.deepEqual(
+ parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }),
+ { name: 'John', _: [ 'before' ], '--': [ 'after' ] });
+});
diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js
index f0041ee40cd05..780a311270fcd 100644
--- a/node_modules/minimist/test/default_bool.js
+++ b/node_modules/minimist/test/default_bool.js
@@ -18,3 +18,18 @@ test('boolean default false', function (t) {
t.equal(argv.somefalse, false);
t.end();
});
+
+test('boolean default to null', function (t) {
+ var argv = parse([], {
+ boolean: 'maybe',
+ default: { maybe: null }
+ });
+ t.equal(argv.maybe, null);
+ var argv = parse(['--maybe'], {
+ boolean: 'maybe',
+ default: { maybe: null }
+ });
+ t.equal(argv.maybe, true);
+ t.end();
+
+})
diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js
index ef0ae349bf3bf..d8b3e856ec795 100644
--- a/node_modules/minimist/test/dotted.js
+++ b/node_modules/minimist/test/dotted.js
@@ -14,3 +14,9 @@ test('dotted default', function (t) {
t.equal(argv.aa.bb, 11);
t.end();
});
+
+test('dotted default with no alias', function (t) {
+ var argv = parse('', {default: {'a.b': 11}});
+ t.equal(argv.a.b, 11);
+ t.end();
+});
diff --git a/node_modules/rc/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/kv_short.js
rename to node_modules/minimist/test/kv_short.js
diff --git a/node_modules/rc/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/num.js
rename to node_modules/minimist/test/num.js
diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js
index 8a90646696628..7b4a2a17c0dda 100644
--- a/node_modules/minimist/test/parse.js
+++ b/node_modules/minimist/test/parse.js
@@ -42,32 +42,6 @@ test('comprehensive', function (t) {
t.end();
});
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
test('flag boolean', function (t) {
var argv = parse([ '-t', 'moo' ], { boolean: 't' });
t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
@@ -92,42 +66,6 @@ test('flag boolean value', function (t) {
t.end();
});
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-
test('newlines in params' , function (t) {
var args = parse([ '-s', "X\nX" ])
t.deepEqual(args, { _ : [], s : "X\nX" });
@@ -183,6 +121,29 @@ test('empty strings', function(t) {
});
+test('string and alias', function(t) {
+ var x = parse([ '--str', '000123' ], {
+ string: 's',
+ alias: { s: 'str' }
+ });
+
+ t.equal(x.str, '000123');
+ t.equal(typeof x.str, 'string');
+ t.equal(x.s, '000123');
+ t.equal(typeof x.s, 'string');
+
+ var y = parse([ '-s', '000123' ], {
+ string: 'str',
+ alias: { str: 's' }
+ });
+
+ t.equal(y.str, '000123');
+ t.equal(typeof y.str, 'string');
+ t.equal(y.s, '000123');
+ t.equal(typeof y.s, 'string');
+ t.end();
+});
+
test('slashBreak', function (t) {
t.same(
parse([ '-I/foo/bar/baz' ]),
@@ -234,85 +195,3 @@ test('nested dotted objects', function (t) {
t.same(argv.beep, { boop : true });
t.end();
});
-
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js
index 21851b036ee6d..ab620dc5e4dc3 100644
--- a/node_modules/minimist/test/parse_modified.js
+++ b/node_modules/minimist/test/parse_modified.js
@@ -5,5 +5,5 @@ test('parse with modifier functions' , function (t) {
t.plan(1);
var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
+ t.deepEqual(argv, { b: true, _: [123] });
});
diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js
new file mode 100644
index 0000000000000..8649107ecba1f
--- /dev/null
+++ b/node_modules/minimist/test/proto.js
@@ -0,0 +1,44 @@
+var parse = require('../');
+var test = require('tape');
+
+test('proto pollution', function (t) {
+ var argv = parse(['--__proto__.x','123']);
+ t.equal({}.x, undefined);
+ t.equal(argv.__proto__.x, undefined);
+ t.equal(argv.x, undefined);
+ t.end();
+});
+
+test('proto pollution (array)', function (t) {
+ var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']);
+ t.equal({}.z, undefined);
+ t.deepEqual(argv.x, [4,5]);
+ t.equal(argv.x.z, undefined);
+ t.equal(argv.x.__proto__.z, undefined);
+ t.end();
+});
+
+test('proto pollution (number)', function (t) {
+ var argv = parse(['--x','5','--x.__proto__.z','100']);
+ t.equal({}.z, undefined);
+ t.equal((4).z, undefined);
+ t.equal(argv.x, 5);
+ t.equal(argv.x.z, undefined);
+ t.end();
+});
+
+test('proto pollution (string)', function (t) {
+ var argv = parse(['--x','abc','--x.__proto__.z','def']);
+ t.equal({}.z, undefined);
+ t.equal('...'.z, undefined);
+ t.equal(argv.x, 'abc');
+ t.equal(argv.x.z, undefined);
+ t.end();
+});
+
+test('proto pollution (constructor)', function (t) {
+ var argv = parse(['--constructor.prototype.y','123']);
+ t.equal({}.y, undefined);
+ t.equal(argv.y, undefined);
+ t.end();
+});
diff --git a/node_modules/rc/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/stop_early.js
rename to node_modules/minimist/test/stop_early.js
diff --git a/node_modules/rc/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/unknown.js
rename to node_modules/minimist/test/unknown.js
diff --git a/node_modules/mkdirp/README.markdown b/node_modules/mkdirp/README.markdown
index 3cc1315385116..fc314bfbd662c 100644
--- a/node_modules/mkdirp/README.markdown
+++ b/node_modules/mkdirp/README.markdown
@@ -37,7 +37,7 @@ Create a new directory and any necessary subdirectories at `dir` with octal
permission string `opts.mode`. If `opts` is a non-object, it will be treated as
the `opts.mode`.
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+If `opts.mode` isn't specified, it defaults to `0777`.
`cb(err, made)` fires with the error or the first directory `made`
that had to be created, if any.
@@ -52,7 +52,7 @@ Synchronously create a new directory and any necessary subdirectories at `dir`
with octal permission string `opts.mode`. If `opts` is a non-object, it will be
treated as the `opts.mode`.
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+If `opts.mode` isn't specified, it defaults to `0777`.
Returns the first directory that had to be created, if any.
diff --git a/node_modules/mkdirp/examples/pow.js b/node_modules/mkdirp/examples/pow.js
deleted file mode 100644
index e6924212e6a24..0000000000000
--- a/node_modules/mkdirp/examples/pow.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js
index 6ce241b58c100..468d7cd8df53b 100644
--- a/node_modules/mkdirp/index.js
+++ b/node_modules/mkdirp/index.js
@@ -17,7 +17,7 @@ function mkdirP (p, opts, f, made) {
var xfs = opts.fs || fs;
if (mode === undefined) {
- mode = _0777 & (~process.umask());
+ mode = _0777
}
if (!made) made = null;
@@ -31,6 +31,7 @@ function mkdirP (p, opts, f, made) {
}
switch (er.code) {
case 'ENOENT':
+ if (path.dirname(p) === p) return cb(er);
mkdirP(path.dirname(p), opts, function (er, made) {
if (er) cb(er, made);
else mkdirP(p, opts, cb, made);
@@ -61,7 +62,7 @@ mkdirP.sync = function sync (p, opts, made) {
var xfs = opts.fs || fs;
if (mode === undefined) {
- mode = _0777 & (~process.umask());
+ mode = _0777
}
if (!made) made = null;
diff --git a/node_modules/mkdirp/.travis.yml b/node_modules/mkdirp/node_modules/minimist/.travis.yml
similarity index 100%
rename from node_modules/mkdirp/.travis.yml
rename to node_modules/mkdirp/node_modules/minimist/.travis.yml
diff --git a/node_modules/rc/node_modules/minimist/LICENSE b/node_modules/mkdirp/node_modules/minimist/LICENSE
similarity index 100%
rename from node_modules/rc/node_modules/minimist/LICENSE
rename to node_modules/mkdirp/node_modules/minimist/LICENSE
diff --git a/node_modules/rc/node_modules/minimist/example/parse.js b/node_modules/mkdirp/node_modules/minimist/example/parse.js
similarity index 72%
rename from node_modules/rc/node_modules/minimist/example/parse.js
rename to node_modules/mkdirp/node_modules/minimist/example/parse.js
index abff3e8ee8f5e..f7c8d49807f32 100644
--- a/node_modules/rc/node_modules/minimist/example/parse.js
+++ b/node_modules/mkdirp/node_modules/minimist/example/parse.js
@@ -1,2 +1,2 @@
var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
+console.log(argv);
diff --git a/node_modules/rc/node_modules/minimist/index.js b/node_modules/mkdirp/node_modules/minimist/index.js
similarity index 92%
rename from node_modules/rc/node_modules/minimist/index.js
rename to node_modules/mkdirp/node_modules/minimist/index.js
index 6a0559d58133a..d2afe5e4d4056 100644
--- a/node_modules/rc/node_modules/minimist/index.js
+++ b/node_modules/mkdirp/node_modules/minimist/index.js
@@ -68,12 +68,21 @@ module.exports = function (args, opts) {
function setKey (obj, keys, value) {
var o = obj;
- keys.slice(0,-1).forEach(function (key) {
+ for (var i = 0; i < keys.length-1; i++) {
+ var key = keys[i];
+ if (key === '__proto__') return;
if (o[key] === undefined) o[key] = {};
+ if (o[key] === Object.prototype || o[key] === Number.prototype
+ || o[key] === String.prototype) o[key] = {};
+ if (o[key] === Array.prototype) o[key] = [];
o = o[key];
- });
+ }
var key = keys[keys.length - 1];
+ if (key === '__proto__') return;
+ if (o === Object.prototype || o === Number.prototype
+ || o === String.prototype) o = {};
+ if (o === Array.prototype) o = [];
if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
o[key] = value;
}
@@ -171,7 +180,7 @@ module.exports = function (args, opts) {
setArg(key, args[i+1], arg);
i++;
}
- else if (args[i+1] && /true|false/.test(args[i+1])) {
+ else if (args[i+1] && /^(true|false)$/.test(args[i+1])) {
setArg(key, args[i+1] === 'true', arg);
i++;
}
diff --git a/node_modules/rc/node_modules/minimist/package.json b/node_modules/mkdirp/node_modules/minimist/package.json
similarity index 71%
rename from node_modules/rc/node_modules/minimist/package.json
rename to node_modules/mkdirp/node_modules/minimist/package.json
index e22b6fc47a309..2846f6885ae63 100644
--- a/node_modules/rc/node_modules/minimist/package.json
+++ b/node_modules/mkdirp/node_modules/minimist/package.json
@@ -1,27 +1,27 @@
{
- "_from": "minimist@^1.2.0",
- "_id": "minimist@1.2.0",
+ "_from": "minimist@^1.2.5",
+ "_id": "minimist@1.2.5",
"_inBundle": false,
- "_integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "_location": "/rc/minimist",
+ "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+ "_location": "/mkdirp/minimist",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "minimist@^1.2.0",
+ "raw": "minimist@^1.2.5",
"name": "minimist",
"escapedName": "minimist",
- "rawSpec": "^1.2.0",
+ "rawSpec": "^1.2.5",
"saveSpec": null,
- "fetchSpec": "^1.2.0"
+ "fetchSpec": "^1.2.5"
},
"_requiredBy": [
- "/rc"
+ "/mkdirp"
],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "_shasum": "a35008b20f41383eec1fb914f4cd5df79a264284",
- "_spec": "minimist@^1.2.0",
- "_where": "/Users/rebecca/code/npm/node_modules/rc",
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "_shasum": "67d66014b66a6a8aaa0c083c5fd58df4e4e97602",
+ "_spec": "minimist@^1.2.5",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/npm/cli/node_modules/mkdirp",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
@@ -69,5 +69,5 @@
"opera/12"
]
},
- "version": "1.2.0"
+ "version": "1.2.5"
}
diff --git a/node_modules/rc/node_modules/minimist/readme.markdown b/node_modules/mkdirp/node_modules/minimist/readme.markdown
similarity index 79%
rename from node_modules/rc/node_modules/minimist/readme.markdown
rename to node_modules/mkdirp/node_modules/minimist/readme.markdown
index 30a74cf8c158d..5fd97ab11ee9d 100644
--- a/node_modules/rc/node_modules/minimist/readme.markdown
+++ b/node_modules/mkdirp/node_modules/minimist/readme.markdown
@@ -5,15 +5,11 @@ parse argument options
This module is the guts of optimist's argument parser without all the
fanciful decoration.
-[](http://ci.testling.com/substack/minimist)
-
-[](http://travis-ci.org/substack/minimist)
-
# example
``` js
var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
+console.log(argv);
```
```
@@ -33,6 +29,13 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
beep: 'boop' }
```
+# security
+
+Previous versions had a prototype pollution bug that could cause privilege
+escalation in some circumstances when handling untrusted user input.
+
+Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764
+
# methods
``` js
@@ -65,19 +68,20 @@ argument names to use as aliases
first non-option
* `opts['--']` - when true, populate `argv._` with everything before the `--`
and `argv['--']` with everything after the `--`. Here's an example:
+
+ ```
+ > require('./')('one two three -- four five --six'.split(' '), { '--': true })
+ { _: [ 'one', 'two', 'three' ],
+ '--': [ 'four', 'five', '--six' ] }
+ ```
+
+ Note that with `opts['--']` set, parsing for arguments still stops after the
+ `--`.
+
* `opts.unknown` - a function which is invoked with a command line parameter not
defined in the `opts` configuration object. If the function returns `false`, the
unknown option is not added to `argv`.
-```
-> require('./')('one two three -- four five --six'.split(' '), { '--': true })
-{ _: [ 'one', 'two', 'three' ],
- '--': [ 'four', 'five', '--six' ] }
-```
-
-Note that with `opts['--']` set, parsing for arguments still stops after the
-`--`.
-
# install
With [npm](https://npmjs.org) do:
diff --git a/node_modules/mkdirp/node_modules/minimist/test/all_bool.js b/node_modules/mkdirp/node_modules/minimist/test/all_bool.js
new file mode 100644
index 0000000000000..ac835483d9a65
--- /dev/null
+++ b/node_modules/mkdirp/node_modules/minimist/test/all_bool.js
@@ -0,0 +1,32 @@
+var parse = require('../');
+var test = require('tape');
+
+test('flag boolean true (default all --args to boolean)', function (t) {
+ var argv = parse(['moo', '--honk', 'cow'], {
+ boolean: true
+ });
+
+ t.deepEqual(argv, {
+ honk: true,
+ _: ['moo', 'cow']
+ });
+
+ t.deepEqual(typeof argv.honk, 'boolean');
+ t.end();
+});
+
+test('flag boolean true only affects double hyphen arguments without equals signs', function (t) {
+ var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
+ boolean: true
+ });
+
+ t.deepEqual(argv, {
+ honk: true,
+ tacos: 'good',
+ p: 55,
+ _: ['moo', 'cow']
+ });
+
+ t.deepEqual(typeof argv.honk, 'boolean');
+ t.end();
+});
diff --git a/node_modules/mkdirp/node_modules/minimist/test/bool.js b/node_modules/mkdirp/node_modules/minimist/test/bool.js
new file mode 100644
index 0000000000000..5f7dbde16cc91
--- /dev/null
+++ b/node_modules/mkdirp/node_modules/minimist/test/bool.js
@@ -0,0 +1,178 @@
+var parse = require('../');
+var test = require('tape');
+
+test('flag boolean default false', function (t) {
+ var argv = parse(['moo'], {
+ boolean: ['t', 'verbose'],
+ default: { verbose: false, t: false }
+ });
+
+ t.deepEqual(argv, {
+ verbose: false,
+ t: false,
+ _: ['moo']
+ });
+
+ t.deepEqual(typeof argv.verbose, 'boolean');
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+
+});
+
+test('boolean groups', function (t) {
+ var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
+ boolean: ['x','y','z']
+ });
+
+ t.deepEqual(argv, {
+ x : true,
+ y : false,
+ z : true,
+ _ : [ 'one', 'two', 'three' ]
+ });
+
+ t.deepEqual(typeof argv.x, 'boolean');
+ t.deepEqual(typeof argv.y, 'boolean');
+ t.deepEqual(typeof argv.z, 'boolean');
+ t.end();
+});
+test('boolean and alias with chainable api', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ herp: { alias: 'h', boolean: true }
+ };
+ var aliasedArgv = parse(aliased, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var propertyArgv = parse(regular, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias with options hash', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ alias: { 'h': 'herp' },
+ boolean: 'herp'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias array with options hash', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var alt = [ '--harp', 'derp' ];
+ var opts = {
+ alias: { 'h': ['herp', 'harp'] },
+ boolean: 'h'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var altPropertyArgv = parse(alt, opts);
+ var expected = {
+ harp: true,
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.same(altPropertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias using explicit true', function (t) {
+ var aliased = [ '-h', 'true' ];
+ var regular = [ '--herp', 'true' ];
+ var opts = {
+ alias: { h: 'herp' },
+ boolean: 'h'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+// regression, see https://github.com/substack/node-optimist/issues/71
+test('boolean and --x=true', function(t) {
+ var parsed = parse(['--boool', '--other=true'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'true');
+
+ parsed = parse(['--boool', '--other=false'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'false');
+ t.end();
+});
+
+test('boolean --boool=true', function (t) {
+ var parsed = parse(['--boool=true'], {
+ default: {
+ boool: false
+ },
+ boolean: ['boool']
+ });
+
+ t.same(parsed.boool, true);
+ t.end();
+});
+
+test('boolean --boool=false', function (t) {
+ var parsed = parse(['--boool=false'], {
+ default: {
+ boool: true
+ },
+ boolean: ['boool']
+ });
+
+ t.same(parsed.boool, false);
+ t.end();
+});
+
+test('boolean using something similar to true', function (t) {
+ var opts = { boolean: 'h' };
+ var result = parse(['-h', 'true.txt'], opts);
+ var expected = {
+ h: true,
+ '_': ['true.txt']
+ };
+
+ t.same(result, expected);
+ t.end();
+});
\ No newline at end of file
diff --git a/node_modules/rc/node_modules/minimist/test/dash.js b/node_modules/mkdirp/node_modules/minimist/test/dash.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/dash.js
rename to node_modules/mkdirp/node_modules/minimist/test/dash.js
diff --git a/node_modules/rc/node_modules/minimist/test/default_bool.js b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/default_bool.js
rename to node_modules/mkdirp/node_modules/minimist/test/default_bool.js
diff --git a/node_modules/rc/node_modules/minimist/test/dotted.js b/node_modules/mkdirp/node_modules/minimist/test/dotted.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/dotted.js
rename to node_modules/mkdirp/node_modules/minimist/test/dotted.js
diff --git a/node_modules/mkdirp/node_modules/minimist/test/kv_short.js b/node_modules/mkdirp/node_modules/minimist/test/kv_short.js
new file mode 100644
index 0000000000000..f813b305057b0
--- /dev/null
+++ b/node_modules/mkdirp/node_modules/minimist/test/kv_short.js
@@ -0,0 +1,16 @@
+var parse = require('../');
+var test = require('tape');
+
+test('short -k=v' , function (t) {
+ t.plan(1);
+
+ var argv = parse([ '-b=123' ]);
+ t.deepEqual(argv, { b: 123, _: [] });
+});
+
+test('multi short -k=v' , function (t) {
+ t.plan(1);
+
+ var argv = parse([ '-a=whatever', '-b=robots' ]);
+ t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
+});
diff --git a/node_modules/rc/node_modules/minimist/test/long.js b/node_modules/mkdirp/node_modules/minimist/test/long.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/long.js
rename to node_modules/mkdirp/node_modules/minimist/test/long.js
diff --git a/node_modules/mkdirp/node_modules/minimist/test/num.js b/node_modules/mkdirp/node_modules/minimist/test/num.js
new file mode 100644
index 0000000000000..2cc77f4d62ffb
--- /dev/null
+++ b/node_modules/mkdirp/node_modules/minimist/test/num.js
@@ -0,0 +1,36 @@
+var parse = require('../');
+var test = require('tape');
+
+test('nums', function (t) {
+ var argv = parse([
+ '-x', '1234',
+ '-y', '5.67',
+ '-z', '1e7',
+ '-w', '10f',
+ '--hex', '0xdeadbeef',
+ '789'
+ ]);
+ t.deepEqual(argv, {
+ x : 1234,
+ y : 5.67,
+ z : 1e7,
+ w : '10f',
+ hex : 0xdeadbeef,
+ _ : [ 789 ]
+ });
+ t.deepEqual(typeof argv.x, 'number');
+ t.deepEqual(typeof argv.y, 'number');
+ t.deepEqual(typeof argv.z, 'number');
+ t.deepEqual(typeof argv.w, 'string');
+ t.deepEqual(typeof argv.hex, 'number');
+ t.deepEqual(typeof argv._[0], 'number');
+ t.end();
+});
+
+test('already a number', function (t) {
+ var argv = parse([ '-x', 1234, 789 ]);
+ t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
+ t.deepEqual(typeof argv.x, 'number');
+ t.deepEqual(typeof argv._[0], 'number');
+ t.end();
+});
diff --git a/node_modules/rc/node_modules/minimist/test/parse.js b/node_modules/mkdirp/node_modules/minimist/test/parse.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/parse.js
rename to node_modules/mkdirp/node_modules/minimist/test/parse.js
diff --git a/node_modules/rc/node_modules/minimist/test/parse_modified.js b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/parse_modified.js
rename to node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
diff --git a/node_modules/mkdirp/node_modules/minimist/test/proto.js b/node_modules/mkdirp/node_modules/minimist/test/proto.js
new file mode 100644
index 0000000000000..8649107ecba1f
--- /dev/null
+++ b/node_modules/mkdirp/node_modules/minimist/test/proto.js
@@ -0,0 +1,44 @@
+var parse = require('../');
+var test = require('tape');
+
+test('proto pollution', function (t) {
+ var argv = parse(['--__proto__.x','123']);
+ t.equal({}.x, undefined);
+ t.equal(argv.__proto__.x, undefined);
+ t.equal(argv.x, undefined);
+ t.end();
+});
+
+test('proto pollution (array)', function (t) {
+ var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']);
+ t.equal({}.z, undefined);
+ t.deepEqual(argv.x, [4,5]);
+ t.equal(argv.x.z, undefined);
+ t.equal(argv.x.__proto__.z, undefined);
+ t.end();
+});
+
+test('proto pollution (number)', function (t) {
+ var argv = parse(['--x','5','--x.__proto__.z','100']);
+ t.equal({}.z, undefined);
+ t.equal((4).z, undefined);
+ t.equal(argv.x, 5);
+ t.equal(argv.x.z, undefined);
+ t.end();
+});
+
+test('proto pollution (string)', function (t) {
+ var argv = parse(['--x','abc','--x.__proto__.z','def']);
+ t.equal({}.z, undefined);
+ t.equal('...'.z, undefined);
+ t.equal(argv.x, 'abc');
+ t.equal(argv.x.z, undefined);
+ t.end();
+});
+
+test('proto pollution (constructor)', function (t) {
+ var argv = parse(['--constructor.prototype.y','123']);
+ t.equal({}.y, undefined);
+ t.equal(argv.y, undefined);
+ t.end();
+});
diff --git a/node_modules/rc/node_modules/minimist/test/short.js b/node_modules/mkdirp/node_modules/minimist/test/short.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/short.js
rename to node_modules/mkdirp/node_modules/minimist/test/short.js
diff --git a/node_modules/mkdirp/node_modules/minimist/test/stop_early.js b/node_modules/mkdirp/node_modules/minimist/test/stop_early.js
new file mode 100644
index 0000000000000..bdf9fbcb0b57a
--- /dev/null
+++ b/node_modules/mkdirp/node_modules/minimist/test/stop_early.js
@@ -0,0 +1,15 @@
+var parse = require('../');
+var test = require('tape');
+
+test('stops parsing on the first non-option when stopEarly is set', function (t) {
+ var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
+ stopEarly: true
+ });
+
+ t.deepEqual(argv, {
+ aaa: 'bbb',
+ _: ['ccc', '--ddd']
+ });
+
+ t.end();
+});
diff --git a/node_modules/mkdirp/node_modules/minimist/test/unknown.js b/node_modules/mkdirp/node_modules/minimist/test/unknown.js
new file mode 100644
index 0000000000000..462a36bdd7ec9
--- /dev/null
+++ b/node_modules/mkdirp/node_modules/minimist/test/unknown.js
@@ -0,0 +1,102 @@
+var parse = require('../');
+var test = require('tape');
+
+test('boolean and alias is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '-h', 'true', '--derp', 'true' ];
+ var regular = [ '--herp', 'true', '-d', 'true' ];
+ var opts = {
+ alias: { h: 'herp' },
+ boolean: 'h',
+ unknown: unknownFn
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+
+ t.same(unknown, ['--derp', '-d']);
+ t.end();
+});
+
+test('flag boolean true any double hyphen argument is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
+ boolean: true,
+ unknown: unknownFn
+ });
+ t.same(unknown, ['--tacos=good', 'cow', '-p']);
+ t.same(argv, {
+ honk: true,
+ _: []
+ });
+ t.end();
+});
+
+test('string and alias is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '-h', 'hello', '--derp', 'goodbye' ];
+ var regular = [ '--herp', 'hello', '-d', 'moon' ];
+ var opts = {
+ alias: { h: 'herp' },
+ string: 'h',
+ unknown: unknownFn
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+
+ t.same(unknown, ['--derp', '-d']);
+ t.end();
+});
+
+test('default and alias is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '-h', 'hello' ];
+ var regular = [ '--herp', 'hello' ];
+ var opts = {
+ default: { 'h': 'bar' },
+ alias: { 'h': 'herp' },
+ unknown: unknownFn
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+
+ t.same(unknown, []);
+ t.end();
+ unknownFn(); // exercise fn for 100% coverage
+});
+
+test('value following -- is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '--bad', '--', 'good', 'arg' ];
+ var opts = {
+ '--': true,
+ unknown: unknownFn
+ };
+ var argv = parse(aliased, opts);
+
+ t.same(unknown, ['--bad']);
+ t.same(argv, {
+ '--': ['good', 'arg'],
+ '_': []
+ })
+ t.end();
+});
diff --git a/node_modules/rc/node_modules/minimist/test/whitespace.js b/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
similarity index 100%
rename from node_modules/rc/node_modules/minimist/test/whitespace.js
rename to node_modules/mkdirp/node_modules/minimist/test/whitespace.js
diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json
index aa7b9061128f2..af775065f04fa 100644
--- a/node_modules/mkdirp/package.json
+++ b/node_modules/mkdirp/package.json
@@ -1,47 +1,41 @@
{
- "_args": [
- [
- "mkdirp@0.5.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "mkdirp@0.5.1",
- "_id": "mkdirp@0.5.1",
+ "_from": "mkdirp@0.5.5",
+ "_id": "mkdirp@0.5.5",
"_inBundle": false,
- "_integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "_integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"_location": "/mkdirp",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "mkdirp@0.5.1",
+ "raw": "mkdirp@0.5.5",
"name": "mkdirp",
"escapedName": "mkdirp",
- "rawSpec": "0.5.1",
+ "rawSpec": "0.5.5",
"saveSpec": null,
- "fetchSpec": "0.5.1"
+ "fetchSpec": "0.5.5"
},
"_requiredBy": [
+ "#USER",
"/",
"/cacache",
"/cmd-shim",
"/copy-concurrently",
"/eslint",
- "/fstream",
"/gentle-fs",
+ "/libcipm",
"/move-concurrently",
"/node-gyp",
- "/npm-profile/cacache",
- "/npm-registry-fetch/cacache",
"/pacote",
- "/tacks",
+ "/spawn-wrap",
"/tap",
"/tar",
"/write"
],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "_spec": "0.5.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "_shasum": "d91cefd62d1436ca0f41620e251288d420099def",
+ "_spec": "mkdirp@0.5.5",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
@@ -53,14 +47,20 @@
"bugs": {
"url": "https://github.com/substack/node-mkdirp/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "minimist": "0.0.8"
+ "minimist": "^1.2.5"
},
+ "deprecated": false,
"description": "Recursively mkdir, like `mkdir -p`",
"devDependencies": {
- "mock-fs": "2 >=2.7.0",
- "tap": "1"
+ "mock-fs": "^3.7.0",
+ "tap": "^5.4.2"
},
+ "files": [
+ "bin",
+ "index.js"
+ ],
"homepage": "https://github.com/substack/node-mkdirp#readme",
"keywords": [
"mkdir",
@@ -69,6 +69,9 @@
"license": "MIT",
"main": "index.js",
"name": "mkdirp",
+ "publishConfig": {
+ "tag": "legacy"
+ },
"repository": {
"type": "git",
"url": "git+https://github.com/substack/node-mkdirp.git"
@@ -76,5 +79,5 @@
"scripts": {
"test": "tap test/*.js"
},
- "version": "0.5.1"
+ "version": "0.5.5"
}
diff --git a/node_modules/mkdirp/test/chmod.js b/node_modules/mkdirp/test/chmod.js
deleted file mode 100644
index 6a404b932f941..0000000000000
--- a/node_modules/mkdirp/test/chmod.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-var _0744 = parseInt('0744', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-test('chmod-pre', function (t) {
- var mode = _0744
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.equal(stat && stat.mode & _0777, mode, 'should be 0744');
- t.end();
- });
- });
-});
-
-test('chmod', function (t) {
- var mode = _0755
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.end();
- });
- });
-});
diff --git a/node_modules/mkdirp/test/clobber.js b/node_modules/mkdirp/test/clobber.js
deleted file mode 100644
index 2433b9ad54855..0000000000000
--- a/node_modules/mkdirp/test/clobber.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-// a file in the way
-var itw = ps.slice(0, 3).join('/');
-
-
-test('clobber-pre', function (t) {
- console.error("about to write to "+itw)
- fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
-
- fs.stat(itw, function (er, stat) {
- t.ifError(er)
- t.ok(stat && stat.isFile(), 'should be file')
- t.end()
- })
-})
-
-test('clobber', function (t) {
- t.plan(2);
- mkdirp(file, _0755, function (err) {
- t.ok(err);
- t.equal(err.code, 'ENOTDIR');
- t.end();
- });
-});
diff --git a/node_modules/mkdirp/test/mkdirp.js b/node_modules/mkdirp/test/mkdirp.js
deleted file mode 100644
index eaa8921c7f148..0000000000000
--- a/node_modules/mkdirp/test/mkdirp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('woo', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/node_modules/mkdirp/test/opts_fs.js b/node_modules/mkdirp/test/opts_fs.js
deleted file mode 100644
index 97186b62e0bb9..0000000000000
--- a/node_modules/mkdirp/test/opts_fs.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs', function (t) {
- t.plan(5);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp(file, { fs: xfs, mode: _0755 }, function (err) {
- t.ifError(err);
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
- });
-});
diff --git a/node_modules/mkdirp/test/opts_fs_sync.js b/node_modules/mkdirp/test/opts_fs_sync.js
deleted file mode 100644
index 6c370aa6e93a2..0000000000000
--- a/node_modules/mkdirp/test/opts_fs_sync.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs sync', function (t) {
- t.plan(4);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp.sync(file, { fs: xfs, mode: _0755 });
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/node_modules/mkdirp/test/perm.js b/node_modules/mkdirp/test/perm.js
deleted file mode 100644
index fbce44b82bafe..0000000000000
--- a/node_modules/mkdirp/test/perm.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('async perm', function (t) {
- t.plan(5);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
-
-test('async root perm', function (t) {
- mkdirp('/tmp', _0755, function (err) {
- if (err) t.fail(err);
- t.end();
- });
- t.end();
-});
diff --git a/node_modules/mkdirp/test/perm_sync.js b/node_modules/mkdirp/test/perm_sync.js
deleted file mode 100644
index 398229fe54ab0..0000000000000
--- a/node_modules/mkdirp/test/perm_sync.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync perm', function (t) {
- t.plan(4);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
-
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
-
-test('sync root perm', function (t) {
- t.plan(3);
-
- var file = '/tmp';
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- });
-});
diff --git a/node_modules/mkdirp/test/race.js b/node_modules/mkdirp/test/race.js
deleted file mode 100644
index b0b9e183c902f..0000000000000
--- a/node_modules/mkdirp/test/race.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('race', function (t) {
- t.plan(10);
- var ps = [ '', 'tmp' ];
-
- for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
- }
- var file = ps.join('/');
-
- var res = 2;
- mk(file);
-
- mk(file);
-
- function mk (file, cb) {
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
- }
-});
diff --git a/node_modules/mkdirp/test/rel.js b/node_modules/mkdirp/test/rel.js
deleted file mode 100644
index 4ddb34276a72a..0000000000000
--- a/node_modules/mkdirp/test/rel.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('rel', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var cwd = process.cwd();
- process.chdir('/tmp');
-
- var file = [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- process.chdir(cwd);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/node_modules/mkdirp/test/return.js b/node_modules/mkdirp/test/return.js
deleted file mode 100644
index bce68e5613e3f..0000000000000
--- a/node_modules/mkdirp/test/return.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, '/tmp/' + x);
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, null);
- });
- });
-});
diff --git a/node_modules/mkdirp/test/return_sync.js b/node_modules/mkdirp/test/return_sync.js
deleted file mode 100644
index 7c222d3558d6f..0000000000000
--- a/node_modules/mkdirp/test/return_sync.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- // Note that this will throw on failure, which will fail the test.
- var made = mkdirp.sync(file);
- t.equal(made, '/tmp/' + x);
-
- // making the same file again should have no effect.
- made = mkdirp.sync(file);
- t.equal(made, null);
-});
diff --git a/node_modules/mkdirp/test/root.js b/node_modules/mkdirp/test/root.js
deleted file mode 100644
index 9e7d079d9fc75..0000000000000
--- a/node_modules/mkdirp/test/root.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-test('root', function (t) {
- // '/' on unix, 'c:/' on windows.
- var file = path.resolve('/');
-
- mkdirp(file, _0755, function (err) {
- if (err) throw err
- fs.stat(file, function (er, stat) {
- if (er) throw er
- t.ok(stat.isDirectory(), 'target is a directory');
- t.end();
- })
- });
-});
diff --git a/node_modules/mkdirp/test/sync.js b/node_modules/mkdirp/test/sync.js
deleted file mode 100644
index 8c8dc938c8b4a..0000000000000
--- a/node_modules/mkdirp/test/sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file, _0755);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/node_modules/mkdirp/test/umask.js b/node_modules/mkdirp/test/umask.js
deleted file mode 100644
index 2033c63a414ef..0000000000000
--- a/node_modules/mkdirp/test/umask.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('implicit mode from umask', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0777 & (~process.umask()));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
-});
diff --git a/node_modules/mkdirp/test/umask_sync.js b/node_modules/mkdirp/test/umask_sync.js
deleted file mode 100644
index 11a76147496a5..0000000000000
--- a/node_modules/mkdirp/test/umask_sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('umask sync modes', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, (_0777 & (~process.umask())));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/node_modules/node-gyp/.github/workflows/Python_tests.yml b/node_modules/node-gyp/.github/workflows/Python_tests.yml
new file mode 100644
index 0000000000000..dba9d10933cbf
--- /dev/null
+++ b/node_modules/node-gyp/.github/workflows/Python_tests.yml
@@ -0,0 +1,40 @@
+# TODO: Line 15, enable python-version: 3.5
+# TODO: Line 36, enable pytest --doctest-modules
+
+name: Python_tests
+on: [push, pull_request]
+jobs:
+ Python_tests:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ max-parallel: 15
+ matrix:
+ os: [macos-latest, ubuntu-latest, windows-latest]
+ python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8 pytest # -r requirements.txt
+ - name: Lint with flake8
+ if: matrix.os == 'ubuntu-latest'
+ run: |
+ # stop the build if there are Python syntax errors or undefined names
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+ - name: Test with pytest (Linux and macOS)
+ if: matrix.os != 'windows-latest'
+ run: pytest
+ - name: Test with pytest (Windows)
+ if: matrix.os == 'windows-latest'
+ shell: bash
+ run: GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" pytest
+ # - name: Run doctests with pytest
+ # run: pytest --doctest-modules
diff --git a/node_modules/node-gyp/.travis.yml b/node_modules/node-gyp/.travis.yml
index e43ba548fb784..22f7bc12fc349 100644
--- a/node_modules/node-gyp/.travis.yml
+++ b/node_modules/node-gyp/.travis.yml
@@ -1,33 +1,17 @@
dist: xenial
language: python
cache: pip
-matrix:
+addons:
+ homebrew:
+ update: true
+ packages:
+ - npm
+ - pyenv
+jobs:
include:
- name: "Python 2.7 on Linux"
env: NODE_GYP_FORCE_PYTHON=python2
python: 2.7
- - name: "Python 2.7 on macOS"
- os: osx
- osx_image: xcode11.2
- language: shell # 'language: python' is not yet supported on macOS
- env: NODE_GYP_FORCE_PYTHON=python2
- before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew install npm
- - name: "Node.js 6 & Python 2.7 on Windows"
- os: windows
- language: node_js
- node_js: 6 # node
- env: >-
- PATH=/c/Python27:/c/Python27/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
- before_install: choco install python2
- - name: "Node.js 12 & Python 2.7 on Windows"
- os: windows
- language: node_js
- node_js: 12 # node
- env: >-
- PATH=/c/Python27:/c/Python27/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
- before_install: choco install python2
- name: "Node.js 6 & Python 3.8 on Linux"
python: 3.8
@@ -58,12 +42,36 @@ matrix:
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 12
- - name: "Python 3.7 on macOS"
+ - name: "Python 2.7 on macOS"
os: osx
osx_image: xcode11.2
language: shell # 'language: python' is not yet supported on macOS
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade npm || true
+ env: NODE_GYP_FORCE_PYTHON=python2 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=2.7.17
+ before_install: pyenv install $PYENV_VERSION
+ - name: "Python 3.8 on macOS"
+ os: osx
+ osx_image: xcode11.2
+ language: shell # 'language: python' is not yet supported on macOS
+ env: NODE_GYP_FORCE_PYTHON=python3 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=3.8.0
+ before_install: pyenv install $PYENV_VERSION
+
+ - name: "Node.js 6 & Python 2.7 on Windows"
+ os: windows
+ language: node_js
+ node_js: 6 # node
+ env: >-
+ PATH=/c/Python27:/c/Python27/Scripts:$PATH
+ NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
+ before_install: choco install python2
+ - name: "Node.js 12 & Python 2.7 on Windows"
+ os: windows
+ language: node_js
+ node_js: 12 # node
+ env: >-
+ PATH=/c/Python27:/c/Python27/Scripts:$PATH
+ NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
+ before_install: choco install python2
+
- name: "Node.js 12 & Python 3.7 on Windows"
os: windows
language: node_js
@@ -82,20 +90,19 @@ matrix:
before_install: choco install python
install:
- #- pip install -r requirements.txt
- - pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python
+ - python -m pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python
before_script:
- - flake8 --version
+ - python -m flake8 --version
# stop the build if there are Python syntax errors or undefined names
- - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+ - python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. Two space indentation is OK. The GitHub editor is 127 chars wide
- - flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
+ - python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
- npm install
- npm list
script:
- node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})'
- npm test
- - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" pytest
+ - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
notifications:
on_success: change
on_failure: change # `always` will be the setting once code changes slow down
diff --git a/node_modules/node-gyp/CHANGELOG.md b/node_modules/node-gyp/CHANGELOG.md
index 28f523779841d..5dc6bb4d47069 100644
--- a/node_modules/node-gyp/CHANGELOG.md
+++ b/node_modules/node-gyp/CHANGELOG.md
@@ -1,3 +1,21 @@
+v5.1.0 2020-02-05
+=================
+
+* [[`f37a8b40d0`](https://github.com/nodejs/node-gyp/commit/f37a8b40d0)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994)
+* [[`cb3f6aae5e`](https://github.com/nodejs/node-gyp/commit/cb3f6aae5e)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992)
+* [[`0607596a4c`](https://github.com/nodejs/node-gyp/commit/0607596a4c)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
+* [[`0d5a415a14`](https://github.com/nodejs/node-gyp/commit/0d5a415a14)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971)
+* [[`103740cd95`](https://github.com/nodejs/node-gyp/commit/103740cd95)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009)
+* [[`278dcddbdd`](https://github.com/nodejs/node-gyp/commit/278dcddbdd)] - **lib**: ignore VS instances that cause COMExceptions (Andrew Casey) [#2018](https://github.com/nodejs/node-gyp/pull/2018)
+* [[`1694907bbf`](https://github.com/nodejs/node-gyp/commit/1694907bbf)] - **lib**: compatibility with semver โฅ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006)
+* [[`a3f1143514`](https://github.com/nodejs/node-gyp/commit/a3f1143514)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978)
+* [[`52365819c7`](https://github.com/nodejs/node-gyp/commit/52365819c7)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993)
+* [[`bc509c511d`](https://github.com/nodejs/node-gyp/commit/bc509c511d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996)
+* [[`91ee26dd48`](https://github.com/nodejs/node-gyp/commit/91ee26dd48)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001)
+* [[`0923f344c9`](https://github.com/nodejs/node-gyp/commit/0923f344c9)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
+* [[`32c8744b34`](https://github.com/nodejs/node-gyp/commit/32c8744b34)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
+* [[`fd4b1351e4`](https://github.com/nodejs/node-gyp/commit/fd4b1351e4)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
+
v5.0.7 2019-12-16
=================
diff --git a/node_modules/node-gyp/CONTRIBUTING.md b/node_modules/node-gyp/CONTRIBUTING.md
deleted file mode 100644
index f48786bd84af3..0000000000000
--- a/node_modules/node-gyp/CONTRIBUTING.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Contributing to node-gyp
-
-## Code of Conduct
-
-Please read the
-[Code of Conduct](https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md)
-which explains the minimum behavior expectations for node-gyp contributors.
-
-
-## Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
diff --git a/node_modules/node-gyp/README.md b/node_modules/node-gyp/README.md
index e39c5de8ea045..79abf4ba71fe3 100644
--- a/node_modules/node-gyp/README.md
+++ b/node_modules/node-gyp/README.md
@@ -1,5 +1,8 @@
# `node-gyp` - Node.js native addon build tool
+[](https://travis-ci.com/nodejs/node-gyp)
+[](https://github.com/nodejs/node-gyp/actions?workflow=Python_tests)
+
`node-gyp` is a cross-platform command-line tool written in Node.js for
compiling native addon modules for Node.js. It contains a fork of the
[gyp](https://gyp.gsrc.io) project that was previously used by the Chromium
@@ -14,7 +17,7 @@ etc.), regardless of what version of Node.js is actually installed on your syste
## Features
* The same build commands work on any of the supported platforms
- * Supports the targetting of different versions of Node.js
+ * Supports the targeting of different versions of Node.js
## Installation
@@ -191,7 +194,8 @@ Some additional resources for Node.js native addons and writing `gyp` configurat
| `--devdir=$path` | SDK download directory (default is OS cache directory)
| `--ensure` | Don't reinstall headers if already present
| `--dist-url=$url` | Download header tarball from custom URL
-| `--proxy=$url` | Set HTTP proxy for downloading header tarball
+| `--proxy=$url` | Set HTTP(S) proxy for downloading header tarball
+| `--noproxy=$urls` | Set urls to ignore proxies when downloading header tarball
| `--cafile=$cafile` | Override default CA chain (to download tarball)
| `--nodedir=$path` | Set the path to the node source code
| `--python=$path` | Set path to the Python binary
diff --git a/node_modules/node-gyp/gyp/pylib/gyp/input.py b/node_modules/node-gyp/gyp/pylib/gyp/input.py
index 2973c078fc82b..d1742800ac507 100644
--- a/node_modules/node-gyp/gyp/pylib/gyp/input.py
+++ b/node_modules/node-gyp/gyp/pylib/gyp/input.py
@@ -2286,7 +2286,7 @@ def SetUpConfigurations(target, target_dict):
merged_configurations[configuration])
# Now drop all the abstract ones.
- for configuration in target_dict['configurations'].keys():
+ for configuration in list(target_dict['configurations']):
old_configuration_dict = target_dict['configurations'][configuration]
if old_configuration_dict.get('abstract'):
del target_dict['configurations'][configuration]
diff --git a/node_modules/node-gyp/lib/Find-VisualStudio.cs b/node_modules/node-gyp/lib/Find-VisualStudio.cs
index 0a533f42d6a4f..d2e45a76275f5 100644
--- a/node_modules/node-gyp/lib/Find-VisualStudio.cs
+++ b/node_modules/node-gyp/lib/Find-VisualStudio.cs
@@ -205,7 +205,14 @@ public static void PrintJson()
return;
}
- instances.Add(InstanceJson(rgelt[0]));
+ try
+ {
+ instances.Add(InstanceJson(rgelt[0]));
+ }
+ catch (COMException)
+ {
+ // Ignore instances that can't be queried.
+ }
}
}
diff --git a/node_modules/node-gyp/lib/find-python.js b/node_modules/node-gyp/lib/find-python.js
index e79bc50d5a1d5..fabc4630f15d4 100644
--- a/node_modules/node-gyp/lib/find-python.js
+++ b/node_modules/node-gyp/lib/find-python.js
@@ -226,7 +226,7 @@ PythonFinder.prototype = {
}
this.addLog(`- version is "${version}"`)
- const range = semver.Range(this.semverRange)
+ const range = new semver.Range(this.semverRange)
var valid = false
try {
valid = range.test(version)
diff --git a/node_modules/node-gyp/lib/install.js b/node_modules/node-gyp/lib/install.js
index f68cd7fd6d2a5..c919c1058811e 100644
--- a/node_modules/node-gyp/lib/install.js
+++ b/node_modules/node-gyp/lib/install.js
@@ -11,6 +11,7 @@ const request = require('request')
const mkdir = require('mkdirp')
const processRelease = require('./process-release')
const win = process.platform === 'win32'
+const getProxyFromURI = require('./proxy')
function install (fs, gyp, argv, callback) {
var release = processRelease(argv, gyp, process.version, process.release)
@@ -410,10 +411,7 @@ function download (gyp, env, url) {
}
// basic support for a proxy server
- var proxyUrl = gyp.opts.proxy ||
- env.http_proxy ||
- env.HTTP_PROXY ||
- env.npm_config_proxy
+ var proxyUrl = getProxyFromURI(gyp, env, url)
if (proxyUrl) {
if (/^https?:\/\//i.test(proxyUrl)) {
log.verbose('download', 'using proxy url: "%s"', proxyUrl)
diff --git a/node_modules/node-gyp/lib/node-gyp.js b/node_modules/node-gyp/lib/node-gyp.js
index 9d24103900f70..81fc590919ba8 100644
--- a/node_modules/node-gyp/lib/node-gyp.js
+++ b/node_modules/node-gyp/lib/node-gyp.js
@@ -67,6 +67,7 @@ proto.configDefs = {
ensure: Boolean, // 'install'
solution: String, // 'build' (windows only)
proxy: String, // 'install'
+ noproxy: String, // 'install'
devdir: String, // everywhere
nodedir: String, // 'configure'
loglevel: String, // everywhere
diff --git a/node_modules/node-gyp/lib/proxy.js b/node_modules/node-gyp/lib/proxy.js
new file mode 100644
index 0000000000000..92d9ed2f7f085
--- /dev/null
+++ b/node_modules/node-gyp/lib/proxy.js
@@ -0,0 +1,92 @@
+'use strict'
+// Taken from https://github.com/request/request/blob/212570b/lib/getProxyFromURI.js
+
+const url = require('url')
+
+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)
+ var zoneHost = formatHostname(zoneParts[0])
+ var zonePort = zoneParts[1]
+ var hasPort = zone.indexOf(':') > -1
+
+ return { hostname: zoneHost, port: zonePort, hasPort: hasPort }
+}
+
+function uriInNoProxy (uri, noProxy) {
+ var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
+ var hostname = formatHostname(uri.hostname)
+ var 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)
+ var hostnameMatched = (
+ isMatchedAt > -1 &&
+ (isMatchedAt === hostname.length - noProxyZone.hostname.length)
+ )
+
+ if (noProxyZone.hasPort) {
+ return (port === noProxyZone.port) && hostnameMatched
+ }
+
+ return hostnameMatched
+ })
+}
+
+function getProxyFromURI (gyp, env, uri) {
+ // If a string URI/URL was given, parse it into a URL object
+ if (typeof uri === 'string') {
+ // eslint-disable-next-line
+ uri = url.parse(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: https://lynx.invisible-island.net/lynx2.8.7/breakout/lynx_help/keystrokes/environments.html)
+
+ var noProxy = gyp.opts.noproxy || env.NO_PROXY || env.no_proxy || env.npm_config_noproxy || ''
+
+ // 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 gyp.opts.proxy ||
+ env.HTTP_PROXY ||
+ env.http_proxy ||
+ env.npm_config_proxy || null
+ }
+
+ if (uri.protocol === 'https:') {
+ return gyp.opts.proxy ||
+ env.HTTPS_PROXY ||
+ env.https_proxy ||
+ env.HTTP_PROXY ||
+ env.http_proxy ||
+ env.npm_config_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/macOS_Catalina.md b/node_modules/node-gyp/macOS_Catalina.md
index 5f02face57d96..530cbf25c38dd 100644
--- a/node_modules/node-gyp/macOS_Catalina.md
+++ b/node_modules/node-gyp/macOS_Catalina.md
@@ -1,39 +1,37 @@
# Installation notes for macOS Catalina (v10.15)
-_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or updated to deal with challenges involved in upgrades to the next version of macOS._
+_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._
-Lessons learned from:
-* https://github.com/nodejs/node-gyp/issues/1779
-* https://github.com/nodejs/node-gyp/issues/1861
-* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
-
-Installing `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
-
-However, upgrading to macOS Catalina changes some settings that may cause normal `node-gyp` installations to fail.
+**Upgrading to macOS Catalina may cause normal `node-gyp` installations to fail.**
### Is my Mac running macOS Catalina?
-Let's make first make sure that your Mac is currently running Catalina:
-% `sw_vers`
+Let's first make sure that your Mac is running Catalina:
+```
+% sw_vers
ProductName: Mac OS X
ProductVersion: 10.15
BuildVersion: 19A602
+```
+If `ProductVersion` is less then `10.15` then this document is not for you. Normal install docs for `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
-If `ProductVersion` is less then `10.15` then this document is not really for you.
### The acid test
-Next, lets see if `Xcode Command Line Tools` are installed:
+To see if `Xcode Command Line Tools` is installed in a way that will work with `node-gyp`, run:
1. `/usr/sbin/pkgutil --packages | grep CL`
- * If nothing is listed, then [skip to the next section](#Two-roads).
- * If `com.apple.pkg.CLTools_Executables` is listed then try:
+ * `com.apple.pkg.CLTools_Executables` should be listed. If it isn't, this test failed.
2. `/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables`
- * If `version: 11.0.0` or later is listed then _you are done_! Your Mac should be ready to install `node-gyp`. Doing `clang -v` should show `Apple clang version 11.0.0` or later.
+ * `version: 11.0.0` (or later) should be listed. If it isn't, this test failed.
+
+If both tests succeeded, _you are done_! You should be ready to install `node-gyp`.
+
+If either test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions).
-As you go through the remainder of this document, at anytime you can try these `acid test` commands. If they pass then your Mac should be ready to install `node-gyp`.
+### Solutions
+There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable.
-### Two roads
-There are two main ways to install `node-gyp` on macOS:
1. With the full Xcode (~7.6 GB download) from the `App Store` app.
2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install`
+3. With the _much_ smaller Xcode Command Line Tools via manual download. **For people running the latest version of Catalina (10.15.2 at the time of this writing), this has worked when the other two solutions haven't.**
### Installing `node-gyp` using the full Xcode
1. `xcodebuild -version` should show `Xcode 11.1` or later.
@@ -52,7 +50,7 @@ There are two main ways to install `node-gyp` on macOS:
10. `sudo xcode-select --reset` # Enter root password. No output is normal.
11. Repeat step 7 above. Is the path different this time? Repeat the _acid test_.
-### Installing `node-gyp` using the Xcode Command Line Tools
+### Installing `node-gyp` using the Xcode Command Line Tools via `xcode-select --install`
1. If the _acid test_ has not succeeded, then try `xcode-select --install`
2. Wait until the install process is _complete_.
3. `softwareupdate -l` # No listing is a good sign.
@@ -64,6 +62,11 @@ There are two main ways to install `node-gyp` on macOS:
8. `sudo xcode-select --reset` # Enter root password. No output is normal.
9. Repeat step 5 above. Is the path different this time? Repeat the _acid test_.
+### Installing `node-gyp` using the Xcode Command Line Tools via manual download
+1. Download the appropriate version of the "Command Line Tools for Xcode" for your version of Catalina from developer.apple.com/download. As of MacOS 10.15.2, that's Command_Line_Tools_for_Xcode_11.3.dmg
+2. Install the package.
+3. Run the _acid test_.
+
### I did all that and the acid test still does not pass :-(
1. `sudo rm -rf $(xcode-select -print-path)` # Enter root password. No output is normal.
2. `xcode-select --install`
@@ -72,3 +75,9 @@ There are two main ways to install `node-gyp` on macOS:
5. `npm explore npm -g -- npm explore npm-lifecycle -- npm install node-gyp@latest`
6. If the _acid test_ still does _not_ pass then...
7. Add a comment to https://github.com/nodejs/node-gyp/issues/1927 so we can improve.
+
+Lessons learned from:
+* https://github.com/nodejs/node-gyp/issues/1779
+* https://github.com/nodejs/node-gyp/issues/1861
+* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
+* Thanks to @rrrix for discovering Solution 3
diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json
index afa45f3969095..4638db5a3f4a3 100644
--- a/node_modules/node-gyp/package.json
+++ b/node_modules/node-gyp/package.json
@@ -1,29 +1,29 @@
{
- "_from": "node-gyp@5.0.7",
- "_id": "node-gyp@5.0.7",
+ "_from": "node-gyp@5.1.0",
+ "_id": "node-gyp@5.1.0",
"_inBundle": false,
- "_integrity": "sha512-K8aByl8OJD51V0VbUURTKsmdswkQQusIvlvmTyhHlIT1hBvaSxzdxpSle857XuXa7uc02UEZx9OR5aDxSWS5Qw==",
+ "_integrity": "sha512-OUTryc5bt/P8zVgNUmC6xdXiDJxLMAW8cF5tLQOT9E5sOQj+UeQxnnPy74K3CLCa/SOjjBlbuzDLR8ANwA+wmw==",
"_location": "/node-gyp",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "node-gyp@5.0.7",
+ "raw": "node-gyp@5.1.0",
"name": "node-gyp",
"escapedName": "node-gyp",
- "rawSpec": "5.0.7",
+ "rawSpec": "5.1.0",
"saveSpec": null,
- "fetchSpec": "5.0.7"
+ "fetchSpec": "5.1.0"
},
"_requiredBy": [
"#USER",
"/",
"/npm-lifecycle"
],
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.0.7.tgz",
- "_shasum": "dd4225e735e840cf2870e4037c2ed9c28a31719e",
- "_spec": "node-gyp@5.0.7",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.1.0.tgz",
+ "_shasum": "8e31260a7af4a2e2f994b0673d4e0b3866156332",
+ "_spec": "node-gyp@5.1.0",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
@@ -84,5 +84,5 @@
"lint": "standard */*.js test/**/*.js",
"test": "npm run lint && tap --timeout=120 test/test-*"
},
- "version": "5.0.7"
+ "version": "5.1.0"
}
diff --git a/node_modules/node-gyp/test/docker.sh b/node_modules/node-gyp/test/docker.sh
deleted file mode 100755
index 67014209d0003..0000000000000
--- a/node_modules/node-gyp/test/docker.sh
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/bash
-
-#set -e
-
-test_node_versions="6.17.0 8.15.1 10.15.3 11.12.0"
-
-myuid=$(id -u)
-mygid=$(id -g)
-__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-dot_node_gyp=${__dirname}/.node-gyp/
-
-# borrows from https://github.com/rvagg/dnt/
-
-# Simple setup function for a container:
-# setup_container(image id, base image, commands to run to set up)
-setup_container() {
- local container_id="$1"
- local base_container="$2"
- local run_cmd="$3"
-
- # Does this image exist? If yes, ignore
- docker inspect "$container_id" &> /dev/null
- if [[ $? -eq 0 ]]; then
- echo "Found existing container [$container_id]"
- else
- # No such image, so make it
- echo "Did not find container [$container_id], creating..."
- docker run -i $base_container /bin/bash -c "$run_cmd"
- sleep 2
- docker commit $(docker ps -l -q) $container_id
- fi
-}
-
-# Run tests inside each of the versioned containers, copy cwd into npm's copy of node-gyp
-# so it'll be invoked by npm when a compile is needed
-# run_tests(version, test-commands)
-run_tests() {
- local version="$1"
- local run_cmd="$2"
-
- run_cmd="rsync -aAXx --delete --exclude .git --exclude build /node-gyp-src/ /usr/lib/node_modules/npm/node_modules/node-gyp/;
- /bin/su -s /bin/bash node-gyp -c 'cd && ${run_cmd}'"
-
- rm -rf $dot_node_gyp
- mkdir $dot_node_gyp
-
- docker run \
- --rm -i \
- -v ~/.npm/:/node-gyp/.npm/ \
- -v ${dot_node_gyp}:/node-gyp/.node-gyp/ \
- -v $(pwd):/node-gyp-src/:ro \
- node-gyp-test/${version} /bin/bash -c "${run_cmd}"
-}
-
-# A base image with build tools and a user account
-setup_container "node-gyp-test/base" "ubuntu:14.04" "
- adduser --gecos node-gyp --home /node-gyp/ --disabled-login node-gyp --uid $myuid &&
- echo "node-gyp:node-gyp" | chpasswd &&
- apt-get update &&
- apt-get install -y build-essential python git rsync curl
-"
-
-# An image on top of the base containing clones of repos we want to use for testing
-setup_container "node-gyp-test/clones" "node-gyp-test/base" "
- cd /node-gyp/ && git clone https://github.com/justmoon/node-bignum.git &&
- cd /node-gyp/ && git clone https://github.com/bnoordhuis/node-buffertools.git &&
- chown -R node-gyp.node-gyp /node-gyp/
-"
-
-# An image for each of the node versions we want to test with that version installed and the latest npm
-for v in $test_node_versions; do
- setup_container "node-gyp-test/${v}" "node-gyp-test/clones" "
- curl -sL https://nodejs.org/dist/v${v}/node-v${v}-linux-x64.tar.gz | tar -zxv --strip-components=1 -C /usr/ &&
- npm install npm@latest -g &&
- node -v && npm -v
- "
-done
-
-# Test use of --target=x.y.z to compile against alternate versions
-test_download_node_version() {
- local run_with_ver="$1"
- local expected_dir="$2"
- local expected_ver="$3"
- run_tests $run_with_ver "cd node-buffertools && npm install --loglevel=info --target=${expected_ver}"
- local node_ver=$(cat "${dot_node_gyp}${expected_dir}/node_version.h" | grep '#define NODE_\w*_VERSION [0-9]*$')
- node_ver=$(echo $node_ver | sed 's/#define NODE_[A-Z]*_VERSION //g' | sed 's/ /./g')
- if [ "X$(echo $node_ver)" != "X${expected_ver}" ]; then
- echo "Did not download v${expected_ver} using --target, instead got: $(echo $node_ver)"
- exit 1
- fi
- echo "Verified correct download of [v${node_ver}]"
-}
-
-test_download_node_version "0.12.7" "0.10.30/src" "0.10.30"
-# should download the headers file
-test_download_node_version "4.3.0" "4.3.0/include/node" "4.3.0"
-test_download_node_version "5.6.0" "5.6.0/include/node" "5.6.0"
-
-# TODO: test --dist-url by starting up a localhost server and serving up tarballs
-
-# testing --dist-url, using simple-proxy.js to make localhost work as a distribution
-# point for tarballs
-# we can test whether it uses the proxy because after 2 connections the proxy will
-# die and therefore should not be running at the end of the test, `nc` can tell us this
-run_tests "0.12.7" "
- (node /node-gyp-src/test/simple-proxy.js 8080 /boombar/ https://nodejs.org/dist/ &) &&
- cd node-buffertools &&
- NODEJS_ORG_MIRROR=http://localhost:8080/boombar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
- nc -z localhost 8080 && echo -e \"\\n\\n\\033[31mFAILED TO USE LOCAL PROXY\\033[39m\\n\\n\"
-"
-
-rm -rf $dot_node_gyp
diff --git a/node_modules/node-gyp/test/test-download.js b/node_modules/node-gyp/test/test-download.js
index 738a43f276b09..fe373e3280ce6 100644
--- a/node_modules/node-gyp/test/test-download.js
+++ b/node_modules/node-gyp/test/test-download.js
@@ -90,6 +90,101 @@ test('download over https with custom ca', function (t) {
})
})
+test('download over http with proxy', function (t) {
+ t.plan(2)
+
+ var server = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('ok')
+ pserver.close(function () {
+ server.close()
+ })
+ })
+
+ var pserver = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('proxy ok')
+ server.close(function () {
+ pserver.close()
+ })
+ })
+
+ var host = 'localhost'
+ server.listen(0, host, function () {
+ var port = this.address().port
+ pserver.listen(port + 1, host, function () {
+ var gyp = {
+ opts: {
+ proxy: 'http://' + host + ':' + (port + 1)
+ },
+ version: '42'
+ }
+ var url = 'http://' + host + ':' + port
+ var req = install.test.download(gyp, {}, url)
+ req.on('response', function (res) {
+ var body = ''
+ res.setEncoding('utf8')
+ res.on('data', function (data) {
+ body += data
+ })
+ res.on('end', function () {
+ t.strictEqual(body, 'proxy ok')
+ })
+ })
+ })
+ })
+})
+
+test('download over http with noproxy', function (t) {
+ t.plan(2)
+
+ var server = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('ok')
+ pserver.close(function () {
+ server.close()
+ })
+ })
+
+ var pserver = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('proxy ok')
+ server.close(function () {
+ pserver.close()
+ })
+ })
+
+ var host = 'localhost'
+ server.listen(0, host, function () {
+ var port = this.address().port
+ pserver.listen(port + 1, host, function () {
+ var gyp = {
+ opts: {
+ proxy: 'http://' + host + ':' + (port + 1),
+ noproxy: 'localhost'
+ },
+ version: '42'
+ }
+ var url = 'http://' + host + ':' + port
+ var req = install.test.download(gyp, {}, url)
+ req.on('response', function (res) {
+ var body = ''
+ res.setEncoding('utf8')
+ res.on('data', function (data) {
+ body += data
+ })
+ res.on('end', function () {
+ t.strictEqual(body, 'ok')
+ })
+ })
+ })
+ })
+})
+
test('download with missing cafile', function (t) {
t.plan(1)
var gyp = {
@@ -116,7 +211,7 @@ test('download headers (actual)', function (t) {
process.release.name !== 'node' ||
semver.prerelease(process.version) !== null ||
semver.satisfies(process.version, '<10')) {
- return t.skip('Skipping acutal download of headers due to test environment configuration')
+ return t.skip('Skipping actual download of headers due to test environment configuration')
}
t.plan(17)
diff --git a/node_modules/nopt/.npmignore b/node_modules/nopt/.npmignore
deleted file mode 100644
index 3c3629e647f5d..0000000000000
--- a/node_modules/nopt/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/nopt/.travis.yml b/node_modules/nopt/.travis.yml
deleted file mode 100644
index a1cef591c3cfd..0000000000000
--- a/node_modules/nopt/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - '0.12'
- - '4'
- - '6'
- - '7'
-before_install:
- - npm install -g npm@latest
diff --git a/node_modules/nopt/examples/my-program.js b/node_modules/nopt/examples/my-program.js
deleted file mode 100755
index 142447e18e756..0000000000000
--- a/node_modules/nopt/examples/my-program.js
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env node
-
-//process.env.DEBUG_NOPT = 1
-
-// my-program.js
-var nopt = require("../lib/nopt")
- , Stream = require("stream").Stream
- , path = require("path")
- , knownOpts = { "foo" : [String, null]
- , "bar" : [Stream, Number]
- , "baz" : path
- , "bloo" : [ "big", "medium", "small" ]
- , "flag" : Boolean
- , "pick" : Boolean
- }
- , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
- , "b7" : ["--bar", "7"]
- , "m" : ["--bloo", "medium"]
- , "p" : ["--pick"]
- , "f" : ["--flag", "true"]
- , "g" : ["--flag"]
- , "s" : "--flag"
- }
- // everything is optional.
- // knownOpts and shorthands default to {}
- // arg list defaults to process.argv
- // slice defaults to 2
- , parsed = nopt(knownOpts, shortHands, process.argv, 2)
-
-console.log("parsed =\n"+ require("util").inspect(parsed))
diff --git a/node_modules/nopt/lib/nopt.js b/node_modules/nopt/lib/nopt.js
index 1fb113514f334..0ec5753d0cb89 100644
--- a/node_modules/nopt/lib/nopt.js
+++ b/node_modules/nopt/lib/nopt.js
@@ -113,7 +113,12 @@ function clean (data, types, typeDefs) {
return d[k]
}).filter(function (val) { return val !== remove })
- if (!val.length) delete data[k]
+ // if we allow Array specifically, then an empty array is how we
+ // express 'no value here', not null. Allow it.
+ if (!val.length && type.indexOf(Array) === -1) {
+ debug('VAL HAS NO LENGTH, DELETE IT', val, k, type.indexOf(Array))
+ delete data[k]
+ }
else if (isArray) {
debug(isArray, data[k], val)
data[k] = val
diff --git a/node_modules/nopt/package.json b/node_modules/nopt/package.json
index cea3624f4d14e..1490f6d25d75c 100644
--- a/node_modules/nopt/package.json
+++ b/node_modules/nopt/package.json
@@ -1,51 +1,54 @@
{
- "_args": [
- [
- "nopt@4.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "nopt@4.0.1",
- "_id": "nopt@4.0.1",
+ "_from": "nopt@4.0.3",
+ "_id": "nopt@4.0.3",
"_inBundle": false,
- "_integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
+ "_integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
"_location": "/nopt",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "nopt@4.0.1",
+ "raw": "nopt@4.0.3",
"name": "nopt",
"escapedName": "nopt",
- "rawSpec": "4.0.1",
+ "rawSpec": "4.0.3",
"saveSpec": null,
- "fetchSpec": "4.0.1"
+ "fetchSpec": "4.0.3"
},
"_requiredBy": [
- "/"
+ "#USER",
+ "/",
+ "/node-gyp"
],
- "_resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
- "_spec": "4.0.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
+ "_shasum": "a375cad9d02fd921278d954c2254d5aa57e15e48",
+ "_spec": "nopt@4.0.3",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"bin": {
- "nopt": "./bin/nopt.js"
+ "nopt": "bin/nopt.js"
},
"bugs": {
"url": "https://github.com/npm/nopt/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"abbrev": "1",
"osenv": "^0.1.4"
},
+ "deprecated": false,
"description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
"devDependencies": {
- "tap": "^8.0.1"
+ "tap": "^14.10.6"
},
+ "files": [
+ "bin",
+ "lib"
+ ],
"homepage": "https://github.com/npm/nopt#readme",
"license": "ISC",
"main": "lib/nopt.js",
@@ -55,7 +58,10 @@
"url": "git+https://github.com/npm/nopt.git"
},
"scripts": {
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "preversion": "npm test",
"test": "tap test/*.js"
},
- "version": "4.0.1"
+ "version": "4.0.3"
}
diff --git a/node_modules/nopt/test/basic.js b/node_modules/nopt/test/basic.js
deleted file mode 100644
index 5c18ac0fc6a31..0000000000000
--- a/node_modules/nopt/test/basic.js
+++ /dev/null
@@ -1,303 +0,0 @@
-var nopt = require("../")
- , test = require('tap').test
- , isWin = process.platform === 'win32'
-
-test("passing a string results in a string", function (t) {
- var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0)
- t.same(parsed.key, "myvalue")
- t.end()
-})
-
-// https://github.com/npm/nopt/issues/31
-test("Empty String results in empty string, not true", function (t) {
- var parsed = nopt({ empty: String }, {}, ["--empty"], 0)
- t.same(parsed.empty, "")
- t.end()
-})
-
-// https://github.com/npm/nopt/issues/65
-test("Empty String should not swallow next flag", function (t) {
- var parsed = nopt({ empty: String, foo: String }, {}, ["--empty", "--foo"], 0)
- t.same(parsed.empty, "")
- t.same(parsed.foo, "")
- t.end()
-})
-
-// https://github.com/npm/nopt/issues/66
-test("Empty String should not be true when type is single item Array", function (t) {
- var parsed = nopt({ 'foo': [String] }, {}, ["--foo"], 0)
- t.same(parsed.foo, "")
- t.end()
-})
-
-test("~ path is resolved to " + (isWin ? '%USERPROFILE%' : '$HOME'), function (t) {
- var path = require("path")
- , the
-
- if (isWin) {
- the = {
- key: 'USERPROFILE',
- dir: 'C:\\temp',
- val: '~\\val'
- }
- } else {
- the = {
- key: 'HOME',
- dir: '/tmp',
- val: '~/val'
- }
- }
- if (!process.env[the.key]) process.env[the.key] = v.dir
- var parsed = nopt({key: path}, {}, ["--key=" + the.val], 0)
- t.same(parsed.key, path.resolve(process.env[the.key], "val"))
- t.end()
-})
-
-// https://github.com/npm/nopt/issues/24
-test("Unknown options are not parsed as numbers", function (t) {
- var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0)
- t.equal(parsed['leave-as-is'], '1.20')
- t.equal(parsed['parse-me'], 1.2)
- t.end()
-});
-
-// https://github.com/npm/nopt/issues/48
-test("Check types based on name of type", function (t) {
- var parsed = nopt({"parse-me": {name: "Number"}}, null, ['--parse-me=1.20'], 0)
- t.equal(parsed['parse-me'], 1.2)
- t.end()
-})
-
-
-test("Missing types are not parsed", function (t) {
- var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0)
- //should only contain argv
- t.equal(Object.keys(parsed).length, 1)
- t.end()
-})
-
-test("Types passed without a name are not parsed", function (t) {
- var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0)
- //should only contain argv
- t.equal(Object.keys(parsed).length, 1)
- t.end()
-})
-
-test("other tests", function (t) {
-
- var util = require("util")
- , Stream = require("stream")
- , path = require("path")
- , url = require("url")
-
- , shorthands =
- { s : ["--loglevel", "silent"]
- , d : ["--loglevel", "info"]
- , dd : ["--loglevel", "verbose"]
- , ddd : ["--loglevel", "silly"]
- , noreg : ["--no-registry"]
- , reg : ["--registry"]
- , "no-reg" : ["--no-registry"]
- , silent : ["--loglevel", "silent"]
- , verbose : ["--loglevel", "verbose"]
- , h : ["--usage"]
- , H : ["--usage"]
- , "?" : ["--usage"]
- , help : ["--usage"]
- , v : ["--version"]
- , f : ["--force"]
- , desc : ["--description"]
- , "no-desc" : ["--no-description"]
- , "local" : ["--no-global"]
- , l : ["--long"]
- , p : ["--parseable"]
- , porcelain : ["--parseable"]
- , g : ["--global"]
- }
-
- , types =
- { aoa: Array
- , nullstream: [null, Stream]
- , date: Date
- , str: String
- , browser : String
- , cache : path
- , color : ["always", Boolean]
- , depth : Number
- , description : Boolean
- , dev : Boolean
- , editor : path
- , force : Boolean
- , global : Boolean
- , globalconfig : path
- , group : [String, Number]
- , gzipbin : String
- , logfd : [Number, Stream]
- , loglevel : ["silent","win","error","warn","info","verbose","silly"]
- , long : Boolean
- , "node-version" : [false, String]
- , npaturl : url
- , npat : Boolean
- , "onload-script" : [false, String]
- , outfd : [Number, Stream]
- , parseable : Boolean
- , pre: Boolean
- , prefix: path
- , proxy : url
- , "rebuild-bundle" : Boolean
- , registry : url
- , searchopts : String
- , searchexclude: [null, String]
- , shell : path
- , t: [Array, String]
- , tag : String
- , tar : String
- , tmp : path
- , "unsafe-perm" : Boolean
- , usage : Boolean
- , user : String
- , username : String
- , userconfig : path
- , version : Boolean
- , viewer: path
- , _exit : Boolean
- , path: path
- }
-
- ; [["-v", {version:true}, []]
- ,["---v", {version:true}, []]
- ,["ls -s --no-reg connect -d",
- {loglevel:"info",registry:null},["ls","connect"]]
- ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]]
- ,["ls --registry blargle", {}, ["ls"]]
- ,["--no-registry", {registry:null}, []]
- ,["--no-color true", {color:false}, []]
- ,["--no-color false", {color:true}, []]
- ,["--no-color", {color:false}, []]
- ,["--color false", {color:false}, []]
- ,["--color --logfd 7", {logfd:7,color:true}, []]
- ,["--color=true", {color:true}, []]
- ,["--logfd=10", {logfd:10}, []]
- ,["--tmp=/tmp -tar=gtar", {tmp: isWin ? "C:\\tmp" : "/tmp",tar:"gtar"},[]]
- ,["--tmp=tmp -tar=gtar",
- {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]]
- ,["--logfd x", {}, []]
- ,["a -true -- -no-false", {true:true},["a","-no-false"]]
- ,["a -no-false", {false:false},["a"]]
- ,["a -no-no-true", {true:true}, ["a"]]
- ,["a -no-no-no-false", {false:false}, ["a"]]
- ,["---NO-no-No-no-no-no-nO-no-no"+
- "-No-no-no-no-no-no-no-no-no"+
- "-no-no-no-no-NO-NO-no-no-no-no-no-no"+
- "-no-body-can-do-the-boogaloo-like-I-do"
- ,{"body-can-do-the-boogaloo-like-I-do":false}, []]
- ,["we are -no-strangers-to-love "+
- "--you-know=the-rules --and=so-do-i "+
- "---im-thinking-of=a-full-commitment "+
- "--no-you-would-get-this-from-any-other-guy "+
- "--no-gonna-give-you-up "+
- "-no-gonna-let-you-down=true "+
- "--no-no-gonna-run-around false "+
- "--desert-you=false "+
- "--make-you-cry false "+
- "--no-tell-a-lie "+
- "--no-no-and-hurt-you false"
- ,{"strangers-to-love":false
- ,"you-know":"the-rules"
- ,"and":"so-do-i"
- ,"you-would-get-this-from-any-other-guy":false
- ,"gonna-give-you-up":false
- ,"gonna-let-you-down":false
- ,"gonna-run-around":false
- ,"desert-you":false
- ,"make-you-cry":false
- ,"tell-a-lie":false
- ,"and-hurt-you":false
- },["we", "are"]]
- ,["-t one -t two -t three"
- ,{t: ["one", "two", "three"]}
- ,[]]
- ,["-t one -t null -t three four five null"
- ,{t: ["one", "null", "three"]}
- ,["four", "five", "null"]]
- ,["-t foo"
- ,{t:["foo"]}
- ,[]]
- ,["--no-t"
- ,{t:["false"]}
- ,[]]
- ,["-no-no-t"
- ,{t:["true"]}
- ,[]]
- ,["-aoa one -aoa null -aoa 100"
- ,{aoa:["one", null, '100']}
- ,[]]
- ,["-str 100"
- ,{str:"100"}
- ,[]]
- ,["--color always"
- ,{color:"always"}
- ,[]]
- ,["--no-nullstream"
- ,{nullstream:null}
- ,[]]
- ,["--nullstream false"
- ,{nullstream:null}
- ,[]]
- ,["--notadate=2011-01-25"
- ,{notadate: "2011-01-25"}
- ,[]]
- ,["--date 2011-01-25"
- ,{date: new Date("2011-01-25")}
- ,[]]
- ,["-cl 1"
- ,{config: true, length: 1}
- ,[]
- ,{config: Boolean, length: Number, clear: Boolean}
- ,{c: "--config", l: "--length"}]
- ,["--acount bla"
- ,{"acount":true}
- ,["bla"]
- ,{account: Boolean, credentials: Boolean, options: String}
- ,{a:"--account", c:"--credentials",o:"--options"}]
- ,["--clear"
- ,{clear:true}
- ,[]
- ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean}
- ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}]
- ,["--file -"
- ,{"file":"-"}
- ,[]
- ,{file:String}
- ,{}]
- ,["--file -"
- ,{"file":true}
- ,["-"]
- ,{file:Boolean}
- ,{}]
- ,["--path"
- ,{"path":null}
- ,[]]
- ,["--path ."
- ,{"path":process.cwd()}
- ,[]]
- ].forEach(function (test) {
- var argv = test[0].split(/\s+/)
- , opts = test[1]
- , rem = test[2]
- , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0)
- , parsed = actual.argv
- delete actual.argv
- for (var i in opts) {
- var e = JSON.stringify(opts[i])
- , a = JSON.stringify(actual[i] === undefined ? null : actual[i])
- if (e && typeof e === "object") {
- t.deepEqual(e, a)
- } else {
- t.equal(e, a)
- }
- }
- t.deepEqual(rem, parsed.remain)
- })
- t.end()
-})
diff --git a/node_modules/npm-audit-report/CHANGELOG.md b/node_modules/npm-audit-report/CHANGELOG.md
index 941a18741b600..58819a43b4d11 100644
--- a/node_modules/npm-audit-report/CHANGELOG.md
+++ b/node_modules/npm-audit-report/CHANGELOG.md
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [1.3.3](https://github.com/npm/npm-audit-report/compare/v1.3.2...v1.3.3) (2020-03-26)
+
+
+
## [1.3.2](https://github.com/npm/npm-audit-report/compare/v1.3.1...v1.3.2) (2018-12-18)
diff --git a/node_modules/npm-audit-report/package.json b/node_modules/npm-audit-report/package.json
index 905c0ce33da3d..dfc8bda28f844 100644
--- a/node_modules/npm-audit-report/package.json
+++ b/node_modules/npm-audit-report/package.json
@@ -1,28 +1,28 @@
{
- "_from": "npm-audit-report@1.3.2",
- "_id": "npm-audit-report@1.3.2",
+ "_from": "npm-audit-report@1.3.3",
+ "_id": "npm-audit-report@1.3.3",
"_inBundle": false,
- "_integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==",
+ "_integrity": "sha512-8nH/JjsFfAWMvn474HB9mpmMjrnKb1Hx/oTAdjv4PT9iZBvBxiZ+wtDUapHCJwLqYGQVPaAfs+vL5+5k9QndXw==",
"_location": "/npm-audit-report",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-audit-report@1.3.2",
+ "raw": "npm-audit-report@1.3.3",
"name": "npm-audit-report",
"escapedName": "npm-audit-report",
- "rawSpec": "1.3.2",
+ "rawSpec": "1.3.3",
"saveSpec": null,
- "fetchSpec": "1.3.2"
+ "fetchSpec": "1.3.3"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz",
- "_shasum": "303bc78cd9e4c226415076a4f7e528c89fc77018",
- "_spec": "npm-audit-report@1.3.2",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.3.tgz",
+ "_shasum": "8226deeb253b55176ed147592a3995442f2179ed",
+ "_spec": "npm-audit-report@1.3.3",
+ "_where": "/Users/claudiahdz/npm/cli",
"author": {
"name": "Adam Baldwin"
},
@@ -40,9 +40,7 @@
"keyfob": "^1.0.0",
"standard": "^11.0.1",
"standard-version": "^4.3.0",
- "tap": "^11.1.5",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
+ "tap": "^11.1.5"
},
"directories": {
"lib": "lib",
@@ -72,9 +70,7 @@
"prerelease": "npm t",
"pretest": "standard",
"release": "standard-version -s",
- "test": "tap --100 -J --coverage test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ "test": "tap --100 -J --coverage test/*.js"
},
- "version": "1.3.2"
+ "version": "1.3.3"
}
diff --git a/node_modules/npm-lifecycle/CHANGELOG.md b/node_modules/npm-lifecycle/CHANGELOG.md
index ccdd777ee1975..cf10c2f580ace 100644
--- a/node_modules/npm-lifecycle/CHANGELOG.md
+++ b/node_modules/npm-lifecycle/CHANGELOG.md
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [3.1.5](https://github.com/npm/lifecycle/compare/v3.1.4...v3.1.5) (2020-03-26)
+
+
+
## [3.1.4](https://github.com/npm/lifecycle/compare/v3.1.3...v3.1.4) (2019-09-18)
diff --git a/node_modules/npm-lifecycle/README.md b/node_modules/npm-lifecycle/README.md
index c81d3d7a10df7..a22adf1c22421 100644
--- a/node_modules/npm-lifecycle/README.md
+++ b/node_modules/npm-lifecycle/README.md
@@ -1,4 +1,15 @@
-# npm-lifecycle [](https://npm.im/npm-lifecycle) [](https://npm.im/npm-lifecycle) [](https://travis-ci.org/npm/npm-lifecycle) [](https://ci.appveyor.com/project/npm/npm-lifecycle) [](https://coveralls.io/github/npm/npm-lifecycle?branch=latest)
+# Note: pending imminent deprecation
+
+**This module will be deprecated once npm v7 is released. Please do not rely
+on it more than absolutely necessary.**
+
+The lifecycle script runner used in npm v7 is
+[@npmcli/run-script](http://npm.im/@npmcli/run-script). Please use that
+module moving forward.
+
+-----
+
+# npm-lifecycle
[`npm-lifecycle`](https://github.com/npm/npm-lifecycle) is a standalone library for
executing packages' lifecycle scripts. It is extracted from npm itself and
@@ -22,18 +33,6 @@ intended to be fully compatible with the way npm executes individual scripts.
// idk yet
```
-### Features
-
-* something cool
-
-### Contributing
-
-The npm team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
### API
#### `> lifecycle(name, pkg, wd, [opts]) -> Promise`
diff --git a/node_modules/npm-lifecycle/package.json b/node_modules/npm-lifecycle/package.json
index beeb598957898..35fdaa709901f 100644
--- a/node_modules/npm-lifecycle/package.json
+++ b/node_modules/npm-lifecycle/package.json
@@ -1,19 +1,19 @@
{
- "_from": "npm-lifecycle@3.1.4",
- "_id": "npm-lifecycle@3.1.4",
+ "_from": "npm-lifecycle@3.1.5",
+ "_id": "npm-lifecycle@3.1.5",
"_inBundle": false,
- "_integrity": "sha512-tgs1PaucZwkxECGKhC/stbEgFyc3TGh2TJcg2CDr6jbvQRdteHNhmMeljRzpe4wgFAXQADoy1cSqqi7mtiAa5A==",
+ "_integrity": "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==",
"_location": "/npm-lifecycle",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-lifecycle@3.1.4",
+ "raw": "npm-lifecycle@3.1.5",
"name": "npm-lifecycle",
"escapedName": "npm-lifecycle",
- "rawSpec": "3.1.4",
+ "rawSpec": "3.1.5",
"saveSpec": null,
- "fetchSpec": "3.1.4"
+ "fetchSpec": "3.1.5"
},
"_requiredBy": [
"#USER",
@@ -21,10 +21,10 @@
"/libcipm",
"/libnpm"
],
- "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz",
- "_shasum": "de6975c7d8df65f5150db110b57cce498b0b604c",
- "_spec": "npm-lifecycle@3.1.4",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz",
+ "_shasum": "9882d3642b8c82c815782a12e6a1bfeed0026309",
+ "_spec": "npm-lifecycle@3.1.5",
+ "_where": "/Users/claudiahdz/npm/cli",
"author": {
"name": "Mike Sherov"
},
@@ -49,9 +49,7 @@
"sinon": "^7.2.3",
"standard": "^12.0.1",
"standard-version": "^4.4.0",
- "tap": "^12.7.0",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
+ "tap": "^12.7.0"
},
"files": [
"index.js",
@@ -78,9 +76,7 @@
"pretest": "standard",
"release": "standard-version -s",
"snap": "TAP_SNAPSHOT=1 npm test",
- "test": "tap -J --cov test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ "test": "tap -J --cov test/*.js"
},
- "version": "3.1.4"
+ "version": "3.1.5"
}
diff --git a/node_modules/npm-packlist/package.json b/node_modules/npm-packlist/package.json
index c022dcef65b51..693c51b96140d 100644
--- a/node_modules/npm-packlist/package.json
+++ b/node_modules/npm-packlist/package.json
@@ -1,29 +1,29 @@
{
- "_from": "npm-packlist@1.4.7",
- "_id": "npm-packlist@1.4.7",
+ "_from": "npm-packlist@1.4.8",
+ "_id": "npm-packlist@1.4.8",
"_inBundle": false,
- "_integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==",
+ "_integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==",
"_location": "/npm-packlist",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-packlist@1.4.7",
+ "raw": "npm-packlist@1.4.8",
"name": "npm-packlist",
"escapedName": "npm-packlist",
- "rawSpec": "1.4.7",
+ "rawSpec": "1.4.8",
"saveSpec": null,
- "fetchSpec": "1.4.7"
+ "fetchSpec": "1.4.8"
},
"_requiredBy": [
"#USER",
"/",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz",
- "_shasum": "9e954365a06b80b18111ea900945af4f88ed4848",
- "_spec": "npm-packlist@1.4.7",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz",
+ "_shasum": "56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e",
+ "_spec": "npm-packlist@1.4.8",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -35,7 +35,8 @@
"bundleDependencies": false,
"dependencies": {
"ignore-walk": "^3.0.1",
- "npm-bundled": "^1.0.1"
+ "npm-bundled": "^1.0.1",
+ "npm-normalize-package-bin": "^1.0.1"
},
"deprecated": false,
"description": "Get a list of the files to add from a folder into an npm package",
@@ -71,5 +72,5 @@
"tap": {
"jobs": 1
},
- "version": "1.4.7"
+ "version": "1.4.8"
}
diff --git a/node_modules/npm-profile/index.js b/node_modules/npm-profile/index.js
index b7f753fb4d41d..d9c48c131bc92 100644
--- a/node_modules/npm-profile/index.js
+++ b/node_modules/npm-profile/index.js
@@ -1,7 +1,7 @@
'use strict'
const fetch = require('npm-registry-fetch')
-const {HttpErrorBase} = require('npm-registry-fetch/errors.js')
+const { HttpErrorBase } = require('npm-registry-fetch/errors.js')
const os = require('os')
const pudding = require('figgy-pudding')
const validate = require('aproba')
@@ -18,6 +18,16 @@ exports.listTokens = listTokens
exports.removeToken = removeToken
exports.createToken = createToken
+const url = require('url')
+
+const isValidUrl = u => {
+ if (u && typeof u === 'string') {
+ const p = url.parse(u)
+ return p.slashes && p.host && p.path && /^https?:$/.test(p.protocol)
+ }
+ return false
+}
+
const ProfileConfig = pudding({
creds: {},
hostname: {},
@@ -76,21 +86,16 @@ function webAuth (opener, opts, body) {
})).then(res => {
return Promise.all([res, res.json()])
}).then(([res, content]) => {
- const {doneUrl, loginUrl} = content
+ const { doneUrl, loginUrl } = content
process.emit('log', 'verbose', 'web auth', 'got response', content)
- if (
- typeof doneUrl !== 'string' ||
- typeof loginUrl !== 'string' ||
- !doneUrl ||
- !loginUrl
- ) {
+ if (!isValidUrl(doneUrl) || !isValidUrl(loginUrl)) {
throw new WebLoginInvalidResponse('POST', res, content)
}
return content
- }).then(({doneUrl, loginUrl}) => {
+ }).then(({ doneUrl, loginUrl }) => {
process.emit('log', 'verbose', 'web auth', 'opening url pair')
return opener(loginUrl).then(
- () => webAuthCheckLogin(doneUrl, opts.concat({cache: false}))
+ () => webAuthCheckLogin(doneUrl, opts.concat({ cache: false }))
)
}).catch(er => {
if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) {
@@ -183,7 +188,7 @@ function loginCouch (username, password, opts) {
}
if (err.code !== 'E409') throw err
return fetch.json(target, opts.concat({
- query: {write: true}
+ query: { write: true }
})).then(result => {
Object.keys(result).forEach(function (k) {
if (!body[k] || k === 'roles') {
diff --git a/node_modules/npm-profile/package.json b/node_modules/npm-profile/package.json
index 2f252aac85ab0..e90e16ddf975d 100644
--- a/node_modules/npm-profile/package.json
+++ b/node_modules/npm-profile/package.json
@@ -1,28 +1,29 @@
{
- "_from": "npm-profile@4.0.2",
- "_id": "npm-profile@4.0.2",
+ "_from": "npm-profile@4.0.4",
+ "_id": "npm-profile@4.0.4",
"_inBundle": false,
- "_integrity": "sha512-VRsC04pvRH+9cF+PoVh2nTmJjiG21yu59IHpsBpkxk+jaGAV8lxx96G4SDc0jOHAkfWLXbc6kIph3dGAuRnotQ==",
+ "_integrity": "sha512-Ta8xq8TLMpqssF0H60BXS1A90iMoM6GeKwsmravJ6wYjWwSzcYBTdyWa3DZCYqPutacBMEm7cxiOkiIeCUAHDQ==",
"_location": "/npm-profile",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-profile@4.0.2",
+ "raw": "npm-profile@4.0.4",
"name": "npm-profile",
"escapedName": "npm-profile",
- "rawSpec": "4.0.2",
+ "rawSpec": "4.0.4",
"saveSpec": null,
- "fetchSpec": "4.0.2"
+ "fetchSpec": "4.0.4"
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/libnpm"
],
- "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.2.tgz",
- "_shasum": "8272a71c19634d0dce9c35a5daf8ee589cbb0f52",
- "_spec": "npm-profile@4.0.2",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.4.tgz",
+ "_shasum": "28ee94390e936df6d084263ee2061336a6a1581b",
+ "_spec": "npm-profile@4.0.4",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -48,9 +49,12 @@
"license": "ISC",
"main": "index.js",
"name": "npm-profile",
+ "publishConfig": {
+ "tag": "legacy-v4"
+ },
"repository": {
"type": "git",
"url": "git+https://github.com/npm/npm-profile.git"
},
- "version": "4.0.2"
+ "version": "4.0.4"
}
diff --git a/node_modules/npm-registry-fetch/CHANGELOG.md b/node_modules/npm-registry-fetch/CHANGELOG.md
index 8eee50a4790a3..04a4dd901b0f8 100644
--- a/node_modules/npm-registry-fetch/CHANGELOG.md
+++ b/node_modules/npm-registry-fetch/CHANGELOG.md
@@ -2,6 +2,47 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [4.0.7](https://github.com/npm/registry-fetch/compare/v4.0.6...v4.0.7) (2020-08-17)
+
+
+### Bug Fixes
+
+* correct password redaction ([110032b](https://github.com/npm/registry-fetch/commit/110032b))
+
+
+
+
+## [4.0.6](https://github.com/npm/registry-fetch/compare/v4.0.5...v4.0.6) (2020-08-14)
+
+
+### Bug Fixes
+
+* import URL from url module ([cd35987](https://github.com/npm/registry-fetch/commit/cd35987))
+
+
+
+
+## [4.0.5](https://github.com/npm/registry-fetch/compare/v4.0.4...v4.0.5) (2020-06-30)
+
+
+
+
+## [4.0.4](https://github.com/npm/registry-fetch/compare/v4.0.3...v4.0.4) (2020-04-28)
+
+
+
+
+## [4.0.3](https://github.com/npm/registry-fetch/compare/v4.0.2...v4.0.3) (2020-02-13)
+
+
+### Bug Fixes
+
+* always bypass cache when ?write=true ([ba8b4fe](https://github.com/npm/registry-fetch/commit/ba8b4fe))
+* use 30s default for timeout as per README ([69c2977](https://github.com/npm/registry-fetch/commit/69c2977)), closes [#20](https://github.com/npm/registry-fetch/issues/20)
+
+
+
## [4.0.2](https://github.com/npm/registry-fetch/compare/v4.0.0...v4.0.2) (2019-10-04)
diff --git a/node_modules/npm-registry-fetch/README.md b/node_modules/npm-registry-fetch/README.md
index 0c3f4f9469955..9f9c6d0e808fd 100644
--- a/node_modules/npm-registry-fetch/README.md
+++ b/node_modules/npm-registry-fetch/README.md
@@ -50,6 +50,25 @@ Happy hacking!
### API
+#### Caching and `write=true` query strings
+
+Before performing any PUT or DELETE operation, npm clients first make a
+GET request to the registry resource being updated, which includes
+the query string `?write=true`.
+
+The semantics of this are, effectively, "I intend to write to this thing,
+and need to know the latest current value, so that my write can land
+cleanly".
+
+The public npm registry handles these `?write=true` requests by ensuring
+that the cache is re-validated before sending a response. In order to
+maintain the same behavior on the client, and not get tripped up by an
+overeager local cache when we intend to write data to the registry, any
+request that comes through `npm-registry-fetch` that contains `write=true`
+in the query string will forcibly set the `prefer-online` option to `true`,
+and set both `prefer-offline` and `offline` to false, so that any local
+cached value will be revalidated.
+
#### `> fetch(url, [opts]) -> Promise`
Performs a request to a given URL.
@@ -391,6 +410,9 @@ Force offline mode: no network requests will be done during install. To allow
This option is only really useful if you're also using
[`opts.cache`](#opts-cache).
+This option is set to `true` when the request includes `write=true` in the
+query string.
+
##### `opts.otp`
* Type: Number | String
@@ -402,7 +424,7 @@ account.
##### `opts.password`
-* Alias: _password
+* Alias: `_password`
* Type: String
* Default: null
@@ -432,6 +454,9 @@ will be requested from the server. To force full offline mode, use
This option is generally only useful if you're also using
[`opts.cache`](#opts-cache).
+This option is set to `false` when the request includes `write=true` in the
+query string.
+
##### `opts.prefer-online`
* Type: Boolean
@@ -443,6 +468,8 @@ for updates immediately even for fresh package data.
This option is generally only useful if you're also using
[`opts.cache`](#opts-cache).
+This option is set to `true` when the request includes `write=true` in the
+query string.
##### `opts.project-scope`
@@ -554,7 +581,7 @@ See also [`opts.ca`](#opts-ca).
##### `opts.timeout`
* Type: Milliseconds
-* Default: 30000 (30 seconds)
+* Default: 0 (no timeout)
Time before a hanging request times out.
@@ -606,4 +633,4 @@ See also [`opts.password`](#opts-password)
* Default: null
** DEPRECATED ** This is a legacy authentication token supported only for
-*compatibility. Please use [`opts.token`](#opts-token) instead.
+compatibility. Please use [`opts.token`](#opts-token) instead.
diff --git a/node_modules/npm-registry-fetch/check-response.js b/node_modules/npm-registry-fetch/check-response.js
index 14058239ba3f5..79170a7fbdaf3 100644
--- a/node_modules/npm-registry-fetch/check-response.js
+++ b/node_modules/npm-registry-fetch/check-response.js
@@ -29,9 +29,22 @@ function logRequest (method, res, startTime, opts) {
const attempt = res.headers.get('x-fetch-attempts')
const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : ''
const cacheStr = res.headers.get('x-local-cache') ? ' (from cache)' : ''
+
+ let urlStr
+ try {
+ const URL = require('url').URL
+ const url = new URL(res.url)
+ if (url.password) {
+ url.password = '***'
+ }
+ urlStr = url.toString()
+ } catch (er) {
+ urlStr = res.url
+ }
+
opts.log.http(
'fetch',
- `${method.toUpperCase()} ${res.status} ${res.url} ${elapsedTime}ms${attemptStr}${cacheStr}`
+ `${method.toUpperCase()} ${res.status} ${urlStr} ${elapsedTime}ms${attemptStr}${cacheStr}`
)
}
diff --git a/node_modules/npm-registry-fetch/config.js b/node_modules/npm-registry-fetch/config.js
index 1c43b26eadd4c..c4e8b687412a5 100644
--- a/node_modules/npm-registry-fetch/config.js
+++ b/node_modules/npm-registry-fetch/config.js
@@ -75,7 +75,9 @@ module.exports = figgyPudding({
'scope': {},
'spec': {},
'strict-ssl': {},
- 'timeout': {},
+ 'timeout': {
+ default: 0
+ },
'user-agent': {
default: `${
pkg.name
diff --git a/node_modules/npm-registry-fetch/index.js b/node_modules/npm-registry-fetch/index.js
index c18487388b269..9bd0ad32d7c9e 100644
--- a/node_modules/npm-registry-fetch/index.js
+++ b/node_modules/npm-registry-fetch/index.js
@@ -53,26 +53,38 @@ function regFetch (uri, opts) {
})
}
}
- if (opts.query) {
- let q = opts.query
+
+ let q = opts.query
+ if (q) {
if (typeof q === 'string') {
q = qs.parse(q)
+ } else if (typeof q !== 'object') {
+ throw new TypeError('invalid query option, must be string or object')
}
Object.keys(q).forEach(key => {
if (q[key] === undefined) {
delete q[key]
}
})
- if (Object.keys(q).length) {
- const parsed = url.parse(uri)
- parsed.search = '?' + qs.stringify(
- parsed.query
- ? Object.assign(qs.parse(parsed.query), q)
- : q
- )
- uri = url.format(parsed)
+ }
+ const parsed = url.parse(uri)
+
+ const query = parsed.query ? Object.assign(qs.parse(parsed.query), q || {})
+ : Object.keys(q || {}).length ? q
+ : null
+
+ if (query) {
+ if (String(query.write) === 'true' && opts.method === 'GET') {
+ opts = opts.concat({
+ offline: false,
+ 'prefer-offline': false,
+ 'prefer-online': true
+ })
}
+ parsed.search = '?' + qs.stringify(query)
+ uri = url.format(parsed)
}
+
return opts.Promise.resolve(body).then(body => fetch(uri, {
agent: opts.agent,
algorithms: opts.algorithms,
diff --git a/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md b/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md
index 356e3519302cf..e9a81afd0406f 100644
--- a/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md
+++ b/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md
@@ -22,8 +22,6 @@
npm install safe-buffer
```
-[Get supported safe-buffer with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-safe-buffer?utm_source=npm-safe-buffer&utm_medium=referral&utm_campaign=readme)
-
## usage
The goal of this package is to provide a safe replacement for the node.js `Buffer`.
diff --git a/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js b/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js
index 054c8d30ddafb..f8d3ec98852f4 100644
--- a/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js
+++ b/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js
@@ -1,3 +1,4 @@
+/*! safe-buffer. MIT License. Feross Aboukhadijeh */
/* eslint-disable node/no-deprecated-api */
var buffer = require('buffer')
var Buffer = buffer.Buffer
diff --git a/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json b/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json
index 576c453b23322..5062922aecfe7 100644
--- a/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json
+++ b/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json
@@ -1,8 +1,8 @@
{
"_from": "safe-buffer@^5.2.0",
- "_id": "safe-buffer@5.2.0",
+ "_id": "safe-buffer@5.2.1",
"_inBundle": false,
- "_integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
+ "_integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"_location": "/npm-registry-fetch/safe-buffer",
"_phantomChildren": {},
"_requested": {
@@ -18,14 +18,14 @@
"_requiredBy": [
"/npm-registry-fetch"
],
- "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
- "_shasum": "b74daec49b1148f88c64b68d49b1e815c1f2f519",
+ "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "_shasum": "1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6",
"_spec": "safe-buffer@^5.2.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/npm-registry-fetch",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/npm-registry-fetch",
"author": {
"name": "Feross Aboukhadijeh",
"email": "feross@feross.org",
- "url": "http://feross.org"
+ "url": "https://feross.org"
},
"bugs": {
"url": "https://github.com/feross/safe-buffer/issues"
@@ -35,8 +35,22 @@
"description": "Safer Node.js Buffer API",
"devDependencies": {
"standard": "*",
- "tape": "^4.0.0"
+ "tape": "^5.0.0"
},
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
"homepage": "https://github.com/feross/safe-buffer",
"keywords": [
"buffer",
@@ -58,5 +72,5 @@
"test": "standard && tape test/*.js"
},
"types": "index.d.ts",
- "version": "5.2.0"
+ "version": "5.2.1"
}
diff --git a/node_modules/npm-registry-fetch/package.json b/node_modules/npm-registry-fetch/package.json
index 78e3100daa47f..a5ac4817ff51b 100644
--- a/node_modules/npm-registry-fetch/package.json
+++ b/node_modules/npm-registry-fetch/package.json
@@ -1,19 +1,19 @@
{
- "_from": "npm-registry-fetch@4.0.2",
- "_id": "npm-registry-fetch@4.0.2",
+ "_from": "npm-registry-fetch@4.0.7",
+ "_id": "npm-registry-fetch@4.0.7",
"_inBundle": false,
- "_integrity": "sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A==",
+ "_integrity": "sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ==",
"_location": "/npm-registry-fetch",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-registry-fetch@4.0.2",
+ "raw": "npm-registry-fetch@4.0.7",
"name": "npm-registry-fetch",
"escapedName": "npm-registry-fetch",
- "rawSpec": "4.0.2",
+ "rawSpec": "4.0.7",
"saveSpec": null,
- "fetchSpec": "4.0.2"
+ "fetchSpec": "4.0.7"
},
"_requiredBy": [
"#USER",
@@ -28,10 +28,10 @@
"/npm-profile",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz",
- "_shasum": "2b1434f93ccbe6b6385f8e45f45db93e16921d7a",
- "_spec": "npm-registry-fetch@4.0.2",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz",
+ "_shasum": "57951bf6541e0246b34c9f9a38ab73607c9449d7",
+ "_spec": "npm-registry-fetch@4.0.7",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/latest",
"author": {
"name": "Kat Marchรกn",
"email": "kzm@sykosomatic.org"
@@ -86,18 +86,21 @@
"license": "ISC",
"main": "index.js",
"name": "npm-registry-fetch",
+ "publishConfig": {
+ "tag": "latest-v4"
+ },
"repository": {
"type": "git",
"url": "git+https://github.com/npm/registry-fetch.git"
},
"scripts": {
"postrelease": "npm publish && git push --follow-tags",
+ "posttest": "standard",
"prerelease": "npm t",
- "pretest": "standard",
"release": "standard-version -s",
"test": "tap -J --coverage test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "4.0.2"
+ "version": "4.0.7"
}
diff --git a/node_modules/npm-user-validate/npm-user-validate.js b/node_modules/npm-user-validate/npm-user-validate.js
index 9250ce33a4abe..ffd8791c7eb95 100644
--- a/node_modules/npm-user-validate/npm-user-validate.js
+++ b/node_modules/npm-user-validate/npm-user-validate.js
@@ -11,6 +11,7 @@ var requirements = exports.requirements = {
},
password: {},
email: {
+ length: 'Email length must be less then or equal to 254 characters long',
valid: 'Email must be an email address'
}
}
@@ -45,7 +46,10 @@ function username (un) {
}
function email (em) {
- if (!em.match(/^.+@.+\..+$/)) {
+ if (em.length > 254) {
+ return new Error(requirements.email.length)
+ }
+ if (!em.match(/^[^@]+@.+\..+$/)) {
return new Error(requirements.email.valid)
}
diff --git a/node_modules/npm-user-validate/package.json b/node_modules/npm-user-validate/package.json
index 36260f2d26bfc..2b664ec7e995f 100644
--- a/node_modules/npm-user-validate/package.json
+++ b/node_modules/npm-user-validate/package.json
@@ -1,32 +1,28 @@
{
- "_args": [
- [
- "npm-user-validate@1.0.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "npm-user-validate@1.0.0",
- "_id": "npm-user-validate@1.0.0",
+ "_from": "npm-user-validate@1.0.1",
+ "_id": "npm-user-validate@1.0.1",
"_inBundle": false,
- "_integrity": "sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=",
+ "_integrity": "sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw==",
"_location": "/npm-user-validate",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-user-validate@1.0.0",
+ "raw": "npm-user-validate@1.0.1",
"name": "npm-user-validate",
"escapedName": "npm-user-validate",
- "rawSpec": "1.0.0",
+ "rawSpec": "1.0.1",
"saveSpec": null,
- "fetchSpec": "1.0.0"
+ "fetchSpec": "1.0.1"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.0.tgz",
- "_spec": "1.0.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.1.tgz",
+ "_shasum": "31428fc5475fe8416023f178c0ab47935ad8c561",
+ "_spec": "npm-user-validate@1.0.1",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"author": {
"name": "Robert Kowalski",
"email": "rok@kowalski.gd"
@@ -34,6 +30,8 @@
"bugs": {
"url": "https://github.com/npm/npm-user-validate/issues"
},
+ "bundleDependencies": false,
+ "deprecated": false,
"description": "User validations for npm",
"devDependencies": {
"standard": "^8.4.0",
@@ -60,5 +58,5 @@
"pretest": "standard",
"test": "tap --100 test/*.js"
},
- "version": "1.0.0"
+ "version": "1.0.1"
}
diff --git a/node_modules/opener/LICENSE.txt b/node_modules/opener/LICENSE.txt
index 251b540e2e63a..f74bd1310f4e0 100644
--- a/node_modules/opener/LICENSE.txt
+++ b/node_modules/opener/LICENSE.txt
@@ -2,7 +2,7 @@ Dual licensed under WTFPL and MIT:
---
-Copyright ยฉ 2012โ2018 Domenic Denicola
+Copyright ยฉ 2012โ2020 Domenic Denicola
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
@@ -26,7 +26,7 @@ as published by Sam Hocevar. See below for more details.
The MIT License (MIT)
-Copyright ยฉ 2012โ2018 Domenic Denicola
+Copyright ยฉ 2012โ2020 Domenic Denicola
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/opener/README.md b/node_modules/opener/README.md
index 1d81513b160d0..51cc1a28c56d3 100644
--- a/node_modules/opener/README.md
+++ b/node_modules/opener/README.md
@@ -34,7 +34,6 @@ editor.stdout.unref();
editor.stderr.unref();
```
-
## Use It for Good
Like opening the user's browser with a test harness in your package's test script:
@@ -52,4 +51,4 @@ Like opening the user's browser with a test harness in your package's test scrip
## Why
-Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least [according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all three. Like Node.js. And Opener.
+Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least [according to some person on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all three. Like Node.js. And Opener.
diff --git a/node_modules/opener/lib/opener.js b/node_modules/opener/lib/opener.js
index 5fa88f375ac85..08888c6bb8a2a 100644
--- a/node_modules/opener/lib/opener.js
+++ b/node_modules/opener/lib/opener.js
@@ -55,9 +55,9 @@ module.exports = function opener(args, options, callback) {
// Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title,
// so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191
//
- // Additionally, on Windows ampersand needs to be escaped when passed to "start"
+ // Additionally, on Windows ampersand and caret need to be escaped when passed to "start"
args = args.map(function (value) {
- return value.replace(/&/g, "^&");
+ return value.replace(/[&^]/g, "^$&");
});
args = ["/c", "start", "\"\""].concat(args);
}
diff --git a/node_modules/opener/package.json b/node_modules/opener/package.json
index e69aa39637e2a..fe176bf7e1052 100644
--- a/node_modules/opener/package.json
+++ b/node_modules/opener/package.json
@@ -1,29 +1,29 @@
{
- "_from": "opener@1.5.1",
- "_id": "opener@1.5.1",
+ "_from": "opener@1.5.2",
+ "_id": "opener@1.5.2",
"_inBundle": false,
- "_integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==",
+ "_integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
"_location": "/opener",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "opener@1.5.1",
+ "raw": "opener@1.5.2",
"name": "opener",
"escapedName": "opener",
- "rawSpec": "1.5.1",
+ "rawSpec": "1.5.2",
"saveSpec": null,
- "fetchSpec": "1.5.1"
+ "fetchSpec": "1.5.2"
},
"_requiredBy": [
"#USER",
"/",
"/tap"
],
- "_resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz",
- "_shasum": "6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed",
- "_spec": "opener@1.5.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
+ "_shasum": "5d37e1f35077b9dcac4301372271afdeb2a13598",
+ "_spec": "opener@1.5.2",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"author": {
"name": "Domenic Denicola",
"email": "d@domenic.me",
@@ -39,7 +39,7 @@
"deprecated": false,
"description": "Opens stuff, like webpages and files and executables, cross-platform",
"devDependencies": {
- "eslint": "^5.3.0"
+ "eslint": "^7.7.0"
},
"files": [
"lib/",
@@ -56,5 +56,5 @@
"scripts": {
"lint": "eslint ."
},
- "version": "1.5.1"
+ "version": "1.5.2"
}
diff --git a/node_modules/os-locale/index.js b/node_modules/os-locale/index.js
deleted file mode 100644
index 8c73c99f20e2f..0000000000000
--- a/node_modules/os-locale/index.js
+++ /dev/null
@@ -1,114 +0,0 @@
-'use strict';
-const execa = require('execa');
-const lcid = require('lcid');
-const mem = require('mem');
-
-const defaultOptions = {spawn: true};
-const defaultLocale = 'en_US';
-
-function getEnvLocale(env = process.env) {
- return env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE;
-}
-
-function parseLocale(string) {
- const env = string.split('\n').reduce((env, def) => {
- const [key, value] = def.split('=');
- env[key] = value.replace(/^"|"$/g, '');
- return env;
- }, {});
-
- return getEnvLocale(env);
-}
-
-function getLocale(string) {
- return (string && string.replace(/[.:].*/, ''));
-}
-
-function getLocales() {
- return execa.stdout('locale', ['-a']);
-}
-
-function getLocalesSync() {
- return execa.sync('locale', ['-a']).stdout;
-}
-
-function getSupportedLocale(locale, locales = '') {
- return locales.includes(locale) ? locale : defaultLocale;
-}
-
-function getAppleLocale() {
- return Promise.all([
- execa.stdout('defaults', ['read', '-globalDomain', 'AppleLocale']),
- getLocales()
- ]).then(results => getSupportedLocale(results[0], results[1]));
-}
-
-function getAppleLocaleSync() {
- return getSupportedLocale(
- execa.sync('defaults', ['read', '-globalDomain', 'AppleLocale']).stdout,
- getLocalesSync()
- );
-}
-
-function getUnixLocale() {
- if (process.platform === 'darwin') {
- return getAppleLocale();
- }
-
- return execa.stdout('locale')
- .then(stdout => getLocale(parseLocale(stdout)));
-}
-
-function getUnixLocaleSync() {
- if (process.platform === 'darwin') {
- return getAppleLocaleSync();
- }
-
- return getLocale(parseLocale(execa.sync('locale').stdout));
-}
-
-function getWinLocale() {
- return execa.stdout('wmic', ['os', 'get', 'locale'])
- .then(stdout => {
- const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
- return lcid.from(lcidCode);
- });
-}
-
-function getWinLocaleSync() {
- const {stdout} = execa.sync('wmic', ['os', 'get', 'locale']);
- const lcidCode = parseInt(stdout.replace('Locale', ''), 16);
- return lcid.from(lcidCode);
-}
-
-module.exports = mem((options = defaultOptions) => {
- const envLocale = getEnvLocale();
-
- let thenable;
- if (envLocale || options.spawn === false) {
- thenable = Promise.resolve(getLocale(envLocale));
- } else if (process.platform === 'win32') {
- thenable = getWinLocale();
- } else {
- thenable = getUnixLocale();
- }
-
- return thenable
- .then(locale => locale || defaultLocale)
- .catch(() => defaultLocale);
-});
-
-module.exports.sync = mem((options = defaultOptions) => {
- const envLocale = getEnvLocale();
-
- let res;
- if (envLocale || options.spawn === false) {
- res = getLocale(envLocale);
- } else {
- try {
- res = process.platform === 'win32' ? getWinLocaleSync() : getUnixLocaleSync();
- } catch (_) {}
- }
-
- return res || defaultLocale;
-});
diff --git a/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md b/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md
deleted file mode 100644
index ded9620b18d25..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-
-## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02)
-
-
-### Bug Fixes
-
-* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005)
-
-
-
-
-## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31)
-
-
-### Bug Fixes
-
-* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90)
-
-
-
-
-## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23)
-
-
-
-
-## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23)
-
-
-
-
-## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23)
-
-
-
-
-# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23)
-
-
-### Bug Fixes
-
-* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51)
-* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
-* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
-* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
-
-
-### Features
-
-* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
-* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
-
-
-### Chores
-
-* upgrade tooling
-* upgrate project to es6 (node v4)
-
-
-### BREAKING CHANGES
-
-* remove support for older nodejs versions, only `node >= 4` is supported
-
-
-
-## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26)
-
-
-### Bug Fixes
-
-* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0)
-
-
-
-## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04)
-
-
-### Bug Fixes
-
-* fix `options.shell` support for NodeJS v7
-
-
-
-# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30)
-
-
-## Features
-
-* add support for `options.shell`
-* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module
-
-
-## Chores
-
-* refactor some code to make it more clear
-* update README caveats
diff --git a/node_modules/os-locale/node_modules/cross-spawn/README.md b/node_modules/os-locale/node_modules/cross-spawn/README.md
deleted file mode 100644
index e895cd7a77747..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# cross-spawn
-
-[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]
-
-[npm-url]:https://npmjs.org/package/cross-spawn
-[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg
-[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg
-[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn
-[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg
-[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
-[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
-[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn
-[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg
-[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn
-[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg
-[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev
-[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg
-[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg
-[greenkeeper-url]:https://greenkeeper.io/
-
-A cross platform solution to node's spawn and spawnSync.
-
-
-## Installation
-
-`$ npm install cross-spawn`
-
-
-## Why
-
-Node has issues when using spawn on Windows:
-
-- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
-- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
-- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
-- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
-- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
-- No `options.shell` support on node `` where `` must not contain any arguments.
-If you would like to have the shebang support improved, feel free to contribute via a pull-request.
-
-Remember to always test your code on Windows!
-
-
-## Tests
-
-`$ npm test`
-`$ npm test -- --watch` during development
-
-## License
-
-Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
diff --git a/node_modules/os-locale/node_modules/cross-spawn/index.js b/node_modules/os-locale/node_modules/cross-spawn/index.js
deleted file mode 100644
index 5509742ca9fa8..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-const cp = require('child_process');
-const parse = require('./lib/parse');
-const enoent = require('./lib/enoent');
-
-function spawn(command, args, options) {
- // Parse the arguments
- const parsed = parse(command, args, options);
-
- // Spawn the child process
- const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
-
- // Hook into child process "exit" event to emit an error if the command
- // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
- enoent.hookChildProcess(spawned, parsed);
-
- return spawned;
-}
-
-function spawnSync(command, args, options) {
- // Parse the arguments
- const parsed = parse(command, args, options);
-
- // Spawn the child process
- const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
-
- // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
- result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
-
- return result;
-}
-
-module.exports = spawn;
-module.exports.spawn = spawn;
-module.exports.sync = spawnSync;
-
-module.exports._parse = parse;
-module.exports._enoent = enoent;
diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js b/node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js
deleted file mode 100644
index 14df9b623d0a2..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-const isWin = process.platform === 'win32';
-
-function notFoundError(original, syscall) {
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
- code: 'ENOENT',
- errno: 'ENOENT',
- syscall: `${syscall} ${original.command}`,
- path: original.command,
- spawnargs: original.args,
- });
-}
-
-function hookChildProcess(cp, parsed) {
- if (!isWin) {
- return;
- }
-
- const originalEmit = cp.emit;
-
- cp.emit = function (name, arg1) {
- // If emitting "exit" event and exit code is 1, we need to check if
- // the command exists and emit an "error" instead
- // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
- if (name === 'exit') {
- const err = verifyENOENT(arg1, parsed, 'spawn');
-
- if (err) {
- return originalEmit.call(cp, 'error', err);
- }
- }
-
- return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
- };
-}
-
-function verifyENOENT(status, parsed) {
- if (isWin && status === 1 && !parsed.file) {
- return notFoundError(parsed.original, 'spawn');
- }
-
- return null;
-}
-
-function verifyENOENTSync(status, parsed) {
- if (isWin && status === 1 && !parsed.file) {
- return notFoundError(parsed.original, 'spawnSync');
- }
-
- return null;
-}
-
-module.exports = {
- hookChildProcess,
- verifyENOENT,
- verifyENOENTSync,
- notFoundError,
-};
diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/parse.js b/node_modules/os-locale/node_modules/cross-spawn/lib/parse.js
deleted file mode 100644
index 962827a94e8c0..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/lib/parse.js
+++ /dev/null
@@ -1,125 +0,0 @@
-'use strict';
-
-const path = require('path');
-const niceTry = require('nice-try');
-const resolveCommand = require('./util/resolveCommand');
-const escape = require('./util/escape');
-const readShebang = require('./util/readShebang');
-const semver = require('semver');
-
-const isWin = process.platform === 'win32';
-const isExecutableRegExp = /\.(?:com|exe)$/i;
-const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
-
-// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0
-const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false;
-
-function detectShebang(parsed) {
- parsed.file = resolveCommand(parsed);
-
- const shebang = parsed.file && readShebang(parsed.file);
-
- if (shebang) {
- parsed.args.unshift(parsed.file);
- parsed.command = shebang;
-
- return resolveCommand(parsed);
- }
-
- return parsed.file;
-}
-
-function parseNonShell(parsed) {
- if (!isWin) {
- return parsed;
- }
-
- // Detect & add support for shebangs
- const commandFile = detectShebang(parsed);
-
- // We don't need a shell if the command filename is an executable
- const needsShell = !isExecutableRegExp.test(commandFile);
-
- // If a shell is required, use cmd.exe and take care of escaping everything correctly
- // Note that `forceShell` is an hidden option used only in tests
- if (parsed.options.forceShell || needsShell) {
- // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
- // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
- // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
- // we need to double escape them
- const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
-
- // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
- // This is necessary otherwise it will always fail with ENOENT in those cases
- parsed.command = path.normalize(parsed.command);
-
- // Escape command & arguments
- parsed.command = escape.command(parsed.command);
- parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
-
- const shellCommand = [parsed.command].concat(parsed.args).join(' ');
-
- parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
- parsed.command = process.env.comspec || 'cmd.exe';
- parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
- }
-
- return parsed;
-}
-
-function parseShell(parsed) {
- // If node supports the shell option, there's no need to mimic its behavior
- if (supportsShellOption) {
- return parsed;
- }
-
- // Mimic node shell option
- // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
- const shellCommand = [parsed.command].concat(parsed.args).join(' ');
-
- if (isWin) {
- parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe';
- parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
- parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
- } else {
- if (typeof parsed.options.shell === 'string') {
- parsed.command = parsed.options.shell;
- } else if (process.platform === 'android') {
- parsed.command = '/system/bin/sh';
- } else {
- parsed.command = '/bin/sh';
- }
-
- parsed.args = ['-c', shellCommand];
- }
-
- return parsed;
-}
-
-function parse(command, args, options) {
- // Normalize arguments, similar to nodejs
- if (args && !Array.isArray(args)) {
- options = args;
- args = null;
- }
-
- args = args ? args.slice(0) : []; // Clone array to avoid changing the original
- options = Object.assign({}, options); // Clone object to avoid changing the original
-
- // Build our parsed object
- const parsed = {
- command,
- args,
- options,
- file: undefined,
- original: {
- command,
- args,
- },
- };
-
- // Delegate further parsing to shell or non-shell
- return options.shell ? parseShell(parsed) : parseNonShell(parsed);
-}
-
-module.exports = parse;
diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js b/node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js
deleted file mode 100644
index b0bb84c3a1409..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-// See http://www.robvanderwoude.com/escapechars.php
-const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
-
-function escapeCommand(arg) {
- // Escape meta chars
- arg = arg.replace(metaCharsRegExp, '^$1');
-
- return arg;
-}
-
-function escapeArgument(arg, doubleEscapeMetaChars) {
- // Convert to string
- arg = `${arg}`;
-
- // Algorithm below is based on https://qntm.org/cmd
-
- // Sequence of backslashes followed by a double quote:
- // double up all the backslashes and escape the double quote
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
-
- // Sequence of backslashes followed by the end of the string
- // (which will become a double quote later):
- // double up all the backslashes
- arg = arg.replace(/(\\*)$/, '$1$1');
-
- // All other backslashes occur literally
-
- // Quote the whole thing:
- arg = `"${arg}"`;
-
- // Escape meta chars
- arg = arg.replace(metaCharsRegExp, '^$1');
-
- // Double escape meta chars if necessary
- if (doubleEscapeMetaChars) {
- arg = arg.replace(metaCharsRegExp, '^$1');
- }
-
- return arg;
-}
-
-module.exports.command = escapeCommand;
-module.exports.argument = escapeArgument;
diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js
deleted file mode 100644
index bd4f1280c9cad..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-const shebangCommand = require('shebang-command');
-
-function readShebang(command) {
- // Read the first 150 bytes from the file
- const size = 150;
- let buffer;
-
- if (Buffer.alloc) {
- // Node.js v4.5+ / v5.10+
- buffer = Buffer.alloc(size);
- } else {
- // Old Node.js API
- buffer = new Buffer(size);
- buffer.fill(0); // zero-fill
- }
-
- let fd;
-
- try {
- fd = fs.openSync(command, 'r');
- fs.readSync(fd, buffer, 0, size, 0);
- fs.closeSync(fd);
- } catch (e) { /* Empty */ }
-
- // Attempt to extract shebang (null is returned if not a shebang)
- return shebangCommand(buffer.toString());
-}
-
-module.exports = readShebang;
diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js
deleted file mode 100644
index 2fd5ad2705607..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-
-const path = require('path');
-const which = require('which');
-const pathKey = require('path-key')();
-
-function resolveCommandAttempt(parsed, withoutPathExt) {
- const cwd = process.cwd();
- const hasCustomCwd = parsed.options.cwd != null;
-
- // If a custom `cwd` was specified, we need to change the process cwd
- // because `which` will do stat calls but does not support a custom cwd
- if (hasCustomCwd) {
- try {
- process.chdir(parsed.options.cwd);
- } catch (err) {
- /* Empty */
- }
- }
-
- let resolved;
-
- try {
- resolved = which.sync(parsed.command, {
- path: (parsed.options.env || process.env)[pathKey],
- pathExt: withoutPathExt ? path.delimiter : undefined,
- });
- } catch (e) {
- /* Empty */
- } finally {
- process.chdir(cwd);
- }
-
- // If we successfully resolved, ensure that an absolute path is returned
- // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
- if (resolved) {
- resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
- }
-
- return resolved;
-}
-
-function resolveCommand(parsed) {
- return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
-}
-
-module.exports = resolveCommand;
diff --git a/node_modules/os-locale/node_modules/cross-spawn/package.json b/node_modules/os-locale/node_modules/cross-spawn/package.json
deleted file mode 100644
index 3fdff9f498b27..0000000000000
--- a/node_modules/os-locale/node_modules/cross-spawn/package.json
+++ /dev/null
@@ -1,107 +0,0 @@
-{
- "_from": "cross-spawn@^6.0.0",
- "_id": "cross-spawn@6.0.5",
- "_inBundle": false,
- "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "_location": "/os-locale/cross-spawn",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cross-spawn@^6.0.0",
- "name": "cross-spawn",
- "escapedName": "cross-spawn",
- "rawSpec": "^6.0.0",
- "saveSpec": null,
- "fetchSpec": "^6.0.0"
- },
- "_requiredBy": [
- "/os-locale/execa"
- ],
- "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "_shasum": "4a5ec7c64dfae22c3a14124dbacdee846d80cbc4",
- "_spec": "cross-spawn@^6.0.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale/node_modules/execa",
- "author": {
- "name": "Andrรฉ Cruz",
- "email": "andre@moxy.studio"
- },
- "bugs": {
- "url": "https://github.com/moxystudio/node-cross-spawn/issues"
- },
- "bundleDependencies": false,
- "commitlint": {
- "extends": [
- "@commitlint/config-conventional"
- ]
- },
- "dependencies": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- },
- "deprecated": false,
- "description": "Cross platform child_process#spawn and child_process#spawnSync",
- "devDependencies": {
- "@commitlint/cli": "^6.0.0",
- "@commitlint/config-conventional": "^6.0.2",
- "babel-core": "^6.26.0",
- "babel-jest": "^22.1.0",
- "babel-preset-moxy": "^2.2.1",
- "eslint": "^4.3.0",
- "eslint-config-moxy": "^5.0.0",
- "husky": "^0.14.3",
- "jest": "^22.0.0",
- "lint-staged": "^7.0.0",
- "mkdirp": "^0.5.1",
- "regenerator-runtime": "^0.11.1",
- "rimraf": "^2.6.2",
- "standard-version": "^4.2.0"
- },
- "engines": {
- "node": ">=4.8"
- },
- "files": [
- "lib"
- ],
- "homepage": "https://github.com/moxystudio/node-cross-spawn",
- "keywords": [
- "spawn",
- "spawnSync",
- "windows",
- "cross-platform",
- "path-ext",
- "shebang",
- "cmd",
- "execute"
- ],
- "license": "MIT",
- "lint-staged": {
- "*.js": [
- "eslint --fix",
- "git add"
- ]
- },
- "main": "index.js",
- "name": "cross-spawn",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git"
- },
- "scripts": {
- "commitmsg": "commitlint -e $GIT_PARAMS",
- "lint": "eslint .",
- "precommit": "lint-staged",
- "prerelease": "npm t && npm run lint",
- "release": "standard-version",
- "test": "jest --env node --coverage"
- },
- "standard-version": {
- "scripts": {
- "posttag": "git push --follow-tags origin master && npm publish"
- }
- },
- "version": "6.0.5"
-}
diff --git a/node_modules/os-locale/node_modules/execa/index.js b/node_modules/os-locale/node_modules/execa/index.js
deleted file mode 100644
index aad9ac88775cb..0000000000000
--- a/node_modules/os-locale/node_modules/execa/index.js
+++ /dev/null
@@ -1,361 +0,0 @@
-'use strict';
-const path = require('path');
-const childProcess = require('child_process');
-const crossSpawn = require('cross-spawn');
-const stripEof = require('strip-eof');
-const npmRunPath = require('npm-run-path');
-const isStream = require('is-stream');
-const _getStream = require('get-stream');
-const pFinally = require('p-finally');
-const onExit = require('signal-exit');
-const errname = require('./lib/errname');
-const stdio = require('./lib/stdio');
-
-const TEN_MEGABYTES = 1000 * 1000 * 10;
-
-function handleArgs(cmd, args, opts) {
- let parsed;
-
- opts = Object.assign({
- extendEnv: true,
- env: {}
- }, opts);
-
- if (opts.extendEnv) {
- opts.env = Object.assign({}, process.env, opts.env);
- }
-
- if (opts.__winShell === true) {
- delete opts.__winShell;
- parsed = {
- command: cmd,
- args,
- options: opts,
- file: cmd,
- original: {
- cmd,
- args
- }
- };
- } else {
- parsed = crossSpawn._parse(cmd, args, opts);
- }
-
- opts = Object.assign({
- maxBuffer: TEN_MEGABYTES,
- buffer: true,
- stripEof: true,
- preferLocal: true,
- localDir: parsed.options.cwd || process.cwd(),
- encoding: 'utf8',
- reject: true,
- cleanup: true
- }, parsed.options);
-
- opts.stdio = stdio(opts);
-
- if (opts.preferLocal) {
- opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir}));
- }
-
- if (opts.detached) {
- // #115
- opts.cleanup = false;
- }
-
- if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') {
- // #116
- parsed.args.unshift('/q');
- }
-
- return {
- cmd: parsed.command,
- args: parsed.args,
- opts,
- parsed
- };
-}
-
-function handleInput(spawned, input) {
- if (input === null || input === undefined) {
- return;
- }
-
- if (isStream(input)) {
- input.pipe(spawned.stdin);
- } else {
- spawned.stdin.end(input);
- }
-}
-
-function handleOutput(opts, val) {
- if (val && opts.stripEof) {
- val = stripEof(val);
- }
-
- return val;
-}
-
-function handleShell(fn, cmd, opts) {
- let file = '/bin/sh';
- let args = ['-c', cmd];
-
- opts = Object.assign({}, opts);
-
- if (process.platform === 'win32') {
- opts.__winShell = true;
- file = process.env.comspec || 'cmd.exe';
- args = ['/s', '/c', `"${cmd}"`];
- opts.windowsVerbatimArguments = true;
- }
-
- if (opts.shell) {
- file = opts.shell;
- delete opts.shell;
- }
-
- return fn(file, args, opts);
-}
-
-function getStream(process, stream, {encoding, buffer, maxBuffer}) {
- if (!process[stream]) {
- return null;
- }
-
- let ret;
-
- if (!buffer) {
- // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10
- ret = new Promise((resolve, reject) => {
- process[stream]
- .once('end', resolve)
- .once('error', reject);
- });
- } else if (encoding) {
- ret = _getStream(process[stream], {
- encoding,
- maxBuffer
- });
- } else {
- ret = _getStream.buffer(process[stream], {maxBuffer});
- }
-
- return ret.catch(err => {
- err.stream = stream;
- err.message = `${stream} ${err.message}`;
- throw err;
- });
-}
-
-function makeError(result, options) {
- const {stdout, stderr} = result;
-
- let err = result.error;
- const {code, signal} = result;
-
- const {parsed, joinedCmd} = options;
- const timedOut = options.timedOut || false;
-
- if (!err) {
- let output = '';
-
- if (Array.isArray(parsed.opts.stdio)) {
- if (parsed.opts.stdio[2] !== 'inherit') {
- output += output.length > 0 ? stderr : `\n${stderr}`;
- }
-
- if (parsed.opts.stdio[1] !== 'inherit') {
- output += `\n${stdout}`;
- }
- } else if (parsed.opts.stdio !== 'inherit') {
- output = `\n${stderr}${stdout}`;
- }
-
- err = new Error(`Command failed: ${joinedCmd}${output}`);
- err.code = code < 0 ? errname(code) : code;
- }
-
- err.stdout = stdout;
- err.stderr = stderr;
- err.failed = true;
- err.signal = signal || null;
- err.cmd = joinedCmd;
- err.timedOut = timedOut;
-
- return err;
-}
-
-function joinCmd(cmd, args) {
- let joinedCmd = cmd;
-
- if (Array.isArray(args) && args.length > 0) {
- joinedCmd += ' ' + args.join(' ');
- }
-
- return joinedCmd;
-}
-
-module.exports = (cmd, args, opts) => {
- const parsed = handleArgs(cmd, args, opts);
- const {encoding, buffer, maxBuffer} = parsed.opts;
- const joinedCmd = joinCmd(cmd, args);
-
- let spawned;
- try {
- spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts);
- } catch (err) {
- return Promise.reject(err);
- }
-
- let removeExitHandler;
- if (parsed.opts.cleanup) {
- removeExitHandler = onExit(() => {
- spawned.kill();
- });
- }
-
- let timeoutId = null;
- let timedOut = false;
-
- const cleanup = () => {
- if (timeoutId) {
- clearTimeout(timeoutId);
- timeoutId = null;
- }
-
- if (removeExitHandler) {
- removeExitHandler();
- }
- };
-
- if (parsed.opts.timeout > 0) {
- timeoutId = setTimeout(() => {
- timeoutId = null;
- timedOut = true;
- spawned.kill(parsed.opts.killSignal);
- }, parsed.opts.timeout);
- }
-
- const processDone = new Promise(resolve => {
- spawned.on('exit', (code, signal) => {
- cleanup();
- resolve({code, signal});
- });
-
- spawned.on('error', err => {
- cleanup();
- resolve({error: err});
- });
-
- if (spawned.stdin) {
- spawned.stdin.on('error', err => {
- cleanup();
- resolve({error: err});
- });
- }
- });
-
- function destroy() {
- if (spawned.stdout) {
- spawned.stdout.destroy();
- }
-
- if (spawned.stderr) {
- spawned.stderr.destroy();
- }
- }
-
- const handlePromise = () => pFinally(Promise.all([
- processDone,
- getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}),
- getStream(spawned, 'stderr', {encoding, buffer, maxBuffer})
- ]).then(arr => {
- const result = arr[0];
- result.stdout = arr[1];
- result.stderr = arr[2];
-
- if (result.error || result.code !== 0 || result.signal !== null) {
- const err = makeError(result, {
- joinedCmd,
- parsed,
- timedOut
- });
-
- // TODO: missing some timeout logic for killed
- // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203
- // err.killed = spawned.killed || killed;
- err.killed = err.killed || spawned.killed;
-
- if (!parsed.opts.reject) {
- return err;
- }
-
- throw err;
- }
-
- return {
- stdout: handleOutput(parsed.opts, result.stdout),
- stderr: handleOutput(parsed.opts, result.stderr),
- code: 0,
- failed: false,
- killed: false,
- signal: null,
- cmd: joinedCmd,
- timedOut: false
- };
- }), destroy);
-
- crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
-
- handleInput(spawned, parsed.opts.input);
-
- spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected);
- spawned.catch = onrejected => handlePromise().catch(onrejected);
-
- return spawned;
-};
-
-// TODO: set `stderr: 'ignore'` when that option is implemented
-module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout);
-
-// TODO: set `stdout: 'ignore'` when that option is implemented
-module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr);
-
-module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts);
-
-module.exports.sync = (cmd, args, opts) => {
- const parsed = handleArgs(cmd, args, opts);
- const joinedCmd = joinCmd(cmd, args);
-
- if (isStream(parsed.opts.input)) {
- throw new TypeError('The `input` option cannot be a stream in sync mode');
- }
-
- const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts);
- result.code = result.status;
-
- if (result.error || result.status !== 0 || result.signal !== null) {
- const err = makeError(result, {
- joinedCmd,
- parsed
- });
-
- if (!parsed.opts.reject) {
- return err;
- }
-
- throw err;
- }
-
- return {
- stdout: handleOutput(parsed.opts, result.stdout),
- stderr: handleOutput(parsed.opts, result.stderr),
- code: 0,
- failed: false,
- signal: null,
- cmd: joinedCmd,
- timedOut: false
- };
-};
-
-module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts);
diff --git a/node_modules/os-locale/node_modules/execa/lib/errname.js b/node_modules/os-locale/node_modules/execa/lib/errname.js
deleted file mode 100644
index e367837b28cb9..0000000000000
--- a/node_modules/os-locale/node_modules/execa/lib/errname.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-// Older verions of Node.js might not have `util.getSystemErrorName()`.
-// In that case, fall back to a deprecated internal.
-const util = require('util');
-
-let uv;
-
-if (typeof util.getSystemErrorName === 'function') {
- module.exports = util.getSystemErrorName;
-} else {
- try {
- uv = process.binding('uv');
-
- if (typeof uv.errname !== 'function') {
- throw new TypeError('uv.errname is not a function');
- }
- } catch (err) {
- console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err);
- uv = null;
- }
-
- module.exports = code => errname(uv, code);
-}
-
-// Used for testing the fallback behavior
-module.exports.__test__ = errname;
-
-function errname(uv, code) {
- if (uv) {
- return uv.errname(code);
- }
-
- if (!(code < 0)) {
- throw new Error('err >= 0');
- }
-
- return `Unknown system error ${code}`;
-}
-
diff --git a/node_modules/os-locale/node_modules/execa/lib/stdio.js b/node_modules/os-locale/node_modules/execa/lib/stdio.js
deleted file mode 100644
index a82d46838ac9b..0000000000000
--- a/node_modules/os-locale/node_modules/execa/lib/stdio.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-const alias = ['stdin', 'stdout', 'stderr'];
-
-const hasAlias = opts => alias.some(x => Boolean(opts[x]));
-
-module.exports = opts => {
- if (!opts) {
- return null;
- }
-
- if (opts.stdio && hasAlias(opts)) {
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`);
- }
-
- if (typeof opts.stdio === 'string') {
- return opts.stdio;
- }
-
- const stdio = opts.stdio || [];
-
- if (!Array.isArray(stdio)) {
- throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
- }
-
- const result = [];
- const len = Math.max(stdio.length, alias.length);
-
- for (let i = 0; i < len; i++) {
- let value = null;
-
- if (stdio[i] !== undefined) {
- value = stdio[i];
- } else if (opts[alias[i]] !== undefined) {
- value = opts[alias[i]];
- }
-
- result[i] = value;
- }
-
- return result;
-};
diff --git a/node_modules/os-locale/node_modules/execa/package.json b/node_modules/os-locale/node_modules/execa/package.json
deleted file mode 100644
index 7ab0a5777c7cd..0000000000000
--- a/node_modules/os-locale/node_modules/execa/package.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "_from": "execa@^1.0.0",
- "_id": "execa@1.0.0",
- "_inBundle": false,
- "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "_location": "/os-locale/execa",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "execa@^1.0.0",
- "name": "execa",
- "escapedName": "execa",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/os-locale"
- ],
- "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "_shasum": "c6236a5bb4df6d6f15e88e7f017798216749ddd8",
- "_spec": "execa@^1.0.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/execa/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- },
- "deprecated": false,
- "description": "A better `child_process`",
- "devDependencies": {
- "ava": "*",
- "cat-names": "^1.0.2",
- "coveralls": "^3.0.1",
- "delay": "^3.0.0",
- "is-running": "^2.0.0",
- "nyc": "^13.0.1",
- "tempfile": "^2.0.0",
- "xo": "*"
- },
- "engines": {
- "node": ">=6"
- },
- "files": [
- "index.js",
- "lib"
- ],
- "homepage": "https://github.com/sindresorhus/execa#readme",
- "keywords": [
- "exec",
- "child",
- "process",
- "execute",
- "fork",
- "execfile",
- "spawn",
- "file",
- "shell",
- "bin",
- "binary",
- "binaries",
- "npm",
- "path",
- "local"
- ],
- "license": "MIT",
- "name": "execa",
- "nyc": {
- "reporter": [
- "text",
- "lcov"
- ],
- "exclude": [
- "**/fixtures/**",
- "**/test.js",
- "**/test/**"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/execa.git"
- },
- "scripts": {
- "test": "xo && nyc ava"
- },
- "version": "1.0.0"
-}
diff --git a/node_modules/os-locale/node_modules/execa/readme.md b/node_modules/os-locale/node_modules/execa/readme.md
deleted file mode 100644
index f3f533d92915e..0000000000000
--- a/node_modules/os-locale/node_modules/execa/readme.md
+++ /dev/null
@@ -1,327 +0,0 @@
-# execa [](https://travis-ci.org/sindresorhus/execa) [](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [](https://coveralls.io/github/sindresorhus/execa?branch=master)
-
-> A better [`child_process`](https://nodejs.org/api/child_process.html)
-
-
-## Why
-
-- Promise interface.
-- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`.
-- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform.
-- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why)
-- Higher max buffer. 10 MB instead of 200 KB.
-- [Executes locally installed binaries by name.](#preferlocal)
-- [Cleans up spawned processes when the parent process dies.](#cleanup)
-
-
-## Install
-
-```
-$ npm install execa
-```
-
-
-
-
-
-
-## Usage
-
-```js
-const execa = require('execa');
-
-(async () => {
- const {stdout} = await execa('echo', ['unicorns']);
- console.log(stdout);
- //=> 'unicorns'
-})();
-```
-
-Additional examples:
-
-```js
-const execa = require('execa');
-
-(async () => {
- // Pipe the child process stdout to the current stdout
- execa('echo', ['unicorns']).stdout.pipe(process.stdout);
-
-
- // Run a shell command
- const {stdout} = await execa.shell('echo unicorns');
- //=> 'unicorns'
-
-
- // Catching an error
- try {
- await execa.shell('exit 3');
- } catch (error) {
- console.log(error);
- /*
- {
- message: 'Command failed: /bin/sh -c exit 3'
- killed: false,
- code: 3,
- signal: null,
- cmd: '/bin/sh -c exit 3',
- stdout: '',
- stderr: '',
- timedOut: false
- }
- */
- }
-})();
-
-// Catching an error with a sync method
-try {
- execa.shellSync('exit 3');
-} catch (error) {
- console.log(error);
- /*
- {
- message: 'Command failed: /bin/sh -c exit 3'
- code: 3,
- signal: null,
- cmd: '/bin/sh -c exit 3',
- stdout: '',
- stderr: '',
- timedOut: false
- }
- */
-}
-```
-
-
-## API
-
-### execa(file, [arguments], [options])
-
-Execute a file.
-
-Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
-
-Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
-
-### execa.stdout(file, [arguments], [options])
-
-Same as `execa()`, but returns only `stdout`.
-
-### execa.stderr(file, [arguments], [options])
-
-Same as `execa()`, but returns only `stderr`.
-
-### execa.shell(command, [options])
-
-Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer.
-
-Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess).
-
-The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties.
-
-### execa.sync(file, [arguments], [options])
-
-Execute a file synchronously.
-
-Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
-
-This method throws an `Error` if the command fails.
-
-### execa.shellSync(file, [options])
-
-Execute a command synchronously through the system shell.
-
-Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
-
-### options
-
-Type: `Object`
-
-#### cwd
-
-Type: `string`
-Default: `process.cwd()`
-
-Current working directory of the child process.
-
-#### env
-
-Type: `Object`
-Default: `process.env`
-
-Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this.
-
-#### extendEnv
-
-Type: `boolean`
-Default: `true`
-
-Set to `false` if you don't want to extend the environment variables when providing the `env` property.
-
-#### argv0
-
-Type: `string`
-
-Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified.
-
-#### stdio
-
-Type: `string[]` `string`
-Default: `pipe`
-
-Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration.
-
-#### detached
-
-Type: `boolean`
-
-Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached).
-
-#### uid
-
-Type: `number`
-
-Sets the user identity of the process.
-
-#### gid
-
-Type: `number`
-
-Sets the group identity of the process.
-
-#### shell
-
-Type: `boolean` `string`
-Default: `false`
-
-If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.
-
-#### stripEof
-
-Type: `boolean`
-Default: `true`
-
-[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output.
-
-#### preferLocal
-
-Type: `boolean`
-Default: `true`
-
-Prefer locally installed binaries when looking for a binary to execute.
-If you `$ npm install foo`, you can then `execa('foo')`.
-
-#### localDir
-
-Type: `string`
-Default: `process.cwd()`
-
-Preferred path to find locally installed binaries in (use with `preferLocal`).
-
-#### input
-
-Type: `string` `Buffer` `stream.Readable`
-
-Write some input to the `stdin` of your binary.
-Streams are not allowed when using the synchronous methods.
-
-#### reject
-
-Type: `boolean`
-Default: `true`
-
-Setting this to `false` resolves the promise with the error instead of rejecting it.
-
-#### cleanup
-
-Type: `boolean`
-Default: `true`
-
-Keep track of the spawned process and `kill` it when the parent process exits.
-
-#### encoding
-
-Type: `string`
-Default: `utf8`
-
-Specify the character encoding used to decode the `stdout` and `stderr` output.
-
-#### timeout
-
-Type: `number`
-Default: `0`
-
-If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds.
-
-#### buffer
-
-Type: `boolean`
-Default: `true`
-
-Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed.
-
-#### maxBuffer
-
-Type: `number`
-Default: `10000000` (10MB)
-
-Largest amount of data in bytes allowed on `stdout` or `stderr`.
-
-#### killSignal
-
-Type: `string` `number`
-Default: `SIGTERM`
-
-Signal value to be used when the spawned process will be killed.
-
-#### stdin
-
-Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe`
-
-Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
-
-#### stdout
-
-Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe`
-
-Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
-
-#### stderr
-
-Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe`
-
-Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
-
-#### windowsVerbatimArguments
-
-Type: `boolean`
-Default: `false`
-
-If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`.
-
-
-## Tips
-
-### Save and pipe output from a child process
-
-Let's say you want to show the output of a child process in real-time while also saving it to a variable.
-
-```js
-const execa = require('execa');
-const getStream = require('get-stream');
-
-const stream = execa('echo', ['foo']).stdout;
-
-stream.pipe(process.stdout);
-
-getStream(stream).then(value => {
- console.log('child output:', value);
-});
-```
-
-
-## License
-
-MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/os-locale/package.json b/node_modules/os-locale/package.json
deleted file mode 100644
index fb6646ec9974b..0000000000000
--- a/node_modules/os-locale/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_from": "os-locale@^3.1.0",
- "_id": "os-locale@3.1.0",
- "_inBundle": false,
- "_integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
- "_location": "/os-locale",
- "_phantomChildren": {
- "get-stream": "4.1.0",
- "is-stream": "1.1.0",
- "nice-try": "1.0.5",
- "npm-run-path": "2.0.2",
- "p-finally": "1.0.0",
- "path-key": "2.0.1",
- "semver": "5.7.1",
- "shebang-command": "1.2.0",
- "signal-exit": "3.0.2",
- "strip-eof": "1.0.0",
- "which": "1.3.1"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "os-locale@^3.1.0",
- "name": "os-locale",
- "escapedName": "os-locale",
- "rawSpec": "^3.1.0",
- "saveSpec": null,
- "fetchSpec": "^3.1.0"
- },
- "_requiredBy": [
- "/yargs"
- ],
- "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
- "_shasum": "a802a6ee17f24c10483ab9935719cef4ed16bf1a",
- "_spec": "os-locale@^3.1.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/yargs",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/os-locale/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "execa": "^1.0.0",
- "lcid": "^2.0.0",
- "mem": "^4.0.0"
- },
- "deprecated": false,
- "description": "Get the system locale",
- "devDependencies": {
- "ava": "^1.0.1",
- "import-fresh": "^3.0.0",
- "xo": "^0.23.0"
- },
- "engines": {
- "node": ">=6"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/os-locale#readme",
- "keywords": [
- "locale",
- "lang",
- "language",
- "system",
- "os",
- "string",
- "str",
- "user",
- "country",
- "id",
- "identifier",
- "region"
- ],
- "license": "MIT",
- "name": "os-locale",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/os-locale.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "3.1.0"
-}
diff --git a/node_modules/os-locale/readme.md b/node_modules/os-locale/readme.md
deleted file mode 100644
index 8f9c280eedb85..0000000000000
--- a/node_modules/os-locale/readme.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# os-locale [](https://travis-ci.org/sindresorhus/os-locale)
-
-> Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software))
-
-Useful for localizing your module or app.
-
-POSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation.
-
----
-
-
-
----
-
-## Install
-
-```
-$ npm install os-locale
-```
-
-
-## Usage
-
-```js
-const osLocale = require('os-locale');
-
-(async () => {
- console.log(await osLocale());
- //=> 'en_US'
-})();
-```
-
-
-## API
-
-### osLocale([options])
-
-Returns a `Promise` for the locale.
-
-### osLocale.sync([options])
-
-Returns the locale.
-
-#### options
-
-Type: `Object`
-
-##### spawn
-
-Type: `boolean`
-Default: `true`
-
-Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables.
-
-
-## Security
-
-To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
-
-
-## License
-
-MIT ยฉ [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/parallel-transform/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/parallel-transform/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/parallel-transform/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/rc/node_modules/minimist/.travis.yml b/node_modules/rc/node_modules/minimist/.travis.yml
deleted file mode 100644
index 74c57bf15e239..0000000000000
--- a/node_modules/rc/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "iojs"
-before_install:
- - npm install -g npm@~1.4.6
diff --git a/node_modules/rc/package.json b/node_modules/rc/package.json
index ba78e395b45d4..db6599e664b74 100644
--- a/node_modules/rc/package.json
+++ b/node_modules/rc/package.json
@@ -1,8 +1,8 @@
{
"_from": "rc@^1.1.6",
- "_id": "rc@1.2.7",
+ "_id": "rc@1.2.8",
"_inBundle": false,
- "_integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==",
+ "_integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"_location": "/rc",
"_phantomChildren": {},
"_requested": {
@@ -19,17 +19,17 @@
"/registry-auth-token",
"/registry-url"
],
- "_resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz",
- "_shasum": "8a10ca30d588d00464360372b890d06dacd02297",
+ "_resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "_shasum": "cd924bf5200a075b83c188cd6b9e211b7fc0d3ed",
"_spec": "rc@^1.1.6",
- "_where": "/Users/rebecca/code/npm/node_modules/registry-auth-token",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/node_modules/registry-auth-token",
"author": {
"name": "Dominic Tarr",
"email": "dominic.tarr@gmail.com",
"url": "dominictarr.com"
},
"bin": {
- "rc": "./cli.js"
+ "rc": "cli.js"
},
"browser": "browser.js",
"bugs": {
@@ -37,7 +37,7 @@
},
"bundleDependencies": false,
"dependencies": {
- "deep-extend": "^0.5.1",
+ "deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
@@ -61,5 +61,5 @@
"scripts": {
"test": "set -e; node test/test.js; node test/ini.js; node test/nested-env-vars.js"
},
- "version": "1.2.7"
+ "version": "1.2.8"
}
diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md
index 28ccae1616582..6f035ab16f29d 100644
--- a/node_modules/readable-stream/README.md
+++ b/node_modules/readable-stream/README.md
@@ -15,7 +15,7 @@ npm install --save readable-stream
This package is a mirror of the streams implementations in Node.js.
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.15.3/docs/api/stream.html).
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html).
If you want to guarantee a stable streams base, regardless of what version of
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
@@ -24,10 +24,7 @@ As of version 2.0.0 **readable-stream** uses semantic versioning.
## Version 3.x.x
-v3.x.x of `readable-stream` supports Node 6, 8, and 10, as well as
-evergreen browsers, IE 11 and latest Safari. The breaking changes
-introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/)
-and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
+v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
1. Error codes: https://github.com/nodejs/node/pull/13310,
https://github.com/nodejs/node/pull/13291,
@@ -51,9 +48,7 @@ and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
https://github.com/nodejs/node/pull/17979
## Version 2.x.x
-
-v2.x.x of `readable-stream` supports all Node.js version from 0.8, as well as
-evergreen browsers and IE 10 & 11.
+v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
### Big Thanks
diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js
index 33f478d7e8c25..192d451488f20 100644
--- a/node_modules/readable-stream/lib/_stream_readable.js
+++ b/node_modules/readable-stream/lib/_stream_readable.js
@@ -80,17 +80,16 @@ var _require$codes = require('../errors').codes,
ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,
ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
- ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
-
-var _require2 = require('../experimentalWarning'),
- emitExperimentalWarning = _require2.emitExperimentalWarning; // Lazy loaded to improve the startup performance.
+ ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.
var StringDecoder;
var createReadableStreamAsyncIterator;
+var from;
require('inherits')(Readable, Stream);
+var errorOrDestroy = destroyImpl.errorOrDestroy;
var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
function prependListener(emitter, event, fn) {
@@ -144,7 +143,9 @@ function ReadableState(options, stream, isDuplex) {
this.resumeScheduled = false;
this.paused = true; // Should close be emitted on destroy. Defaults to true.
- this.emitClose = options.emitClose !== false; // has it been destroyed
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')
+
+ this.autoDestroy = !!options.autoDestroy; // has it been destroyed
this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
@@ -257,16 +258,16 @@ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
if (!skipChunkCheck) er = chunkInvalid(state, chunk);
if (er) {
- stream.emit('error', er);
+ errorOrDestroy(stream, er);
} else if (state.objectMode || chunk && chunk.length > 0) {
if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
chunk = _uint8ArrayToBuffer(chunk);
}
if (addToFront) {
- if (state.endEmitted) stream.emit('error', new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
+ if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
} else if (state.ended) {
- stream.emit('error', new ERR_STREAM_PUSH_AFTER_EOF());
+ errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
} else if (state.destroyed) {
return false;
} else {
@@ -322,17 +323,32 @@ Readable.prototype.isPaused = function () {
Readable.prototype.setEncoding = function (enc) {
if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc); // if setEncoding(null), decoder.encoding equals utf8
+ var decoder = new StringDecoder(enc);
+ this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8
+
+ this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:
+
+ var p = this._readableState.buffer.head;
+ var content = '';
+
+ while (p !== null) {
+ content += decoder.write(p.data);
+ p = p.next;
+ }
+
+ this._readableState.buffer.clear();
- this._readableState.encoding = this._readableState.decoder.encoding;
+ if (content !== '') this._readableState.buffer.push(content);
+ this._readableState.length = content.length;
return this;
-}; // Don't raise the hwm > 8MB
+}; // Don't raise the hwm > 1GB
-var MAX_HWM = 0x800000;
+var MAX_HWM = 0x40000000;
function computeNewHighWaterMark(n) {
if (n >= MAX_HWM) {
+ // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.
n = MAX_HWM;
} else {
// Get the next highest power of 2 to prevent increasing hwm excessively in
@@ -449,7 +465,7 @@ Readable.prototype.read = function (n) {
if (n > 0) ret = fromList(n, state);else ret = null;
if (ret === null) {
- state.needReadable = true;
+ state.needReadable = state.length <= state.highWaterMark;
n = 0;
} else {
state.length -= n;
@@ -469,6 +485,7 @@ Readable.prototype.read = function (n) {
};
function onEofChunk(stream, state) {
+ debug('onEofChunk');
if (state.ended) return;
if (state.decoder) {
@@ -503,6 +520,7 @@ function onEofChunk(stream, state) {
function emitReadable(stream) {
var state = stream._readableState;
+ debug('emitReadable', state.needReadable, state.emittedReadable);
state.needReadable = false;
if (!state.emittedReadable) {
@@ -518,6 +536,7 @@ function emitReadable_(stream) {
if (!state.destroyed && (state.length || state.ended)) {
stream.emit('readable');
+ state.emittedReadable = false;
} // The stream needs another readable event if
// 1. It is not flowing, as the flow mechanism will take
// care of it.
@@ -583,7 +602,7 @@ function maybeReadMore_(stream, state) {
Readable.prototype._read = function (n) {
- this.emit('error', new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
+ errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
};
Readable.prototype.pipe = function (dest, pipeOpts) {
@@ -682,7 +701,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
debug('onerror', er);
unpipe();
dest.removeListener('error', onerror);
- if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);
} // Make sure our error handler is attached before userland ones.
@@ -986,8 +1005,6 @@ Readable.prototype.wrap = function (stream) {
if (typeof Symbol === 'function') {
Readable.prototype[Symbol.asyncIterator] = function () {
- emitExperimentalWarning('Readable[Symbol.asyncIterator]');
-
if (createReadableStreamAsyncIterator === undefined) {
createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');
}
@@ -1075,9 +1092,29 @@ function endReadableNT(state, stream) {
state.endEmitted = true;
stream.readable = false;
stream.emit('end');
+
+ if (state.autoDestroy) {
+ // In case of duplex streams we need a way to detect
+ // if the writable side is ready for autoDestroy as well
+ var wState = stream._writableState;
+
+ if (!wState || wState.autoDestroy && wState.finished) {
+ stream.destroy();
+ }
+ }
}
}
+if (typeof Symbol === 'function') {
+ Readable.from = function (iterable, opts) {
+ if (from === undefined) {
+ from = require('./internal/streams/from');
+ }
+
+ return from(Readable, iterable, opts);
+ };
+}
+
function indexOf(xs, x) {
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) return i;
diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js
index b35447aedc3a9..a2634d7c24fd5 100644
--- a/node_modules/readable-stream/lib/_stream_writable.js
+++ b/node_modules/readable-stream/lib/_stream_writable.js
@@ -94,6 +94,8 @@ var _require$codes = require('../errors').codes,
ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
+var errorOrDestroy = destroyImpl.errorOrDestroy;
+
require('inherits')(Writable, Stream);
function nop() {}
@@ -173,7 +175,9 @@ function WritableState(options, stream, isDuplex) {
this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.
- this.emitClose = options.emitClose !== false; // count buffered requests
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')
+
+ this.autoDestroy = !!options.autoDestroy; // count buffered requests
this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
// one allocated and free to use, and we maintain at most two
@@ -250,13 +254,13 @@ function Writable(options) {
Writable.prototype.pipe = function () {
- this.emit('error', new ERR_STREAM_CANNOT_PIPE());
+ errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
};
function writeAfterEnd(stream, cb) {
var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
+ errorOrDestroy(stream, er);
process.nextTick(cb, er);
} // Checks that a user-supplied chunk is valid, especially for the particular
// mode the stream is in. Currently this means that `null` is never accepted
@@ -273,7 +277,7 @@ function validChunk(stream, state, chunk, cb) {
}
if (er) {
- stream.emit('error', er);
+ errorOrDestroy(stream, er);
process.nextTick(cb, er);
return false;
}
@@ -417,13 +421,13 @@ function onwriteError(stream, state, sync, er, cb) {
process.nextTick(finishMaybe, stream, state);
stream._writableState.errorEmitted = true;
- stream.emit('error', er);
+ errorOrDestroy(stream, er);
} else {
// the caller expect this to happen before if
// it is async
cb(er);
stream._writableState.errorEmitted = true;
- stream.emit('error', er); // this can emit finish, but finish must
+ errorOrDestroy(stream, er); // this can emit finish, but finish must
// always follow error
finishMaybe(stream, state);
@@ -587,7 +591,7 @@ function callFinal(stream, state) {
state.pendingcb--;
if (err) {
- stream.emit('error', err);
+ errorOrDestroy(stream, err);
}
state.prefinished = true;
@@ -618,6 +622,16 @@ function finishMaybe(stream, state) {
if (state.pendingcb === 0) {
state.finished = true;
stream.emit('finish');
+
+ if (state.autoDestroy) {
+ // In case of duplex streams we need a way to detect
+ // if the readable side is ready for autoDestroy as well
+ var rState = stream._readableState;
+
+ if (!rState || rState.autoDestroy && rState.endEmitted) {
+ stream.destroy();
+ }
+ }
}
}
diff --git a/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/readable-stream/lib/internal/streams/buffer_list.js
index ebaf5c72aa7a6..cdea425f19dd9 100644
--- a/node_modules/readable-stream/lib/internal/streams/buffer_list.js
+++ b/node_modules/readable-stream/lib/internal/streams/buffer_list.js
@@ -1,9 +1,17 @@
'use strict';
-function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
var _require = require('buffer'),
Buffer = _require.Buffer;
@@ -20,170 +28,183 @@ module.exports =
/*#__PURE__*/
function () {
function BufferList() {
+ _classCallCheck(this, BufferList);
+
this.head = null;
this.tail = null;
this.length = 0;
}
- var _proto = BufferList.prototype;
-
- _proto.push = function push(v) {
- var entry = {
- data: v,
- next: null
- };
- if (this.length > 0) this.tail.next = entry;else this.head = entry;
- this.tail = entry;
- ++this.length;
- };
-
- _proto.unshift = function unshift(v) {
- var entry = {
- data: v,
- next: this.head
- };
- if (this.length === 0) this.tail = entry;
- this.head = entry;
- ++this.length;
- };
-
- _proto.shift = function shift() {
- if (this.length === 0) return;
- var ret = this.head.data;
- if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
- --this.length;
- return ret;
- };
-
- _proto.clear = function clear() {
- this.head = this.tail = null;
- this.length = 0;
- };
-
- _proto.join = function join(s) {
- if (this.length === 0) return '';
- var p = this.head;
- var ret = '' + p.data;
-
- while (p = p.next) {
- ret += s + p.data;
+ _createClass(BufferList, [{
+ key: "push",
+ value: function push(v) {
+ var entry = {
+ data: v,
+ next: null
+ };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
}
-
- return ret;
- };
-
- _proto.concat = function concat(n) {
- if (this.length === 0) return Buffer.alloc(0);
- var ret = Buffer.allocUnsafe(n >>> 0);
- var p = this.head;
- var i = 0;
-
- while (p) {
- copyBuffer(p.data, ret, i);
- i += p.data.length;
- p = p.next;
+ }, {
+ key: "unshift",
+ value: function unshift(v) {
+ var entry = {
+ data: v,
+ next: this.head
+ };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
}
-
- return ret;
- } // Consumes a specified amount of bytes or characters from the buffered data.
- ;
-
- _proto.consume = function consume(n, hasStrings) {
- var ret;
-
- if (n < this.head.data.length) {
- // `slice` is the same for buffers and strings.
- ret = this.head.data.slice(0, n);
- this.head.data = this.head.data.slice(n);
- } else if (n === this.head.data.length) {
- // First chunk is a perfect match.
- ret = this.shift();
- } else {
- // Result spans more than one buffer.
- ret = hasStrings ? this._getString(n) : this._getBuffer(n);
+ }, {
+ key: "shift",
+ value: function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ }
+ }, {
+ key: "clear",
+ value: function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
}
+ }, {
+ key: "join",
+ value: function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+
+ while (p = p.next) {
+ ret += s + p.data;
+ }
- return ret;
- };
-
- _proto.first = function first() {
- return this.head.data;
- } // Consumes a specified amount of characters from the buffered data.
- ;
-
- _proto._getString = function _getString(n) {
- var p = this.head;
- var c = 1;
- var ret = p.data;
- n -= ret.length;
-
- while (p = p.next) {
- var str = p.data;
- var nb = n > str.length ? str.length : n;
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
- n -= nb;
-
- if (n === 0) {
- if (nb === str.length) {
- ++c;
- if (p.next) this.head = p.next;else this.head = this.tail = null;
- } else {
- this.head = p;
- p.data = str.slice(nb);
- }
+ return ret;
+ }
+ }, {
+ key: "concat",
+ value: function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
- break;
+ return ret;
+ } // Consumes a specified amount of bytes or characters from the buffered data.
+
+ }, {
+ key: "consume",
+ value: function consume(n, hasStrings) {
+ var ret;
+
+ if (n < this.head.data.length) {
+ // `slice` is the same for buffers and strings.
+ ret = this.head.data.slice(0, n);
+ this.head.data = this.head.data.slice(n);
+ } else if (n === this.head.data.length) {
+ // First chunk is a perfect match.
+ ret = this.shift();
+ } else {
+ // Result spans more than one buffer.
+ ret = hasStrings ? this._getString(n) : this._getBuffer(n);
}
- ++c;
+ return ret;
}
+ }, {
+ key: "first",
+ value: function first() {
+ return this.head.data;
+ } // Consumes a specified amount of characters from the buffered data.
+
+ }, {
+ key: "_getString",
+ value: function _getString(n) {
+ var p = this.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = str.slice(nb);
+ }
+
+ break;
+ }
- this.length -= c;
- return ret;
- } // Consumes a specified amount of bytes from the buffered data.
- ;
-
- _proto._getBuffer = function _getBuffer(n) {
- var ret = Buffer.allocUnsafe(n);
- var p = this.head;
- var c = 1;
- p.data.copy(ret);
- n -= p.data.length;
-
- while (p = p.next) {
- var buf = p.data;
- var nb = n > buf.length ? buf.length : n;
- buf.copy(ret, ret.length - n, 0, nb);
- n -= nb;
-
- if (n === 0) {
- if (nb === buf.length) {
- ++c;
- if (p.next) this.head = p.next;else this.head = this.tail = null;
- } else {
- this.head = p;
- p.data = buf.slice(nb);
+ ++c;
+ }
+
+ this.length -= c;
+ return ret;
+ } // Consumes a specified amount of bytes from the buffered data.
+
+ }, {
+ key: "_getBuffer",
+ value: function _getBuffer(n) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = this.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = buf.slice(nb);
+ }
+
+ break;
}
- break;
+ ++c;
}
- ++c;
+ this.length -= c;
+ return ret;
+ } // Make sure the linked list only shows the minimal necessary information.
+
+ }, {
+ key: custom,
+ value: function value(_, options) {
+ return inspect(this, _objectSpread({}, options, {
+ // Only inspect one level.
+ depth: 0,
+ // It should not recurse.
+ customInspect: false
+ }));
}
-
- this.length -= c;
- return ret;
- } // Make sure the linked list only shows the minimal necessary information.
- ;
-
- _proto[custom] = function (_, options) {
- return inspect(this, _objectSpread({}, options, {
- // Only inspect one level.
- depth: 0,
- // It should not recurse.
- customInspect: false
- }));
- };
+ }]);
return BufferList;
}();
\ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js
index 63ae49928dd95..3268a16f3b6f2 100644
--- a/node_modules/readable-stream/lib/internal/streams/destroy.js
+++ b/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -9,8 +9,13 @@ function destroy(err, cb) {
if (readableDestroyed || writableDestroyed) {
if (cb) {
cb(err);
- } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
- process.nextTick(emitErrorNT, this, err);
+ } else if (err) {
+ if (!this._writableState) {
+ process.nextTick(emitErrorNT, this, err);
+ } else if (!this._writableState.errorEmitted) {
+ this._writableState.errorEmitted = true;
+ process.nextTick(emitErrorNT, this, err);
+ }
}
return this;
@@ -29,10 +34,13 @@ function destroy(err, cb) {
this._destroy(err || null, function (err) {
if (!cb && err) {
- process.nextTick(emitErrorAndCloseNT, _this, err);
-
- if (_this._writableState) {
+ if (!_this._writableState) {
+ process.nextTick(emitErrorAndCloseNT, _this, err);
+ } else if (!_this._writableState.errorEmitted) {
_this._writableState.errorEmitted = true;
+ process.nextTick(emitErrorAndCloseNT, _this, err);
+ } else {
+ process.nextTick(emitCloseNT, _this);
}
} else if (cb) {
process.nextTick(emitCloseNT, _this);
@@ -79,7 +87,19 @@ function emitErrorNT(self, err) {
self.emit('error', err);
}
+function errorOrDestroy(stream, err) {
+ // We have tests that rely on errors being emitted
+ // in the same tick, so changing this is semver major.
+ // For now when you opt-in to autoDestroy we allow
+ // the error to be emitted nextTick. In a future
+ // semver major update we should change the default to this.
+ var rState = stream._readableState;
+ var wState = stream._writableState;
+ if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);
+}
+
module.exports = {
destroy: destroy,
- undestroy: undestroy
+ undestroy: undestroy,
+ errorOrDestroy: errorOrDestroy
};
\ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/from-browser.js b/node_modules/readable-stream/lib/internal/streams/from-browser.js
new file mode 100644
index 0000000000000..a4ce56f3c90f6
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/from-browser.js
@@ -0,0 +1,3 @@
+module.exports = function () {
+ throw new Error('Readable.from is not available in the browser')
+};
diff --git a/node_modules/readable-stream/lib/internal/streams/from.js b/node_modules/readable-stream/lib/internal/streams/from.js
new file mode 100644
index 0000000000000..6c41284416799
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/from.js
@@ -0,0 +1,64 @@
+'use strict';
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE;
+
+function from(Readable, iterable, opts) {
+ var iterator;
+
+ if (iterable && typeof iterable.next === 'function') {
+ iterator = iterable;
+ } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable);
+
+ var readable = new Readable(_objectSpread({
+ objectMode: true
+ }, opts)); // Reading boolean to protect against _read
+ // being called before last iteration completion.
+
+ var reading = false;
+
+ readable._read = function () {
+ if (!reading) {
+ reading = true;
+ next();
+ }
+ };
+
+ function next() {
+ return _next2.apply(this, arguments);
+ }
+
+ function _next2() {
+ _next2 = _asyncToGenerator(function* () {
+ try {
+ var _ref = yield iterator.next(),
+ value = _ref.value,
+ done = _ref.done;
+
+ if (done) {
+ readable.push(null);
+ } else if (readable.push((yield value))) {
+ next();
+ } else {
+ reading = false;
+ }
+ } catch (err) {
+ readable.destroy(err);
+ }
+ });
+ return _next2.apply(this, arguments);
+ }
+
+ return readable;
+}
+
+module.exports = from;
\ No newline at end of file
diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json
index 67c7e602f2627..9c29e095cbd6b 100644
--- a/node_modules/readable-stream/package.json
+++ b/node_modules/readable-stream/package.json
@@ -1,19 +1,19 @@
{
- "_from": "readable-stream@3.4.0",
- "_id": "readable-stream@3.4.0",
+ "_from": "readable-stream@3.6.0",
+ "_id": "readable-stream@3.6.0",
"_inBundle": false,
- "_integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
+ "_integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"_location": "/readable-stream",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "readable-stream@3.4.0",
+ "raw": "readable-stream@3.6.0",
"name": "readable-stream",
"escapedName": "readable-stream",
- "rawSpec": "3.4.0",
+ "rawSpec": "3.6.0",
"saveSpec": null,
- "fetchSpec": "3.4.0"
+ "fetchSpec": "3.6.0"
},
"_requiredBy": [
"#USER",
@@ -21,15 +21,16 @@
"/bl",
"/tar-stream"
],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
- "_shasum": "a51c26754658e0a3c21dbf59163bd45ba6f447fc",
- "_spec": "readable-stream@3.4.0",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "_shasum": "337bbda3adc0706bd3e024426a286d4b4b2c9198",
+ "_spec": "readable-stream@3.6.0",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli",
"browser": {
"util": false,
"worker_threads": false,
"./errors": "./errors-browser.js",
"./readable.js": "./readable-browser.js",
+ "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js",
"./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
},
"bugs": {
@@ -52,6 +53,7 @@
"assert": "^1.4.0",
"bl": "^2.0.0",
"deep-strict-equal": "^0.2.0",
+ "events.once": "^2.0.2",
"glob": "^7.1.2",
"gunzip-maybe": "^1.4.1",
"hyperquest": "^2.1.3",
@@ -94,5 +96,5 @@
"test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
"update-browser-errors": "babel -o errors-browser.js errors.js"
},
- "version": "3.4.0"
+ "version": "3.6.0"
}
diff --git a/node_modules/registry-auth-token/.npmignore b/node_modules/registry-auth-token/.npmignore
new file mode 100644
index 0000000000000..4196028460bfc
--- /dev/null
+++ b/node_modules/registry-auth-token/.npmignore
@@ -0,0 +1,6 @@
+.editorconfig
+.eslintignore
+.eslintrc
+.travis.yml
+npm-debug.log
+coverage
diff --git a/node_modules/registry-auth-token/CHANGELOG.md b/node_modules/registry-auth-token/CHANGELOG.md
index 75f7b6f2f7071..20e82e870ef45 100644
--- a/node_modules/registry-auth-token/CHANGELOG.md
+++ b/node_modules/registry-auth-token/CHANGELOG.md
@@ -2,6 +2,12 @@
All notable changes will be documented in this file.
+## [3.4.0] - 2019-03-20
+
+### Changes
+
+- Enabled legacy auth token to be read from environment variable (Martin Flodin)
+
## [3.3.2] - 2018-01-26
### Changes
diff --git a/node_modules/registry-auth-token/index.js b/node_modules/registry-auth-token/index.js
index d68f7eeb4bc72..f8c6216eab9cd 100644
--- a/node_modules/registry-auth-token/index.js
+++ b/node_modules/registry-auth-token/index.js
@@ -52,10 +52,13 @@ function getRegistryAuthInfo (checkUrl, options) {
}
function getLegacyAuthInfo (npmrc) {
- if (npmrc._auth) {
- return {token: npmrc._auth, type: 'Basic'}
+ if (!npmrc._auth) {
+ return undefined
}
- return undefined
+
+ var token = replaceEnvironmentVariable(npmrc._auth)
+
+ return {token: token, type: 'Basic'}
}
function normalizePath (path) {
@@ -80,15 +83,19 @@ function getAuthInfoForUrl (regUrl, npmrc) {
return undefined
}
+function replaceEnvironmentVariable (token) {
+ return token.replace(/^\$\{?([^}]*)\}?$/, function (fullMatch, envVar) {
+ return process.env[envVar]
+ })
+}
+
function getBearerToken (tok) {
if (!tok) {
return undefined
}
- // check if bearer token
- var token = tok.replace(/^\$\{?([^}]*)\}?$/, function (fullMatch, envVar) {
- return process.env[envVar]
- })
+ // check if bearer token is set as environment variable
+ var token = replaceEnvironmentVariable(tok)
return {token: token, type: 'Bearer'}
}
@@ -100,9 +107,7 @@ function getTokenForUsernameAndPassword (username, password) {
// passwords are base64 encoded, so we need to decode it
// See https://github.com/npm/npm/blob/v3.10.6/lib/config/set-credentials-by-uri.js#L26
- var pass = decodeBase64(password.replace(/^\$\{?([^}]*)\}?$/, function (fullMatch, envVar) {
- return process.env[envVar]
- }))
+ var pass = decodeBase64(replaceEnvironmentVariable(password))
// a basic auth token is base64 encoded 'username:password'
// See https://github.com/npm/npm/blob/v3.10.6/lib/config/get-credentials-by-uri.js#L70
diff --git a/node_modules/registry-auth-token/package.json b/node_modules/registry-auth-token/package.json
index 3be95088b858d..dd090a836b569 100644
--- a/node_modules/registry-auth-token/package.json
+++ b/node_modules/registry-auth-token/package.json
@@ -1,8 +1,8 @@
{
"_from": "registry-auth-token@^3.0.1",
- "_id": "registry-auth-token@3.3.2",
+ "_id": "registry-auth-token@3.4.0",
"_inBundle": false,
- "_integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==",
+ "_integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==",
"_location": "/registry-auth-token",
"_phantomChildren": {},
"_requested": {
@@ -18,10 +18,10 @@
"_requiredBy": [
"/package-json"
],
- "_resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz",
- "_shasum": "851fd49038eecb586911115af845260eec983f20",
+ "_resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz",
+ "_shasum": "d7446815433f5d5ed6431cd5dca21048f66b397e",
"_spec": "registry-auth-token@^3.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/package-json",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/node_modules/package-json",
"author": {
"name": "Espen Hovlandsdal",
"email": "espen@hovlandsdal.com"
@@ -70,5 +70,5 @@
"coverage/**"
]
},
- "version": "3.3.2"
+ "version": "3.4.0"
}
diff --git a/node_modules/registry-auth-token/test/auth-token.test.js b/node_modules/registry-auth-token/test/auth-token.test.js
index 824d1bf92e6de..5db6f5a192890 100644
--- a/node_modules/registry-auth-token/test/auth-token.test.js
+++ b/node_modules/registry-auth-token/test/auth-token.test.js
@@ -50,6 +50,42 @@ describe('auth-token', function () {
done()
})
})
+
+ it('should return legacy auth token defined by reference to an environment variable (with curly braces)', function (done) {
+ var environmentVariable = '__REGISTRY_AUTH_TOKEN_NPM_TOKEN__'
+ var content = [
+ '_auth=${' + environmentVariable + '}',
+ 'registry=http://registry.foobar.eu/'
+ ].join('\n')
+
+ process.env[environmentVariable] = 'foobar'
+
+ fs.writeFile(npmRcPath, content, function (err) {
+ var getAuthToken = requireUncached('../index')
+ assert(!err, err)
+ assert.deepEqual(getAuthToken(), {token: 'foobar', type: 'Basic'})
+ delete process.env[environmentVariable]
+ done()
+ })
+ })
+
+ it('should return legacy auth token defined by reference to an environment variable (without curly braces)', function (done) {
+ var environmentVariable = '__REGISTRY_AUTH_TOKEN_NPM_TOKEN__'
+ var content = [
+ '_auth=$' + environmentVariable,
+ 'registry=http://registry.foobar.eu/'
+ ].join('\n')
+
+ process.env[environmentVariable] = 'foobar'
+
+ fs.writeFile(npmRcPath, content, function (err) {
+ var getAuthToken = requireUncached('../index')
+ assert(!err, err)
+ assert.deepEqual(getAuthToken(), {token: 'foobar', type: 'Basic'})
+ delete process.env[environmentVariable]
+ done()
+ })
+ })
})
describe('bearer token', function () {
diff --git a/node_modules/registry-auth-token/yarn.lock b/node_modules/registry-auth-token/yarn.lock
index 23f7b13a76681..46c1357274cf6 100644
--- a/node_modules/registry-auth-token/yarn.lock
+++ b/node_modules/registry-auth-token/yarn.lock
@@ -234,9 +234,9 @@ decamelize@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
-deep-extend@~0.4.0:
- version "0.4.2"
- resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f"
+deep-extend@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
deep-is@~0.1.3:
version "0.1.3"
@@ -1197,11 +1197,11 @@ progress@^1.1.8:
version "1.1.8"
resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
-rc@^1.1.6:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.4.tgz#a0f606caae2a3b862bbd0ef85482c0125b315fa3"
+rc@^1.2.8:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
dependencies:
- deep-extend "~0.4.0"
+ deep-extend "^0.6.0"
ini "~1.3.0"
minimist "^1.2.0"
strip-json-comments "~2.0.1"
@@ -1290,7 +1290,11 @@ rx-lite@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"
-safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+safe-buffer@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+
+safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
diff --git a/node_modules/require-main-filename/.npmignore b/node_modules/require-main-filename/.npmignore
deleted file mode 100644
index 6f9fe6badf97d..0000000000000
--- a/node_modules/require-main-filename/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-.DS_Store
-.nyc_output
diff --git a/node_modules/require-main-filename/.travis.yml b/node_modules/require-main-filename/.travis.yml
deleted file mode 100644
index ab61ce77ebe3d..0000000000000
--- a/node_modules/require-main-filename/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-os:
- - linux
-node_js:
- - "0.10"
- - "0.12"
- - "4.1"
- - "node"
diff --git a/node_modules/require-main-filename/CHANGELOG.md b/node_modules/require-main-filename/CHANGELOG.md
new file mode 100644
index 0000000000000..717d59e35e2e1
--- /dev/null
+++ b/node_modules/require-main-filename/CHANGELOG.md
@@ -0,0 +1,26 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+
+# [2.0.0](https://github.com/yargs/require-main-filename/compare/v1.0.2...v2.0.0) (2019-01-28)
+
+
+### Chores
+
+* drop support for Node 0.10 ([#11](https://github.com/yargs/require-main-filename/issues/11)) ([87f4e13](https://github.com/yargs/require-main-filename/commit/87f4e13))
+
+
+### BREAKING CHANGES
+
+* drop support for Node 0.10/0.12
+
+
+
+
+## [1.0.2](https://github.com/yargs/require-main-filename/compare/v1.0.1...v1.0.2) (2017-06-16)
+
+
+### Bug Fixes
+
+* add files to package.json ([#4](https://github.com/yargs/require-main-filename/issues/4)) ([fa29988](https://github.com/yargs/require-main-filename/commit/fa29988))
diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json
index ed6ca5399fb5d..db63765c7fa72 100644
--- a/node_modules/require-main-filename/package.json
+++ b/node_modules/require-main-filename/package.json
@@ -1,27 +1,27 @@
{
- "_from": "require-main-filename@^1.0.1",
- "_id": "require-main-filename@1.0.1",
+ "_from": "require-main-filename@^2.0.0",
+ "_id": "require-main-filename@2.0.0",
"_inBundle": false,
- "_integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
+ "_integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"_location": "/require-main-filename",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "require-main-filename@^1.0.1",
+ "raw": "require-main-filename@^2.0.0",
"name": "require-main-filename",
"escapedName": "require-main-filename",
- "rawSpec": "^1.0.1",
+ "rawSpec": "^2.0.0",
"saveSpec": null,
- "fetchSpec": "^1.0.1"
+ "fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/yargs"
],
- "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "_shasum": "97f717b69d48784f5f526a6c5aa8ffdda055a4d1",
- "_spec": "require-main-filename@^1.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/yargs",
+ "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "_shasum": "d0b329ecc7cc0f61649f62215be69af54aa8989b",
+ "_spec": "require-main-filename@^2.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs",
"author": {
"name": "Ben Coe",
"email": "ben@npmjs.com"
@@ -33,10 +33,14 @@
"deprecated": false,
"description": "shim for require.main.filename() that works in as many environments as possible",
"devDependencies": {
- "chai": "^3.5.0",
- "standard": "^6.0.5",
- "tap": "^5.2.0"
+ "chai": "^4.0.0",
+ "standard": "^10.0.3",
+ "standard-version": "^4.0.0",
+ "tap": "^11.0.0"
},
+ "files": [
+ "index.js"
+ ],
"homepage": "https://github.com/yargs/require-main-filename#readme",
"keywords": [
"require",
@@ -52,7 +56,8 @@
},
"scripts": {
"pretest": "standard",
+ "release": "standard-version",
"test": "tap --coverage test.js"
},
- "version": "1.0.1"
+ "version": "2.0.0"
}
diff --git a/node_modules/require-main-filename/test.js b/node_modules/require-main-filename/test.js
deleted file mode 100644
index d89e7dcbaf03d..0000000000000
--- a/node_modules/require-main-filename/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* global describe, it */
-
-var requireMainFilename = require('./')
-
-require('tap').mochaGlobals()
-require('chai').should()
-
-describe('require-main-filename', function () {
- it('returns require.main.filename in normal circumstances', function () {
- requireMainFilename().should.match(/test\.js/)
- })
-
- it('should use children[0].filename when running on iisnode', function () {
- var main = {
- filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js',
- children: [ {filename: 'D:\\home\\site\\wwwroot\\server.js'} ]
- }
- requireMainFilename({
- main: main
- }).should.match(/server\.js/)
- })
-
- it('should not use children[0] if no children exist', function () {
- var main = {
- filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js',
- children: []
- }
- requireMainFilename({
- main: main
- }).should.match(/interceptor\.js/)
- })
-
- it('should default to process.cwd() if require.main is undefined', function () {
- requireMainFilename({}).should.match(/require-main-filename/)
- })
-})
diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json
index a82c85a695444..48f172fb29f5c 100644
--- a/node_modules/rimraf/package.json
+++ b/node_modules/rimraf/package.json
@@ -1,46 +1,47 @@
{
- "_from": "rimraf@2.6.3",
- "_id": "rimraf@2.6.3",
+ "_from": "rimraf@2.7.1",
+ "_id": "rimraf@2.7.1",
"_inBundle": false,
- "_integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "_integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"_location": "/rimraf",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "rimraf@2.6.3",
+ "raw": "rimraf@2.7.1",
"name": "rimraf",
"escapedName": "rimraf",
- "rawSpec": "2.6.3",
+ "rawSpec": "2.7.1",
"saveSpec": null,
- "fetchSpec": "2.6.3"
+ "fetchSpec": "2.7.1"
},
"_requiredBy": [
"#USER",
"/",
"/cacache",
"/copy-concurrently",
- "/flat-cache",
"/fs-vacuum",
- "/fstream",
+ "/istanbul-lib-source-maps",
"/libcipm",
"/libnpx",
"/move-concurrently",
"/node-gyp",
+ "/nyc",
"/pacote",
+ "/spawn-wrap",
"/tap"
],
- "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
- "_shasum": "b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab",
- "_spec": "rimraf@2.6.3",
- "_where": "/Users/aeschright/code/cli",
+ "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "_shasum": "35797f13a7fdadc566142c29d4f07ccad483e3ec",
+ "_spec": "rimraf@2.7.1",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"bin": {
- "rimraf": "./bin.js"
+ "rimraf": "bin.js"
},
"bugs": {
"url": "https://github.com/isaacs/rimraf/issues"
@@ -75,5 +76,5 @@
"preversion": "npm test",
"test": "tap test/*.js"
},
- "version": "2.6.3"
+ "version": "2.7.1"
}
diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js
index e80dd10693f8f..a90ad029f3ece 100644
--- a/node_modules/rimraf/rimraf.js
+++ b/node_modules/rimraf/rimraf.js
@@ -4,7 +4,12 @@ rimraf.sync = rimrafSync
var assert = require("assert")
var path = require("path")
var fs = require("fs")
-var glob = require("glob")
+var glob = undefined
+try {
+ glob = require("glob")
+} catch (_err) {
+ // treat glob as optional.
+}
var _0666 = parseInt('666', 8)
var defaultGlobOpts = {
@@ -37,6 +42,9 @@ function defaults (options) {
if (options.glob === false) {
options.disableGlob = true
}
+ if (options.disableGlob !== true && glob === undefined) {
+ throw Error('glob dependency not found, set `options.disableGlob = true` if intentional')
+ }
options.disableGlob = options.disableGlob || false
options.glob = options.glob || defaultGlobOpts
}
diff --git a/node_modules/spdx-license-ids/README.md b/node_modules/spdx-license-ids/README.md
index c7b5b5f320845..699514d1a28aa 100644
--- a/node_modules/spdx-license-ids/README.md
+++ b/node_modules/spdx-license-ids/README.md
@@ -1,13 +1,13 @@
# spdx-license-ids
-[](https://www.npmjs.org/package/spdx-license-ids)
-[](https://travis-ci.org/shinnn/spdx-license-ids)
+[](https://www.npmjs.com/package/spdx-license-ids)
+[](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/spdx-license-ids)
A list of [SPDX license](https://spdx.org/licenses/) identifiers
## Installation
-[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm):
+[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/):
```
npm install spdx-license-ids
@@ -17,13 +17,13 @@ npm install spdx-license-ids
### require('spdx-license-ids')
-Type: `>`
+Type: `string[]`
All license IDs except for the currently deprecated ones.
```javascript
const ids = require('spdx-license-ids');
-//=> ['0BSD', 'AAL', 'Abstyles', 'Adobe-2006', 'Adobe-Glyph', 'ADSL', 'AFL-1.1', 'AFL-1.2', ...]
+//=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...]
ids.includes('BSD-3-Clause'); //=> true
ids.includes('CC-BY-1.0'); //=> true
@@ -33,13 +33,13 @@ ids.includes('GPL-3.0'); //=> false
### require('spdx-license-ids/deprecated')
-Type: `>`
+Type: `string[]`
Deprecated license IDs.
```javascript
const deprecatedIds = require('spdx-license-ids/deprecated');
-//=> ['AGPL-1.0', 'AGPL-3.0', 'eCos-2.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', ...]
+//=> ['AGPL-1.0', 'AGPL-3.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', 'GPL-2.0', ...]
deprecatedIds.includes('BSD-3-Clause'); //=> false
deprecatedIds.includes('CC-BY-1.0'); //=> false
diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json
index ed06199127e0c..5283c78dc77c3 100644
--- a/node_modules/spdx-license-ids/index.json
+++ b/node_modules/spdx-license-ids/index.json
@@ -45,6 +45,7 @@
"BSD-3-Clause-No-Nuclear-License",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-No-Nuclear-Warranty",
+ "BSD-3-Clause-Open-MPI",
"BSD-4-Clause",
"BSD-4-Clause-UC",
"BSD-Protection",
@@ -55,6 +56,7 @@
"Beerware",
"BitTorrent-1.0",
"BitTorrent-1.1",
+ "BlueOak-1.0.0",
"Borceux",
"CATOSL-1.1",
"CC-BY-1.0",
@@ -87,6 +89,7 @@
"CC-BY-SA-2.5",
"CC-BY-SA-3.0",
"CC-BY-SA-4.0",
+ "CC-PDDC",
"CC0-1.0",
"CDDL-1.0",
"CDDL-1.1",
@@ -98,6 +101,8 @@
"CECILL-2.1",
"CECILL-B",
"CECILL-C",
+ "CERN-OHL-1.1",
+ "CERN-OHL-1.2",
"CNRI-Jython",
"CNRI-Python",
"CNRI-Python-GPL-Compatible",
@@ -152,6 +157,7 @@
"Glide",
"Glulxe",
"HPND",
+ "HPND-sell-variant",
"HaskellReport",
"IBM-pibs",
"ICU",
@@ -165,6 +171,7 @@
"Intel",
"Intel-ACPI",
"Interbase-1.0",
+ "JPNIC",
"JSON",
"JasPer-2.0",
"LAL-1.2",
@@ -265,6 +272,7 @@
"PDDL-1.0",
"PHP-3.0",
"PHP-3.01",
+ "Parity-6.0.0",
"Plexus",
"PostgreSQL",
"Python-2.0",
@@ -283,12 +291,15 @@
"SGI-B-1.0",
"SGI-B-1.1",
"SGI-B-2.0",
+ "SHL-0.5",
+ "SHL-0.51",
"SISSL",
"SISSL-1.2",
"SMLNJ",
"SMPPL",
"SNIA",
"SPL-1.0",
+ "SSPL-1.0",
"SWL",
"Saxpath",
"Sendmail",
@@ -299,6 +310,7 @@
"Spencer-94",
"Spencer-99",
"SugarCRM-1.1.3",
+ "TAPR-OHL-1.0",
"TCL",
"TCP-wrappers",
"TMate",
@@ -335,6 +347,7 @@
"Zimbra-1.3",
"Zimbra-1.4",
"Zlib",
+ "blessing",
"bzip2-1.0.5",
"bzip2-1.0.6",
"copyleft-next-0.3.0",
@@ -346,6 +359,7 @@
"gSOAP-1.3b",
"gnuplot",
"iMatix",
+ "libpng-2.0",
"libtiff",
"mpich2",
"psfrag",
diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json
index 84fd02c3d6022..45cc6c3041aa7 100644
--- a/node_modules/spdx-license-ids/package.json
+++ b/node_modules/spdx-license-ids/package.json
@@ -1,19 +1,19 @@
{
- "_from": "spdx-license-ids@3.0.3",
- "_id": "spdx-license-ids@3.0.3",
+ "_from": "spdx-license-ids@3.0.5",
+ "_id": "spdx-license-ids@3.0.5",
"_inBundle": false,
- "_integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==",
+ "_integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
"_location": "/spdx-license-ids",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "spdx-license-ids@3.0.3",
+ "raw": "spdx-license-ids@3.0.5",
"name": "spdx-license-ids",
"escapedName": "spdx-license-ids",
- "rawSpec": "3.0.3",
+ "rawSpec": "3.0.5",
"saveSpec": null,
- "fetchSpec": "3.0.3"
+ "fetchSpec": "3.0.5"
},
"_requiredBy": [
"#USER",
@@ -21,10 +21,10 @@
"/spdx-correct",
"/spdx-expression-parse"
],
- "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz",
- "_shasum": "81c0ce8f21474756148bbb5f3bfc0f36bf15d76e",
- "_spec": "spdx-license-ids@3.0.3",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
+ "_shasum": "3694b5804567a458d3c8045842a6358632f62654",
+ "_spec": "spdx-license-ids@3.0.5",
+ "_where": "/home/kyle/cli",
"author": {
"name": "Shinnosuke Watanabe",
"url": "https://github.com/shinnn"
@@ -73,5 +73,5 @@
"pretest": "eslint .",
"test": "node test.js"
},
- "version": "3.0.3"
+ "version": "3.0.5"
}
diff --git a/node_modules/ssri/CHANGELOG.md b/node_modules/ssri/CHANGELOG.md
index d4c5897902d12..15c930b844d02 100644
--- a/node_modules/ssri/CHANGELOG.md
+++ b/node_modules/ssri/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [6.0.2](https://github.com/zkat/ssri/compare/v6.0.1...v6.0.2) (2021-04-07)
+
+
+### Bug Fixes
+
+* backport regex change from 8.0.1 ([b30dfdb](https://github.com/zkat/ssri/commit/b30dfdb)), closes [#19](https://github.com/zkat/ssri/issues/19)
+
+
+
## [6.0.1](https://github.com/zkat/ssri/compare/v6.0.0...v6.0.1) (2018-08-27)
diff --git a/node_modules/ssri/index.js b/node_modules/ssri/index.js
index e102892b0bcd0..673ed2ad249ce 100644
--- a/node_modules/ssri/index.js
+++ b/node_modules/ssri/index.js
@@ -8,7 +8,7 @@ const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512']
const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i
const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/
-const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/
+const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/
const VCHAR_REGEX = /^[\x21-\x7E]+$/
const SsriOpts = figgyPudding({
diff --git a/node_modules/ssri/package.json b/node_modules/ssri/package.json
index 5dd740daa2782..c181f2b40f25f 100644
--- a/node_modules/ssri/package.json
+++ b/node_modules/ssri/package.json
@@ -1,31 +1,32 @@
{
- "_from": "ssri@latest",
- "_id": "ssri@6.0.1",
+ "_from": "ssri@6.0.2",
+ "_id": "ssri@6.0.2",
"_inBundle": false,
- "_integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
+ "_integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==",
"_location": "/ssri",
"_phantomChildren": {},
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "ssri@latest",
+ "raw": "ssri@6.0.2",
"name": "ssri",
"escapedName": "ssri",
- "rawSpec": "latest",
+ "rawSpec": "6.0.2",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "6.0.2"
},
"_requiredBy": [
"#USER",
"/",
"/cacache",
+ "/libnpmpublish",
"/make-fetch-happen",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
- "_shasum": "2a3c41b28dd45b62b63676ecb74001265ae9edd8",
- "_spec": "ssri@latest",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz",
+ "_shasum": "157939134f20464e7301ddba3e90ffa8f7728ac5",
+ "_spec": "ssri@6.0.2",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/legacy",
"author": {
"name": "Kat Marchรกn",
"email": "kzm@sykosomatic.org"
@@ -89,5 +90,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "6.0.1"
+ "version": "6.0.2"
}
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/os-locale/node_modules/cross-spawn/LICENSE b/node_modules/string_decoder/node_modules/safe-buffer/LICENSE
similarity index 94%
rename from node_modules/os-locale/node_modules/cross-spawn/LICENSE
rename to node_modules/string_decoder/node_modules/safe-buffer/LICENSE
index 8407b9a30f51b..0c068ceecbd48 100644
--- a/node_modules/os-locale/node_modules/cross-spawn/LICENSE
+++ b/node_modules/string_decoder/node_modules/safe-buffer/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2018 Made With MOXY Lda
+Copyright (c) Feross Aboukhadijeh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/string_decoder/node_modules/safe-buffer/README.md b/node_modules/string_decoder/node_modules/safe-buffer/README.md
new file mode 100644
index 0000000000000..356e3519302cf
--- /dev/null
+++ b/node_modules/string_decoder/node_modules/safe-buffer/README.md
@@ -0,0 +1,586 @@
+# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+[Get supported safe-buffer with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-safe-buffer?utm_source=npm-safe-buffer&utm_medium=referral&utm_campaign=readme)
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a `TypedArray` instance,
+the newly created `Buffer` will share the same allocated memory as the
+TypedArray.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints:
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints:
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `str`. If
+provided, the `encoding` parameter identifies the character encoding.
+If not provided, `encoding` defaults to `'utf8'`.
+
+```js
+const buf1 = Buffer.from('this is a tรฉst');
+console.log(buf1.toString());
+ // prints: this is a tรฉst
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tรฉst
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ //
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ //
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ //
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ //
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ //
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts b/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts
new file mode 100644
index 0000000000000..e9fed809a5ab5
--- /dev/null
+++ b/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts
@@ -0,0 +1,187 @@
+declare module "safe-buffer" {
+ export class Buffer {
+ length: number
+ write(string: string, offset?: number, length?: number, encoding?: string): number;
+ toString(encoding?: string, start?: number, end?: number): string;
+ toJSON(): { type: 'Buffer', data: any[] };
+ equals(otherBuffer: Buffer): boolean;
+ compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+ copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ slice(start?: number, end?: number): Buffer;
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUInt8(offset: number, noAssert?: boolean): number;
+ readUInt16LE(offset: number, noAssert?: boolean): number;
+ readUInt16BE(offset: number, noAssert?: boolean): number;
+ readUInt32LE(offset: number, noAssert?: boolean): number;
+ readUInt32BE(offset: number, noAssert?: boolean): number;
+ readInt8(offset: number, noAssert?: boolean): number;
+ readInt16LE(offset: number, noAssert?: boolean): number;
+ readInt16BE(offset: number, noAssert?: boolean): number;
+ readInt32LE(offset: number, noAssert?: boolean): number;
+ readInt32BE(offset: number, noAssert?: boolean): number;
+ readFloatLE(offset: number, noAssert?: boolean): number;
+ readFloatBE(offset: number, noAssert?: boolean): number;
+ readDoubleLE(offset: number, noAssert?: boolean): number;
+ readDoubleBE(offset: number, noAssert?: boolean): number;
+ swap16(): Buffer;
+ swap32(): Buffer;
+ swap64(): Buffer;
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
+ fill(value: any, offset?: number, end?: number): this;
+ indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
+
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ */
+ constructor (str: string, encoding?: string);
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ */
+ constructor (size: number);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: Uint8Array);
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ */
+ constructor (arrayBuffer: ArrayBuffer);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: any[]);
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ */
+ constructor (buffer: Buffer);
+ prototype: Buffer;
+ /**
+ * Allocates a new Buffer using an {array} of octets.
+ *
+ * @param array
+ */
+ static from(array: any[]): Buffer;
+ /**
+ * When passed a reference to the .buffer property of a TypedArray instance,
+ * the newly created Buffer will share the same allocated memory as the TypedArray.
+ * The optional {byteOffset} and {length} arguments specify a memory range
+ * within the {arrayBuffer} that will be shared by the Buffer.
+ *
+ * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
+ * @param byteOffset
+ * @param length
+ */
+ static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new Buffer instance.
+ *
+ * @param buffer
+ */
+ static from(buffer: Buffer): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ *
+ * @param str
+ */
+ static from(str: string, encoding?: string): Buffer;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ static isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns true if {encoding} is a valid encoding argument.
+ * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ *
+ * @param encoding string to test.
+ */
+ static isEncoding(encoding: string): boolean;
+ /**
+ * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+ * This is not the same as String.prototype.length since that returns the number of characters in a string.
+ *
+ * @param string string to test.
+ * @param encoding encoding used to evaluate (defaults to 'utf8')
+ */
+ static byteLength(string: string, encoding?: string): number;
+ /**
+ * Returns a buffer which is the result of concatenating all the buffers in the list together.
+ *
+ * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+ * If the list has exactly one item, then the first item of the list is returned.
+ * If the list has more than one item, then a new Buffer is created.
+ *
+ * @param list An array of Buffer objects to concatenate
+ * @param totalLength Total length of the buffers when concatenated.
+ * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+ */
+ static concat(list: Buffer[], totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ static compare(buf1: Buffer, buf2: Buffer): number;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
+ * If parameter is omitted, buffer will be filled with zeros.
+ * @param encoding encoding used for call to buf.fill while initalizing
+ */
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafeSlow(size: number): Buffer;
+ }
+}
\ No newline at end of file
diff --git a/node_modules/string_decoder/node_modules/safe-buffer/index.js b/node_modules/string_decoder/node_modules/safe-buffer/index.js
new file mode 100644
index 0000000000000..054c8d30ddafb
--- /dev/null
+++ b/node_modules/string_decoder/node_modules/safe-buffer/index.js
@@ -0,0 +1,64 @@
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.prototype = Object.create(Buffer.prototype)
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/node_modules/string_decoder/node_modules/safe-buffer/package.json b/node_modules/string_decoder/node_modules/safe-buffer/package.json
new file mode 100644
index 0000000000000..e7f13cb4b47ac
--- /dev/null
+++ b/node_modules/string_decoder/node_modules/safe-buffer/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "safe-buffer@~5.2.0",
+ "_id": "safe-buffer@5.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
+ "_location": "/string_decoder/safe-buffer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "safe-buffer@~5.2.0",
+ "name": "safe-buffer",
+ "escapedName": "safe-buffer",
+ "rawSpec": "~5.2.0",
+ "saveSpec": null,
+ "fetchSpec": "~5.2.0"
+ },
+ "_requiredBy": [
+ "/string_decoder"
+ ],
+ "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
+ "_shasum": "b74daec49b1148f88c64b68d49b1e815c1f2f519",
+ "_spec": "safe-buffer@~5.2.0",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli/node_modules/string_decoder",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Safer Node.js Buffer API",
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^4.0.0"
+ },
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "safe-buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/*.js"
+ },
+ "types": "index.d.ts",
+ "version": "5.2.0"
+}
diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json
index 0b704d99a1bf5..cc843b6601450 100644
--- a/node_modules/string_decoder/package.json
+++ b/node_modules/string_decoder/package.json
@@ -1,8 +1,8 @@
{
"_from": "string_decoder@^1.1.1",
- "_id": "string_decoder@1.2.0",
+ "_id": "string_decoder@1.3.0",
"_inBundle": false,
- "_integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
+ "_integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"_location": "/string_decoder",
"_phantomChildren": {},
"_requested": {
@@ -18,16 +18,16 @@
"_requiredBy": [
"/readable-stream"
],
- "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
- "_shasum": "fe86e738b19544afe70469243b2a1ee9240eae8d",
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "_shasum": "42f114594a46cf1a8e30b0a84f56c78c3edac21e",
"_spec": "string_decoder@^1.1.1",
- "_where": "/Users/aeschright/code/cli/node_modules/readable-stream",
+ "_where": "/Users/darcyclarke/Documents/Repos/npm/cli/node_modules/readable-stream",
"bugs": {
"url": "https://github.com/nodejs/string_decoder/issues"
},
"bundleDependencies": false,
"dependencies": {
- "safe-buffer": "~5.1.0"
+ "safe-buffer": "~5.2.0"
},
"deprecated": false,
"description": "The string_decoder module from Node core",
@@ -58,5 +58,5 @@
"ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
"test": "tap test/parallel/*.js && node test/verify-dependencies"
},
- "version": "1.2.0"
+ "version": "1.3.0"
}
diff --git a/node_modules/term-size/vendor/macos/term-size b/node_modules/term-size/vendor/macos/term-size
index e383cc737f8e2..c32a1fdc1b073 100755
Binary files a/node_modules/term-size/vendor/macos/term-size and b/node_modules/term-size/vendor/macos/term-size differ
diff --git a/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dca85b..0000000000000
--- a/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/update-notifier/package.json b/node_modules/update-notifier/package.json
index 836b3df254027..fd049446e1301 100644
--- a/node_modules/update-notifier/package.json
+++ b/node_modules/update-notifier/package.json
@@ -1,10 +1,4 @@
{
- "_args": [
- [
- "update-notifier@2.5.0",
- "/Users/rebecca/code/npm"
- ]
- ],
"_from": "update-notifier@2.5.0",
"_id": "update-notifier@2.5.0",
"_inBundle": false,
@@ -22,12 +16,14 @@
"fetchSpec": "2.5.0"
},
"_requiredBy": [
+ "#USER",
"/",
"/libnpx"
],
"_resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz",
- "_spec": "2.5.0",
- "_where": "/Users/rebecca/code/npm",
+ "_shasum": "d0744593e13f161e406acb1d9408b72cad08aff6",
+ "_spec": "update-notifier@2.5.0",
+ "_where": "/Users/ruyadorno/Documents/workspace/cli/latest",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -36,6 +32,7 @@
"bugs": {
"url": "https://github.com/yeoman/update-notifier/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"boxen": "^1.2.1",
"chalk": "^2.0.1",
@@ -48,6 +45,7 @@
"semver-diff": "^2.0.0",
"xdg-basedir": "^3.0.0"
},
+ "deprecated": false,
"description": "Update notifications for your CLI app",
"devDependencies": {
"ava": "*",
diff --git a/node_modules/uri-js/LICENSE b/node_modules/uri-js/LICENSE
new file mode 100755
index 0000000000000..9338bde8eb43b
--- /dev/null
+++ b/node_modules/uri-js/LICENSE
@@ -0,0 +1,11 @@
+Copyright 2011 Gary Court. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY GARY COURT "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 GARY COURT OR 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 views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court.
diff --git a/node_modules/uri-js/README.md b/node_modules/uri-js/README.md
new file mode 100755
index 0000000000000..3dbe4054f2577
--- /dev/null
+++ b/node_modules/uri-js/README.md
@@ -0,0 +1,201 @@
+# URI.js
+
+URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc).
+It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications.
+
+URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated).
+
+## API
+
+### Parsing
+
+ URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body");
+ //returns:
+ //{
+ // scheme : "uri",
+ // userinfo : "user:pass",
+ // host : "example.com",
+ // port : 123,
+ // path : "/one/two.three",
+ // query : "q1=a1&q2=a2",
+ // fragment : "body"
+ //}
+
+### Serializing
+
+ URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer"
+
+### Resolving
+
+ URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g"
+
+### Normalizing
+
+ URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html"
+
+### Comparison
+
+ URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true
+
+### IP Support
+
+ //IPv4 normalization
+ URI.normalize("//192.068.001.000") === "//192.68.1.0"
+
+ //IPv6 normalization
+ URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]"
+
+ //IPv6 zone identifier support
+ URI.parse("//[2001:db8::7%25en1]");
+ //returns:
+ //{
+ // host : "2001:db8::7%en1"
+ //}
+
+### IRI Support
+
+ //convert IRI to URI
+ URI.serialize(URI.parse("http://examplรฉ.org/rosรฉ")) === "http://xn--exampl-gva.org/ros%C3%A9"
+ //convert URI to IRI
+ URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplรฉ.org/rosรฉ"
+
+### Options
+
+All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:
+
+* `scheme` (string)
+
+ Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
+
+* `reference` (string)
+
+ If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme.
+
+* `tolerant` (boolean, false)
+
+ If set to `true`, the parser will relax URI resolving rules.
+
+* `absolutePath` (boolean, false)
+
+ If set to `true`, the serializer will not resolve a relative `path` component.
+
+* `iri` (boolean, false)
+
+ If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
+
+* `unicodeSupport` (boolean, false)
+
+ If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
+
+* `domainHost` (boolean, false)
+
+ If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).
+
+## Scheme Extendable
+
+URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes:
+
+* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\]
+* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\]
+* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\]
+* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\]
+* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\]
+
+### HTTP/HTTPS Support
+
+ URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true
+ URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true
+
+### WS/WSS Support
+
+ URI.parse("wss://example.com/foo?bar=baz");
+ //returns:
+ //{
+ // scheme : "wss",
+ // host: "example.com",
+ // resourceName: "/foo?bar=baz",
+ // secure: true,
+ //}
+
+ URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true
+
+### Mailto Support
+
+ URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!");
+ //returns:
+ //{
+ // scheme : "mailto",
+ // to : ["alpha@example.com", "bravo@example.com"],
+ // subject : "SUBSCRIBE",
+ // body : "Sign me up!"
+ //}
+
+ URI.serialize({
+ scheme : "mailto",
+ to : ["alpha@example.com"],
+ subject : "REMOVE",
+ body : "Please remove me",
+ headers : {
+ cc : "charlie@example.com"
+ }
+ }) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me"
+
+### URN Support
+
+ URI.parse("urn:example:foo");
+ //returns:
+ //{
+ // scheme : "urn",
+ // nid : "example",
+ // nss : "foo",
+ //}
+
+#### URN UUID Support
+
+ URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6");
+ //returns:
+ //{
+ // scheme : "urn",
+ // nid : "example",
+ // uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
+ //}
+
+## Usage
+
+To load in a browser, use the following tag:
+
+
+
+To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line:
+
+ npm install uri-js
+ # OR
+ yarn add uri-js
+
+Then, in your code, load it using:
+
+ const URI = require("uri-js");
+
+If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using:
+
+ import * as URI from "uri-js";
+
+Or you can load just what you need using named exports:
+
+ import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js";
+
+## Breaking changes
+
+### Breaking changes from 3.x
+
+URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler.
+
+The UUID of a URN can now be found in the `uuid` property.
+
+### Breaking changes from 2.x
+
+URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful.
+
+### Breaking changes from 1.x
+
+The `errors` array on parsed components is now an `error` string.
diff --git a/node_modules/uri-js/dist/es5/uri.all.d.ts b/node_modules/uri-js/dist/es5/uri.all.d.ts
new file mode 100755
index 0000000000000..da51e23527705
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.d.ts
@@ -0,0 +1,59 @@
+export interface URIComponents {
+ scheme?: string;
+ userinfo?: string;
+ host?: string;
+ port?: number | string;
+ path?: string;
+ query?: string;
+ fragment?: string;
+ reference?: string;
+ error?: string;
+}
+export interface URIOptions {
+ scheme?: string;
+ reference?: string;
+ tolerant?: boolean;
+ absolutePath?: boolean;
+ iri?: boolean;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+}
+export interface URISchemeHandler {
+ scheme: string;
+ parse(components: ParentComponents, options: Options): Components;
+ serialize(components: Components, options: Options): ParentComponents;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+ absolutePath?: boolean;
+}
+export interface URIRegExps {
+ NOT_SCHEME: RegExp;
+ NOT_USERINFO: RegExp;
+ NOT_HOST: RegExp;
+ NOT_PATH: RegExp;
+ NOT_PATH_NOSCHEME: RegExp;
+ NOT_QUERY: RegExp;
+ NOT_FRAGMENT: RegExp;
+ ESCAPE: RegExp;
+ UNRESERVED: RegExp;
+ OTHER_CHARS: RegExp;
+ PCT_ENCODED: RegExp;
+ IPV4ADDRESS: RegExp;
+ IPV6ADDRESS: RegExp;
+}
+export declare const SCHEMES: {
+ [scheme: string]: URISchemeHandler;
+};
+export declare function pctEncChar(chr: string): string;
+export declare function pctDecChars(str: string): string;
+export declare function parse(uriString: string, options?: URIOptions): URIComponents;
+export declare function removeDotSegments(input: string): string;
+export declare function serialize(components: URIComponents, options?: URIOptions): string;
+export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
+export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
+export declare function normalize(uri: string, options?: URIOptions): string;
+export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
+export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
+export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
+export declare function escapeComponent(str: string, options?: URIOptions): string;
+export declare function unescapeComponent(str: string, options?: URIOptions): string;
diff --git a/node_modules/uri-js/dist/es5/uri.all.js b/node_modules/uri-js/dist/es5/uri.all.js
new file mode 100755
index 0000000000000..47f42f8aa1669
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.js
@@ -0,0 +1,1443 @@
+/** @license URI.js v4.4.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.URI = global.URI || {})));
+}(this, (function (exports) { 'use strict';
+
+function merge() {
+ for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
+ sets[_key] = arguments[_key];
+ }
+
+ if (sets.length > 1) {
+ sets[0] = sets[0].slice(0, -1);
+ var xl = sets.length - 1;
+ for (var x = 1; x < xl; ++x) {
+ sets[x] = sets[x].slice(1, -1);
+ }
+ sets[xl] = sets[xl].slice(1);
+ return sets.join('');
+ } else {
+ return sets[0];
+ }
+}
+function subexp(str) {
+ return "(?:" + str + ")";
+}
+function typeOf(o) {
+ return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
+}
+function toUpperCase(str) {
+ return str.toUpperCase();
+}
+function toArray(obj) {
+ return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
+}
+function assign(target, source) {
+ var obj = target;
+ if (source) {
+ for (var key in source) {
+ obj[key] = source[key];
+ }
+ }
+ return obj;
+}
+
+function buildExps(isIRI) {
+ var ALPHA$$ = "[A-Za-z]",
+ CR$ = "[\\x0D]",
+ DIGIT$$ = "[0-9]",
+ DQUOTE$$ = "[\\x22]",
+ HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"),
+ //case-insensitive
+ LF$$ = "[\\x0A]",
+ SP$$ = "[\\x20]",
+ PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)),
+ //expanded
+ GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]",
+ SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",
+ RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),
+ UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]",
+ //subset, excludes bidi control characters
+ IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
+ //subset
+ UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
+ SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
+ USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
+ DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$),
+ DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
+ //relaxed parsing rules
+ IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
+ H16$ = subexp(HEXDIG$$ + "{1,4}"),
+ LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$),
+ IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$),
+ // 6( h16 ":" ) ls32
+ IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$),
+ // "::" 5( h16 ":" ) ls32
+ IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$),
+ //[ h16 ] "::" 4( h16 ":" ) ls32
+ IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$),
+ //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+ IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$),
+ //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+ IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$),
+ //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
+ IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$),
+ //[ *4( h16 ":" ) h16 ] "::" ls32
+ IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$),
+ //[ *5( h16 ":" ) h16 ] "::" h16
+ IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
+ //[ *6( h16 ":" ) h16 ] "::"
+ IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
+ ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
+ //RFC 6874
+ IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$),
+ //RFC 6874
+ IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$),
+ //RFC 6874, with relaxed parsing rules
+ IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
+ IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"),
+ //RFC 6874
+ REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
+ HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$),
+ PORT$ = subexp(DIGIT$$ + "*"),
+ AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"),
+ PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
+ SEGMENT$ = subexp(PCHAR$ + "*"),
+ SEGMENT_NZ$ = subexp(PCHAR$ + "+"),
+ SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
+ PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"),
+ PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"),
+ //simplified
+ PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_EMPTY$ = "(?!" + PCHAR$ + ")",
+ PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"),
+ FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"),
+ HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$),
+ RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$),
+ ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"),
+ GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$",
+ SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
+ return {
+ NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
+ NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
+ NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
+ ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ UNRESERVED: new RegExp(UNRESERVED$$, "g"),
+ OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
+ PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
+ IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
+ IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
+ };
+}
+var URI_PROTOCOL = buildExps(false);
+
+var IRI_PROTOCOL = buildExps(true);
+
+var slicedToArray = function () {
+ function sliceIterator(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"]) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+ }
+
+ return function (arr, i) {
+ if (Array.isArray(arr)) {
+ return arr;
+ } else if (Symbol.iterator in Object(arr)) {
+ return sliceIterator(arr, i);
+ } else {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+ }
+ };
+}();
+
+
+
+
+
+
+
+
+
+
+
+
+
+var toConsumableArray = function (arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
+
+ return arr2;
+ } else {
+ return Array.from(arr);
+ }
+};
+
+/** Highest positive signed 32-bit float value */
+
+var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
+
+/** Bootstring parameters */
+var base = 36;
+var tMin = 1;
+var tMax = 26;
+var skew = 38;
+var damp = 700;
+var initialBias = 72;
+var initialN = 128; // 0x80
+var delimiter = '-'; // '\x2D'
+
+/** Regular expressions */
+var regexPunycode = /^xn--/;
+var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
+var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
+
+/** Error messages */
+var 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 */
+var baseMinusTMin = base - tMin;
+var floor = Math.floor;
+var stringFromCharCode = String.fromCharCode;
+
+/*--------------------------------------------------------------------------*/
+
+/**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+function error$1(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 result = [];
+ var length = array.length;
+ 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
+ * @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 = [];
+ var counter = 0;
+ var length = string.length;
+ while (counter < length) {
+ var value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // It's a high surrogate, and there is a next character.
+ var extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) {
+ // Low surrogate.
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // It's an 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).
+ */
+var ucs2encode = function ucs2encode(array) {
+ return String.fromCodePoint.apply(String, toConsumableArray(array));
+};
+
+/**
+ * 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.
+ */
+var basicToDigit = function basicToDigit(codePoint) {
+ if (codePoint - 0x30 < 0x0A) {
+ return codePoint - 0x16;
+ }
+ if (codePoint - 0x41 < 0x1A) {
+ return codePoint - 0x41;
+ }
+ if (codePoint - 0x61 < 0x1A) {
+ return codePoint - 0x61;
+ }
+ 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.
+ */
+var digitToBasic = 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
+ */
+var adapt = 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.
+ */
+var decode = function decode(input) {
+ // Don't use UCS-2.
+ var output = [];
+ var inputLength = input.length;
+ var i = 0;
+ var n = initialN;
+ var bias = initialBias;
+
+ // 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.
+
+ var basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (var j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error$1('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 (var 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`.
+ var oldi = i;
+ for (var w = 1, k = base;; /* no condition */k += base) {
+
+ if (index >= inputLength) {
+ error$1('invalid-input');
+ }
+
+ var digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error$1('overflow');
+ }
+
+ i += digit * w;
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+
+ if (digit < t) {
+ break;
+ }
+
+ var baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error$1('overflow');
+ }
+
+ w *= baseMinusT;
+ }
+
+ var 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$1('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output.
+ output.splice(i++, 0, n);
+ }
+
+ return String.fromCodePoint.apply(String, 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.
+ */
+var encode = function encode(input) {
+ var output = [];
+
+ // Convert the input in UCS-2 to an array of Unicode code points.
+ input = ucs2decode(input);
+
+ // Cache the length.
+ var inputLength = input.length;
+
+ // Initialize the state.
+ var n = initialN;
+ var delta = 0;
+ var bias = initialBias;
+
+ // Handle the basic code points.
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var _currentValue2 = _step.value;
+
+ if (_currentValue2 < 0x80) {
+ output.push(stringFromCharCode(_currentValue2));
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ var basicLength = output.length;
+ var handledCPCount = basicLength;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string with a delimiter unless it's empty.
+ 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:
+ var m = maxInt;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var currentValue = _step2.value;
+
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's state to ,
+ // but guard against overflow.
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+
+ var handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error$1('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var _currentValue = _step3.value;
+
+ if (_currentValue < n && ++delta > maxInt) {
+ error$1('overflow');
+ }
+ if (_currentValue == n) {
+ // Represent delta as a generalized variable-length integer.
+ var q = delta;
+ for (var k = base;; /* no condition */k += base) {
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+ if (q < t) {
+ break;
+ }
+ var qMinusT = q - t;
+ var 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;
+ }
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ ++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.
+ */
+var toUnicode = 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.
+ */
+var toASCII = function toASCII(input) {
+ return mapDomain(input, function (string) {
+ return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
+ });
+};
+
+/*--------------------------------------------------------------------------*/
+
+/** Define the public API */
+var punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '2.1.0',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+};
+
+/**
+ * URI.js
+ *
+ * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
+ * @author Gary Court
+ * @see http://github.com/garycourt/uri-js
+ */
+/**
+ * Copyright 2011 Gary Court. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT OR
+ * 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 views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of Gary Court.
+ */
+var SCHEMES = {};
+function pctEncChar(chr) {
+ var c = chr.charCodeAt(0);
+ var e = void 0;
+ if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
+ return e;
+}
+function pctDecChars(str) {
+ var newStr = "";
+ var i = 0;
+ var il = str.length;
+ while (i < il) {
+ var c = parseInt(str.substr(i + 1, 2), 16);
+ if (c < 128) {
+ newStr += String.fromCharCode(c);
+ i += 3;
+ } else if (c >= 194 && c < 224) {
+ if (il - i >= 6) {
+ var c2 = parseInt(str.substr(i + 4, 2), 16);
+ newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
+ } else {
+ newStr += str.substr(i, 6);
+ }
+ i += 6;
+ } else if (c >= 224) {
+ if (il - i >= 9) {
+ var _c = parseInt(str.substr(i + 4, 2), 16);
+ var c3 = parseInt(str.substr(i + 7, 2), 16);
+ newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
+ } else {
+ newStr += str.substr(i, 9);
+ }
+ i += 9;
+ } else {
+ newStr += str.substr(i, 3);
+ i += 3;
+ }
+ }
+ return newStr;
+}
+function _normalizeComponentEncoding(components, protocol) {
+ function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(protocol.UNRESERVED) ? str : decStr;
+ }
+ if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
+ if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ return components;
+}
+
+function _stripLeadingZeros(str) {
+ return str.replace(/^0*(.*)/, "$1") || "0";
+}
+function _normalizeIPv4(host, protocol) {
+ var matches = host.match(protocol.IPV4ADDRESS) || [];
+
+ var _matches = slicedToArray(matches, 2),
+ address = _matches[1];
+
+ if (address) {
+ return address.split(".").map(_stripLeadingZeros).join(".");
+ } else {
+ return host;
+ }
+}
+function _normalizeIPv6(host, protocol) {
+ var matches = host.match(protocol.IPV6ADDRESS) || [];
+
+ var _matches2 = slicedToArray(matches, 3),
+ address = _matches2[1],
+ zone = _matches2[2];
+
+ if (address) {
+ var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),
+ _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
+ last = _address$toLowerCase$2[0],
+ first = _address$toLowerCase$2[1];
+
+ var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
+ var lastFields = last.split(":").map(_stripLeadingZeros);
+ var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
+ var fieldCount = isLastFieldIPv4Address ? 7 : 8;
+ var lastFieldsStart = lastFields.length - fieldCount;
+ var fields = Array(fieldCount);
+ for (var x = 0; x < fieldCount; ++x) {
+ fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
+ }
+ if (isLastFieldIPv4Address) {
+ fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
+ }
+ var allZeroFields = fields.reduce(function (acc, field, index) {
+ if (!field || field === "0") {
+ var lastLongest = acc[acc.length - 1];
+ if (lastLongest && lastLongest.index + lastLongest.length === index) {
+ lastLongest.length++;
+ } else {
+ acc.push({ index: index, length: 1 });
+ }
+ }
+ return acc;
+ }, []);
+ var longestZeroFields = allZeroFields.sort(function (a, b) {
+ return b.length - a.length;
+ })[0];
+ var newHost = void 0;
+ if (longestZeroFields && longestZeroFields.length > 1) {
+ var newFirst = fields.slice(0, longestZeroFields.index);
+ var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
+ newHost = newFirst.join(":") + "::" + newLast.join(":");
+ } else {
+ newHost = fields.join(":");
+ }
+ if (zone) {
+ newHost += "%" + zone;
+ }
+ return newHost;
+ } else {
+ return host;
+ }
+}
+var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
+var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
+function parse(uriString) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var components = {};
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
+ var matches = uriString.match(URI_PARSE);
+ if (matches) {
+ if (NO_MATCH_IS_UNDEFINED) {
+ //store each component
+ components.scheme = matches[1];
+ components.userinfo = matches[3];
+ components.host = matches[4];
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = matches[7];
+ components.fragment = matches[8];
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = matches[5];
+ }
+ } else {
+ //IE FIX for improper RegExp matching
+ //store each component
+ components.scheme = matches[1] || undefined;
+ components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
+ components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
+ components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
+ }
+ }
+ if (components.host) {
+ //normalize IP hosts
+ components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
+ }
+ //determine reference type
+ if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
+ components.reference = "same-document";
+ } else if (components.scheme === undefined) {
+ components.reference = "relative";
+ } else if (components.fragment === undefined) {
+ components.reference = "absolute";
+ } else {
+ components.reference = "uri";
+ }
+ //check for reference errors
+ if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
+ components.error = components.error || "URI is not a " + options.reference + " reference.";
+ }
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //check if scheme can't handle IRIs
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
+ //if host component is a domain name
+ if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ }
+ //convert IRI -> URI
+ _normalizeComponentEncoding(components, URI_PROTOCOL);
+ } else {
+ //normalize encodings
+ _normalizeComponentEncoding(components, protocol);
+ }
+ //perform scheme specific parsing
+ if (schemeHandler && schemeHandler.parse) {
+ schemeHandler.parse(components, options);
+ }
+ } else {
+ components.error = components.error || "URI can not be parsed.";
+ }
+ return components;
+}
+
+function _recomposeAuthority(components, options) {
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ if (components.userinfo !== undefined) {
+ uriTokens.push(components.userinfo);
+ uriTokens.push("@");
+ }
+ if (components.host !== undefined) {
+ //normalize IP hosts, add brackets and escape zone separator for IPv6
+ uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {
+ return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
+ }));
+ }
+ if (typeof components.port === "number" || typeof components.port === "string") {
+ uriTokens.push(":");
+ uriTokens.push(String(components.port));
+ }
+ return uriTokens.length ? uriTokens.join("") : undefined;
+}
+
+var RDS1 = /^\.\.?\//;
+var RDS2 = /^\/\.(\/|$)/;
+var RDS3 = /^\/\.\.(\/|$)/;
+var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
+function removeDotSegments(input) {
+ var output = [];
+ while (input.length) {
+ if (input.match(RDS1)) {
+ input = input.replace(RDS1, "");
+ } else if (input.match(RDS2)) {
+ input = input.replace(RDS2, "/");
+ } else if (input.match(RDS3)) {
+ input = input.replace(RDS3, "/");
+ output.pop();
+ } else if (input === "." || input === "..") {
+ input = "";
+ } else {
+ var im = input.match(RDS5);
+ if (im) {
+ var s = im[0];
+ input = input.slice(s.length);
+ output.push(s);
+ } else {
+ throw new Error("Unexpected dot segment condition");
+ }
+ }
+ }
+ return output.join("");
+}
+
+function serialize(components) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //perform scheme specific serialization
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
+ if (components.host) {
+ //if host component is an IPv6 address
+ if (protocol.IPV6ADDRESS.test(components.host)) {}
+ //TODO: normalize IPv6 address as per RFC 5952
+
+ //if host component is a domain name
+ else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
+ //convert IDN via punycode
+ try {
+ components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ }
+ }
+ //normalize encoding
+ _normalizeComponentEncoding(components, protocol);
+ if (options.reference !== "suffix" && components.scheme) {
+ uriTokens.push(components.scheme);
+ uriTokens.push(":");
+ }
+ var authority = _recomposeAuthority(components, options);
+ if (authority !== undefined) {
+ if (options.reference !== "suffix") {
+ uriTokens.push("//");
+ }
+ uriTokens.push(authority);
+ if (components.path && components.path.charAt(0) !== "/") {
+ uriTokens.push("/");
+ }
+ }
+ if (components.path !== undefined) {
+ var s = components.path;
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
+ s = removeDotSegments(s);
+ }
+ if (authority === undefined) {
+ s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
+ }
+ uriTokens.push(s);
+ }
+ if (components.query !== undefined) {
+ uriTokens.push("?");
+ uriTokens.push(components.query);
+ }
+ if (components.fragment !== undefined) {
+ uriTokens.push("#");
+ uriTokens.push(components.fragment);
+ }
+ return uriTokens.join(""); //merge tokens into a string
+}
+
+function resolveComponents(base, relative) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var skipNormalization = arguments[3];
+
+ var target = {};
+ if (!skipNormalization) {
+ base = parse(serialize(base, options), options); //normalize base components
+ relative = parse(serialize(relative, options), options); //normalize relative components
+ }
+ options = options || {};
+ if (!options.tolerant && relative.scheme) {
+ target.scheme = relative.scheme;
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (!relative.path) {
+ target.path = base.path;
+ if (relative.query !== undefined) {
+ target.query = relative.query;
+ } else {
+ target.query = base.query;
+ }
+ } else {
+ if (relative.path.charAt(0) === "/") {
+ target.path = removeDotSegments(relative.path);
+ } else {
+ if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
+ target.path = "/" + relative.path;
+ } else if (!base.path) {
+ target.path = relative.path;
+ } else {
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
+ }
+ target.path = removeDotSegments(target.path);
+ }
+ target.query = relative.query;
+ }
+ //target.authority = base.authority;
+ target.userinfo = base.userinfo;
+ target.host = base.host;
+ target.port = base.port;
+ }
+ target.scheme = base.scheme;
+ }
+ target.fragment = relative.fragment;
+ return target;
+}
+
+function resolve(baseURI, relativeURI, options) {
+ var schemelessOptions = assign({ scheme: 'null' }, options);
+ return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
+}
+
+function normalize(uri, options) {
+ if (typeof uri === "string") {
+ uri = serialize(parse(uri, options), options);
+ } else if (typeOf(uri) === "object") {
+ uri = parse(serialize(uri, options), options);
+ }
+ return uri;
+}
+
+function equal(uriA, uriB, options) {
+ if (typeof uriA === "string") {
+ uriA = serialize(parse(uriA, options), options);
+ } else if (typeOf(uriA) === "object") {
+ uriA = serialize(uriA, options);
+ }
+ if (typeof uriB === "string") {
+ uriB = serialize(parse(uriB, options), options);
+ } else if (typeOf(uriB) === "object") {
+ uriB = serialize(uriB, options);
+ }
+ return uriA === uriB;
+}
+
+function escapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
+}
+
+function unescapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
+}
+
+var handler = {
+ scheme: "http",
+ domainHost: true,
+ parse: function parse(components, options) {
+ //report missing host
+ if (!components.host) {
+ components.error = components.error || "HTTP URIs must have a host.";
+ }
+ return components;
+ },
+ serialize: function serialize(components, options) {
+ var secure = String(components.scheme).toLowerCase() === "https";
+ //normalize the default port
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
+ components.port = undefined;
+ }
+ //normalize the empty path
+ if (!components.path) {
+ components.path = "/";
+ }
+ //NOTE: We do not parse query strings for HTTP URIs
+ //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
+ //and not the HTTP spec.
+ return components;
+ }
+};
+
+var handler$1 = {
+ scheme: "https",
+ domainHost: handler.domainHost,
+ parse: handler.parse,
+ serialize: handler.serialize
+};
+
+function isSecure(wsComponents) {
+ return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
+}
+//RFC 6455
+var handler$2 = {
+ scheme: "ws",
+ domainHost: true,
+ parse: function parse(components, options) {
+ var wsComponents = components;
+ //indicate if the secure flag is set
+ wsComponents.secure = isSecure(wsComponents);
+ //construct resouce name
+ wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');
+ wsComponents.path = undefined;
+ wsComponents.query = undefined;
+ return wsComponents;
+ },
+ serialize: function serialize(wsComponents, options) {
+ //normalize the default port
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
+ wsComponents.port = undefined;
+ }
+ //ensure scheme matches secure flag
+ if (typeof wsComponents.secure === 'boolean') {
+ wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws';
+ wsComponents.secure = undefined;
+ }
+ //reconstruct path from resource name
+ if (wsComponents.resourceName) {
+ var _wsComponents$resourc = wsComponents.resourceName.split('?'),
+ _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),
+ path = _wsComponents$resourc2[0],
+ query = _wsComponents$resourc2[1];
+
+ wsComponents.path = path && path !== '/' ? path : undefined;
+ wsComponents.query = query;
+ wsComponents.resourceName = undefined;
+ }
+ //forbid fragment component
+ wsComponents.fragment = undefined;
+ return wsComponents;
+ }
+};
+
+var handler$3 = {
+ scheme: "wss",
+ domainHost: handler$2.domainHost,
+ parse: handler$2.parse,
+ serialize: handler$2.serialize
+};
+
+var O = {};
+var isIRI = true;
+//RFC 3986
+var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
+var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
+var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
+//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
+//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
+//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
+//const VCHAR$$ = "[\\x21-\\x7E]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
+//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
+//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
+//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
+var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
+var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
+var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
+var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
+var UNRESERVED = new RegExp(UNRESERVED$$, "g");
+var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
+var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
+var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
+var NOT_HFVALUE = NOT_HFNAME;
+function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(UNRESERVED) ? str : decStr;
+}
+var handler$4 = {
+ scheme: "mailto",
+ parse: function parse$$1(components, options) {
+ var mailtoComponents = components;
+ var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
+ mailtoComponents.path = undefined;
+ if (mailtoComponents.query) {
+ var unknownHeaders = false;
+ var headers = {};
+ var hfields = mailtoComponents.query.split("&");
+ for (var x = 0, xl = hfields.length; x < xl; ++x) {
+ var hfield = hfields[x].split("=");
+ switch (hfield[0]) {
+ case "to":
+ var toAddrs = hfield[1].split(",");
+ for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
+ to.push(toAddrs[_x]);
+ }
+ break;
+ case "subject":
+ mailtoComponents.subject = unescapeComponent(hfield[1], options);
+ break;
+ case "body":
+ mailtoComponents.body = unescapeComponent(hfield[1], options);
+ break;
+ default:
+ unknownHeaders = true;
+ headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
+ break;
+ }
+ }
+ if (unknownHeaders) mailtoComponents.headers = headers;
+ }
+ mailtoComponents.query = undefined;
+ for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
+ var addr = to[_x2].split("@");
+ addr[0] = unescapeComponent(addr[0]);
+ if (!options.unicodeSupport) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
+ } catch (e) {
+ mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ } else {
+ addr[1] = unescapeComponent(addr[1], options).toLowerCase();
+ }
+ to[_x2] = addr.join("@");
+ }
+ return mailtoComponents;
+ },
+ serialize: function serialize$$1(mailtoComponents, options) {
+ var components = mailtoComponents;
+ var to = toArray(mailtoComponents.to);
+ if (to) {
+ for (var x = 0, xl = to.length; x < xl; ++x) {
+ var toAddr = String(to[x]);
+ var atIdx = toAddr.lastIndexOf("@");
+ var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
+ var domain = toAddr.slice(atIdx + 1);
+ //convert IDN via punycode
+ try {
+ domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
+ } catch (e) {
+ components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ to[x] = localPart + "@" + domain;
+ }
+ components.path = to.join(",");
+ }
+ var headers = mailtoComponents.headers = mailtoComponents.headers || {};
+ if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
+ if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
+ var fields = [];
+ for (var name in headers) {
+ if (headers[name] !== O[name]) {
+ fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
+ }
+ }
+ if (fields.length) {
+ components.query = fields.join("&");
+ }
+ return components;
+ }
+};
+
+var URN_PARSE = /^([^\:]+)\:(.*)/;
+//RFC 2141
+var handler$5 = {
+ scheme: "urn",
+ parse: function parse$$1(components, options) {
+ var matches = components.path && components.path.match(URN_PARSE);
+ var urnComponents = components;
+ if (matches) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = matches[1].toLowerCase();
+ var nss = matches[2];
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ urnComponents.nid = nid;
+ urnComponents.nss = nss;
+ urnComponents.path = undefined;
+ if (schemeHandler) {
+ urnComponents = schemeHandler.parse(urnComponents, options);
+ }
+ } else {
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
+ }
+ return urnComponents;
+ },
+ serialize: function serialize$$1(urnComponents, options) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = urnComponents.nid;
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ if (schemeHandler) {
+ urnComponents = schemeHandler.serialize(urnComponents, options);
+ }
+ var uriComponents = urnComponents;
+ var nss = urnComponents.nss;
+ uriComponents.path = (nid || options.nid) + ":" + nss;
+ return uriComponents;
+ }
+};
+
+var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
+//RFC 4122
+var handler$6 = {
+ scheme: "urn:uuid",
+ parse: function parse(urnComponents, options) {
+ var uuidComponents = urnComponents;
+ uuidComponents.uuid = uuidComponents.nss;
+ uuidComponents.nss = undefined;
+ if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
+ }
+ return uuidComponents;
+ },
+ serialize: function serialize(uuidComponents, options) {
+ var urnComponents = uuidComponents;
+ //normalize UUID
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
+ return urnComponents;
+ }
+};
+
+SCHEMES[handler.scheme] = handler;
+SCHEMES[handler$1.scheme] = handler$1;
+SCHEMES[handler$2.scheme] = handler$2;
+SCHEMES[handler$3.scheme] = handler$3;
+SCHEMES[handler$4.scheme] = handler$4;
+SCHEMES[handler$5.scheme] = handler$5;
+SCHEMES[handler$6.scheme] = handler$6;
+
+exports.SCHEMES = SCHEMES;
+exports.pctEncChar = pctEncChar;
+exports.pctDecChars = pctDecChars;
+exports.parse = parse;
+exports.removeDotSegments = removeDotSegments;
+exports.serialize = serialize;
+exports.resolveComponents = resolveComponents;
+exports.resolve = resolve;
+exports.normalize = normalize;
+exports.equal = equal;
+exports.escapeComponent = escapeComponent;
+exports.unescapeComponent = unescapeComponent;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+//# sourceMappingURL=uri.all.js.map
diff --git a/node_modules/uri-js/dist/es5/uri.all.js.map b/node_modules/uri-js/dist/es5/uri.all.js.map
new file mode 100755
index 0000000000000..5b30c4e2202e1
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/wss.ts","../../src/schemes/ws.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court \n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","wss","ws","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","wsComponents","fragment","resourceName","secure","port","isSecure","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","H16$","LS32$","DEC_OCTET_RELAXED$","DEC_OCTET$","UCSCHAR$$","GEN_DELIMS$$","SP$$","DQUOTE$$","CR$","obj","key","source","setInterval","call","prototype","o","Object","shift","sets"],"mappings":";;;;;;;AYAA,SAAA8E,KAAA,GAAA;sCAAyBsP,IAAzB;YAAA;;;QACKA,KAAKnS,MAAL,GAAc,CAAlB,EAAqB;aACf,CAAL,IAAUmS,KAAK,CAAL,EAAQzQ,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,CAAV;YACMK,KAAKoQ,KAAKnS,MAAL,GAAc,CAAzB;aACK,IAAIgB,IAAI,CAAb,EAAgBA,IAAIe,EAApB,EAAwB,EAAEf,CAA1B,EAA6B;iBACvBA,CAAL,IAAUmR,KAAKnR,CAAL,EAAQU,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,CAAV;;aAEIK,EAAL,IAAWoQ,KAAKpQ,EAAL,EAASL,KAAT,CAAe,CAAf,CAAX;eACOyQ,KAAKpS,IAAL,CAAU,EAAV,CAAP;KAPD,MAQO;eACCoS,KAAK,CAAL,CAAP;;;AAIF,AAAA,SAAA/O,MAAA,CAAuBV,GAAvB,EAAA;WACQ,QAAQA,GAAR,GAAc,GAArB;;AAGD,AAAA,SAAA4B,MAAA,CAAuB0N,CAAvB,EAAA;WACQA,MAAM/S,SAAN,GAAkB,WAAlB,GAAiC+S,MAAM,IAAN,GAAa,MAAb,GAAsBC,OAAOF,SAAP,CAAiBhO,QAAjB,CAA0B+N,IAA1B,CAA+BE,CAA/B,EAAkC7P,KAAlC,CAAwC,GAAxC,EAA6CkE,GAA7C,GAAmDlE,KAAnD,CAAyD,GAAzD,EAA8D+P,KAA9D,GAAsEvT,WAAtE,EAA9D;;AAGD,AAAA,SAAA2B,WAAA,CAA4BoC,GAA5B,EAAA;WACQA,IAAIpC,WAAJ,EAAP;;AAGD,AAAA,SAAA0B,OAAA,CAAwB0P,GAAxB,EAAA;WACQA,QAAQzS,SAAR,IAAqByS,QAAQ,IAA7B,GAAqCA,eAAenJ,KAAf,GAAuBmJ,GAAvB,GAA8B,OAAOA,IAAI1R,MAAX,KAAsB,QAAtB,IAAkC0R,IAAIvP,KAAtC,IAA+CuP,IAAIG,WAAnD,IAAkEH,IAAII,IAAtE,GAA6E,CAACJ,GAAD,CAA7E,GAAqFnJ,MAAMwJ,SAAN,CAAgBrQ,KAAhB,CAAsBoQ,IAAtB,CAA2BJ,GAA3B,CAAxJ,GAA4L,EAAnM;;AAID,AAAA,SAAA5M,MAAA,CAAuBE,MAAvB,EAAuC4M,MAAvC,EAAA;QACOF,MAAM1M,MAAZ;QACI4M,MAAJ,EAAY;aACN,IAAMD,GAAX,IAAkBC,MAAlB,EAA0B;gBACrBD,GAAJ,IAAWC,OAAOD,GAAP,CAAX;;;WAGKD,GAAP;;;ADnCD,SAAA3D,SAAA,CAA0BzK,KAA1B,EAAA;QAEEgL,UAAU,UADX;QAECmD,MAAM,SAFP;QAGClD,UAAU,OAHX;QAICiD,WAAW,SAJZ;QAKCnO,WAAWR,MAAM0L,OAAN,EAAe,UAAf,CALZ;;WAMQ,SANR;QAOCgD,OAAO,SAPR;QAQCrO,eAAeE,OAAOA,OAAO,YAAYC,QAAZ,GAAuB,GAAvB,GAA6BA,QAA7B,GAAwCA,QAAxC,GAAmD,GAAnD,GAAyDA,QAAzD,GAAoEA,QAA3E,IAAuF,GAAvF,GAA6FD,OAAO,gBAAgBC,QAAhB,GAA2B,GAA3B,GAAiCA,QAAjC,GAA4CA,QAAnD,CAA7F,GAA4J,GAA5J,GAAkKD,OAAO,MAAMC,QAAN,GAAiBA,QAAxB,CAAzK,CARhB;;mBASgB,yBAThB;QAUC+K,eAAe,qCAVhB;QAWCD,aAAatL,MAAMyO,YAAN,EAAoBlD,YAApB,CAXd;QAYCiD,YAAY/N,QAAQ,6EAAR,GAAwF,IAZrG;;iBAacA,QAAQ,mBAAR,GAA8B,IAb5C;;mBAcgBT,MAAMyL,OAAN,EAAeC,OAAf,EAAwB,gBAAxB,EAA0C8C,SAA1C,CAdhB;QAeCtC,UAAU3L,OAAOkL,UAAUzL,MAAMyL,OAAN,EAAeC,OAAf,EAAwB,aAAxB,CAAV,GAAmD,GAA1D,CAfX;QAgBCE,YAAYrL,OAAOA,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,OAAlC,CAA5B,IAA0E,GAAjF,CAhBb;QAiBCgD,aAAahO,OAAOA,OAAO,SAAP,IAAoB,GAApB,GAA0BA,OAAO,WAAWmL,OAAlB,CAA1B,GAAuD,GAAvD,GAA6DnL,OAAO,MAAMmL,OAAN,GAAgBA,OAAvB,CAA7D,GAA+F,GAA/F,GAAqGnL,OAAO,UAAUmL,OAAjB,CAArG,GAAiI,GAAjI,GAAuIA,OAA9I,CAjBd;QAkBC4C,qBAAqB/N,OAAOA,OAAO,SAAP,IAAoB,GAApB,GAA0BA,OAAO,WAAWmL,OAAlB,CAA1B,GAAuD,GAAvD,GAA6DnL,OAAO,MAAMmL,OAAN,GAAgBA,OAAvB,CAA7D,GAA+F,GAA/F,GAAqGnL,OAAO,YAAYmL,OAAnB,CAArG,GAAmI,OAAnI,GAA6IA,OAApJ,CAlBtB;;mBAmBgBnL,OAAO+N,qBAAqB,KAArB,GAA6BA,kBAA7B,GAAkD,KAAlD,GAA0DA,kBAA1D,GAA+E,KAA/E,GAAuFA,kBAA9F,CAnBhB;QAoBCF,OAAO7N,OAAOC,WAAW,OAAlB,CApBR;QAqBC6N,QAAQ9N,OAAOA,OAAO6N,OAAO,KAAP,GAAeA,IAAtB,IAA8B,GAA9B,GAAoC/C,YAA3C,CArBT;QAsBCsC,gBAAgBpN,OAAmEA,OAAO6N,OAAO,KAAd,IAAuB,KAAvB,GAA+BC,KAAlG,CAtBjB;;oBAuBiB9N,OAAwD,WAAWA,OAAO6N,OAAO,KAAd,CAAX,GAAkC,KAAlC,GAA0CC,KAAlG,CAvBjB;;oBAwBiB9N,OAAOA,OAAwC6N,IAAxC,IAAgD,SAAhD,GAA4D7N,OAAO6N,OAAO,KAAd,CAA5D,GAAmF,KAAnF,GAA2FC,KAAlG,CAxBjB;;oBAyBiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA4D7N,OAAO6N,OAAO,KAAd,CAA5D,GAAmF,KAAnF,GAA2FC,KAAlG,CAzBjB;;oBA0BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA4D7N,OAAO6N,OAAO,KAAd,CAA5D,GAAmF,KAAnF,GAA2FC,KAAlG,CA1BjB;;oBA2BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAAmEA,IAAnE,GAA0E,KAA1E,GAA2FC,KAAlG,CA3BjB;;oBA4BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA2FC,KAAlG,CA5BjB;;oBA6BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA2FA,IAAlG,CA7BjB;;oBA8BiB7N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAvD,CA9BjB;;mBA+BgB7N,OAAO,CAACoN,aAAD,EAAgBC,aAAhB,EAA+BC,aAA/B,EAA8CC,aAA9C,EAA6DC,aAA7D,EAA4EC,aAA5E,EAA2FC,aAA3F,EAA0GC,aAA1G,EAAyHC,aAAzH,EAAwIjR,IAAxI,CAA6I,GAA7I,CAAP,CA/BhB;QAgCCkO,UAAU7K,OAAOA,OAAON,eAAe,GAAf,GAAqBI,YAA5B,IAA4C,GAAnD,CAhCX;;iBAiCcE,OAAO4K,eAAe,OAAf,GAAyBC,OAAhC,CAjCd;;yBAkCsB7K,OAAO4K,eAAe5K,OAAO,iBAAiBC,QAAjB,GAA4B,MAAnC,CAAf,GAA4D4K,OAAnE,CAlCtB;;iBAmCc7K,OAAO,SAASC,QAAT,GAAoB,MAApB,GAA6BR,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,OAAlC,CAA7B,GAA0E,GAAjF,CAnCd;QAoCCgC,cAAchN,OAAO,QAAQA,OAAOkN,qBAAqB,GAArB,GAA2BtC,YAA3B,GAA0C,GAA1C,GAAgDuC,UAAvD,CAAR,GAA6E,KAApF,CApCf;;gBAqCanN,OAAOA,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,CAA5B,IAAiE,GAAxE,CArCb;QAsCCM,QAAQtL,OAAOgN,cAAc,GAAd,GAAoBlC,YAApB,GAAmC,KAAnC,GAA2CmC,SAA3C,GAAuD,GAAvD,GAA6D,GAA7D,GAAmEA,SAA1E,CAtCT;QAuCC1B,QAAQvL,OAAOmL,UAAU,GAAjB,CAvCT;QAwCCuB,aAAa1M,OAAOA,OAAOqL,YAAY,GAAnB,IAA0B,GAA1B,GAAgCC,KAAhC,GAAwCtL,OAAO,QAAQuL,KAAf,CAAxC,GAAgE,GAAvE,CAxCd;QAyCCoB,SAAS3M,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,UAAlC,CAA5B,CAzCV;QA0CC+B,WAAW/M,OAAO2M,SAAS,GAAhB,CA1CZ;QA2CCE,cAAc7M,OAAO2M,SAAS,GAAhB,CA3Cf;QA4CCG,iBAAiB9M,OAAOA,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,OAAlC,CAA5B,IAA0E,GAAjF,CA5ClB;QA6CCY,gBAAgB5L,OAAOA,OAAO,QAAQ+M,QAAf,IAA2B,GAAlC,CA7CjB;QA8CClB,iBAAiB7L,OAAO,QAAQA,OAAO6M,cAAcjB,aAArB,CAAR,GAA8C,GAArD,CA9ClB;;qBA+CkB5L,OAAO8M,iBAAiBlB,aAAxB,CA/ClB;;qBAgDkB5L,OAAO6M,cAAcjB,aAArB,CAhDlB;;kBAiDe,QAAQe,MAAR,GAAiB,GAjDhC;QAkDCC,QAAQ5M,OAAO4L,gBAAgB,GAAhB,GAAsBC,cAAtB,GAAuC,GAAvC,GAA6CK,cAA7C,GAA8D,GAA9D,GAAoEJ,cAApE,GAAqF,GAArF,GAA2FC,WAAlG,CAlDT;QAmDCC,SAAShM,OAAOA,OAAO2M,SAAS,GAAT,GAAelN,MAAM,UAAN,EAAkBwL,UAAlB,CAAtB,IAAuD,GAA9D,CAnDV;QAoDCQ,YAAYzL,OAAOA,OAAO2M,SAAS,WAAhB,IAA+B,GAAtC,CApDb;QAqDCN,aAAarM,OAAOA,OAAO,WAAW0M,UAAX,GAAwBd,aAA/B,IAAgD,GAAhD,GAAsDC,cAAtD,GAAuE,GAAvE,GAA6EC,cAA7E,GAA8F,GAA9F,GAAoGC,WAA3G,CArDd;QAsDCQ,OAAOvM,OAAO2L,UAAU,KAAV,GAAkBU,UAAlB,GAA+BrM,OAAO,QAAQgM,MAAf,CAA/B,GAAwD,GAAxD,GAA8DhM,OAAO,QAAQyL,SAAf,CAA9D,GAA0F,GAAjG,CAtDR;QAuDCgB,iBAAiBzM,OAAOA,OAAO,WAAW0M,UAAX,GAAwBd,aAA/B,IAAgD,GAAhD,GAAsDC,cAAtD,GAAuE,GAAvE,GAA6EK,cAA7E,GAA8F,GAA9F,GAAoGH,WAA3G,CAvDlB;QAwDCS,YAAYxM,OAAOyM,iBAAiBzM,OAAO,QAAQgM,MAAf,CAAjB,GAA0C,GAA1C,GAAgDhM,OAAO,QAAQyL,SAAf,CAAhD,GAA4E,GAAnF,CAxDb;QAyDCa,iBAAiBtM,OAAOuM,OAAO,GAAP,GAAaC,SAApB,CAzDlB;QA0DCJ,gBAAgBpM,OAAO2L,UAAU,KAAV,GAAkBU,UAAlB,GAA+BrM,OAAO,QAAQgM,MAAf,CAA/B,GAAwD,GAA/D,CA1DjB;QA4DCG,eAAe,OAAOR,OAAP,GAAiB,MAAjB,GAA0B3L,OAAOA,OAAO,YAAYA,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAZ,GAA6C,IAA7C,GAAoDC,KAApD,GAA4D,GAA5D,GAAkEtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAAlE,GAAiG,IAAxG,IAAgH,IAAhH,GAAuHK,aAAvH,GAAuI,GAAvI,GAA6IC,cAA7I,GAA8J,GAA9J,GAAoKC,cAApK,GAAqL,GAArL,GAA2LC,WAA3L,GAAyM,GAAhN,CAA1B,GAAiP/L,OAAO,SAASgM,MAAT,GAAkB,GAAzB,CAAjP,GAAiR,GAAjR,GAAuRhM,OAAO,SAASyL,SAAT,GAAqB,GAA5B,CAAvR,GAA0T,IA5D1U;QA6DCQ,gBAAgB,WAAWjM,OAAOA,OAAO,YAAYA,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAZ,GAA6C,IAA7C,GAAoDC,KAApD,GAA4D,GAA5D,GAAkEtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAAlE,GAAiG,IAAxG,IAAgH,IAAhH,GAAuHK,aAAvH,GAAuI,GAAvI,GAA6IC,cAA7I,GAA8J,GAA9J,GAAoKK,cAApK,GAAqL,GAArL,GAA2LH,WAA3L,GAAyM,GAAhN,CAAX,GAAkO/L,OAAO,SAASgM,MAAT,GAAkB,GAAzB,CAAlO,GAAkQ,GAAlQ,GAAwQhM,OAAO,SAASyL,SAAT,GAAqB,GAA5B,CAAxQ,GAA2S,IA7D5T;QA8DCC,gBAAgB,OAAOC,OAAP,GAAiB,MAAjB,GAA0B3L,OAAOA,OAAO,YAAYA,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAZ,GAA6C,IAA7C,GAAoDC,KAApD,GAA4D,GAA5D,GAAkEtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAAlE,GAAiG,IAAxG,IAAgH,IAAhH,GAAuHK,aAAvH,GAAuI,GAAvI,GAA6IC,cAA7I,GAA8J,GAA9J,GAAoKC,cAApK,GAAqL,GAArL,GAA2LC,WAA3L,GAAyM,GAAhN,CAA1B,GAAiP/L,OAAO,SAASgM,MAAT,GAAkB,GAAzB,CAAjP,GAAiR,IA9DlS;QA+DCR,eAAe,MAAMxL,OAAO,SAASyL,SAAT,GAAqB,GAA5B,CAAN,GAAyC,IA/DzD;QAgECL,iBAAiB,MAAMpL,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAN,GAAuC,IAAvC,GAA8CC,KAA9C,GAAsD,GAAtD,GAA4DtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAA5D,GAA2F,IAhE7G;WAmEO;oBACO,IAAI/L,MAAJ,CAAWC,MAAM,KAAN,EAAayL,OAAb,EAAsBC,OAAtB,EAA+B,aAA/B,CAAX,EAA0D,GAA1D,CADP;sBAES,IAAI3L,MAAJ,CAAWC,MAAM,WAAN,EAAmBC,YAAnB,EAAiCsL,YAAjC,CAAX,EAA2D,GAA3D,CAFT;kBAGK,IAAIxL,MAAJ,CAAWC,MAAM,iBAAN,EAAyBC,YAAzB,EAAuCsL,YAAvC,CAAX,EAAiE,GAAjE,CAHL;kBAIK,IAAIxL,MAAJ,CAAWC,MAAM,iBAAN,EAAyBC,YAAzB,EAAuCsL,YAAvC,CAAX,EAAiE,GAAjE,CAJL;2BAKc,IAAIxL,MAAJ,CAAWC,MAAM,cAAN,EAAsBC,YAAtB,EAAoCsL,YAApC,CAAX,EAA8D,GAA9D,CALd;mBAMM,IAAIxL,MAAJ,CAAWC,MAAM,QAAN,EAAgBC,YAAhB,EAA8BsL,YAA9B,EAA4C,gBAA5C,EAA8DC,UAA9D,CAAX,EAAsF,GAAtF,CANN;sBAOS,IAAIzL,MAAJ,CAAWC,MAAM,QAAN,EAAgBC,YAAhB,EAA8BsL,YAA9B,EAA4C,gBAA5C,CAAX,EAA0E,GAA1E,CAPT;gBAQG,IAAIxL,MAAJ,CAAWC,MAAM,KAAN,EAAaC,YAAb,EAA2BsL,YAA3B,CAAX,EAAqD,GAArD,CARH;oBASO,IAAIxL,MAAJ,CAAWE,YAAX,EAAyB,GAAzB,CATP;qBAUQ,IAAIF,MAAJ,CAAWC,MAAM,QAAN,EAAgBC,YAAhB,EAA8BqL,UAA9B,CAAX,EAAsD,GAAtD,CAVR;qBAWQ,IAAIvL,MAAJ,CAAWM,YAAX,EAAyB,GAAzB,CAXR;qBAYQ,IAAIN,MAAJ,CAAW,OAAOsL,YAAP,GAAsB,IAAjC,CAZR;qBAaQ,IAAItL,MAAJ,CAAW,WAAWoL,YAAX,GAA0B,GAA1B,GAAgC5K,OAAOA,OAAO,iBAAiBC,QAAjB,GAA4B,MAAnC,IAA6C,GAA7C,GAAmD4K,OAAnD,GAA6D,GAApE,CAAhC,GAA2G,QAAtH,CAbR;KAAP;;AAiBD,mBAAeF,UAAU,KAAV,CAAf;;ADrFA,mBAAeA,UAAU,IAAV,CAAf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ADDA;;AACA,IAAMpC,SAAS,UAAf;;;AAGA,IAAMzG,OAAO,EAAb;AACA,IAAMsG,OAAO,CAAb;AACA,IAAMC,OAAO,EAAb;AACA,IAAMkB,OAAO,EAAb;AACA,IAAMG,OAAO,GAAb;AACA,IAAMf,cAAc,EAApB;AACA,IAAMC,WAAW,GAAjB;AACA,IAAMF,YAAY,GAAlB;;;AAGA,IAAMtB,gBAAgB,OAAtB;AACA,IAAMH,gBAAgB,YAAtB;AACA,IAAMoD,kBAAkB,2BAAxB;;;AAGA,IAAMG,SAAS;aACF,iDADE;cAED,gDAFC;kBAGG;CAHlB;;;AAOA,IAAMlB,gBAAgBxH,OAAOsG,IAA7B;AACA,IAAMN,QAAQ4C,KAAK5C,KAAnB;AACA,IAAMH,qBAAqBjJ,OAAO4H,YAAlC;;;;;;;;;;AAUA,SAAS7K,OAAT,CAAegP,IAAf,EAAqB;OACd,IAAIF,UAAJ,CAAeC,OAAOC,IAAP,CAAf,CAAN;;;;;;;;;;;AAWD,SAASnF,GAAT,CAAauE,KAAb,EAAoBO,EAApB,EAAwB;KACjBH,SAAS,EAAf;KACIrN,SAASiN,MAAMjN,MAAnB;QACOA,QAAP,EAAiB;SACTA,MAAP,IAAiBwN,GAAGP,MAAMjN,MAAN,CAAH,CAAjB;;QAEMqN,MAAP;;;;;;;;;;;;;AAaD,SAAS9C,SAAT,CAAmBD,MAAnB,EAA2BkD,EAA3B,EAA+B;KACxBE,QAAQpD,OAAOnI,KAAP,CAAa,GAAb,CAAd;KACIkL,SAAS,EAAb;KACIK,MAAM1N,MAAN,GAAe,CAAnB,EAAsB;;;WAGZ0N,MAAM,CAAN,IAAW,GAApB;WACSA,MAAM,CAAN,CAAT;;;UAGQpD,OAAOnK,OAAP,CAAesN,eAAf,EAAgC,MAAhC,CAAT;KACMF,SAASjD,OAAOnI,KAAP,CAAa,GAAb,CAAf;KACMmL,UAAU5E,IAAI6E,MAAJ,EAAYC,EAAZ,EAAgBzN,IAAhB,CAAqB,GAArB,CAAhB;QACOsN,SAASC,OAAhB;;;;;;;;;;;;;;;;AAgBD,SAASlD,UAAT,CAAoBE,MAApB,EAA4B;KACrBtE,SAAS,EAAf;KACIoH,UAAU,CAAd;KACMpN,SAASsK,OAAOtK,MAAtB;QACOoN,UAAUpN,MAAjB,EAAyB;MAClBkN,QAAQ5C,OAAON,UAAP,CAAkBoD,SAAlB,CAAd;MACIF,SAAS,MAAT,IAAmBA,SAAS,MAA5B,IAAsCE,UAAUpN,MAApD,EAA4D;;OAErDmN,QAAQ7C,OAAON,UAAP,CAAkBoD,SAAlB,CAAd;OACI,CAACD,QAAQ,MAAT,KAAoB,MAAxB,EAAgC;;WACxBlN,IAAP,CAAY,CAAC,CAACiN,QAAQ,KAAT,KAAmB,EAApB,KAA2BC,QAAQ,KAAnC,IAA4C,OAAxD;IADD,MAEO;;;WAGClN,IAAP,CAAYiN,KAAZ;;;GARF,MAWO;UACCjN,IAAP,CAAYiN,KAAZ;;;QAGKlH,MAAP;;;;;;;;;;;AAWD,IAAMmE,aAAa,SAAbA,UAAa;QAASrI,OAAOmK,aAAP,iCAAwBgB,KAAxB,EAAT;CAAnB;;;;;;;;;;;AAWA,IAAMV,eAAe,SAAfA,YAAe,CAASS,SAAT,EAAoB;KACpCA,YAAY,IAAZ,GAAmB,IAAvB,EAA6B;SACrBA,YAAY,IAAnB;;KAEGA,YAAY,IAAZ,GAAmB,IAAvB,EAA6B;SACrBA,YAAY,IAAnB;;KAEGA,YAAY,IAAZ,GAAmB,IAAvB,EAA6B;SACrBA,YAAY,IAAnB;;QAEM9H,IAAP;CAVD;;;;;;;;;;;;;AAwBA,IAAM8F,eAAe,SAAfA,YAAe,CAASsB,KAAT,EAAgBS,IAAhB,EAAsB;;;QAGnCT,QAAQ,EAAR,GAAa,MAAMA,QAAQ,EAAd,CAAb,IAAkC,CAACS,QAAQ,CAAT,KAAe,CAAjD,CAAP;CAHD;;;;;;;AAWA,IAAMnC,QAAQ,SAARA,KAAQ,CAASF,KAAT,EAAgBkC,SAAhB,EAA2BC,SAA3B,EAAsC;KAC/CvB,IAAI,CAAR;SACQuB,YAAY3B,MAAMR,QAAQoC,IAAd,CAAZ,GAAkCpC,SAAS,CAAnD;UACSQ,MAAMR,QAAQkC,SAAd,CAAT;+BAC8BlC,QAAQgC,gBAAgBjB,IAAhB,IAAwB,CAA9D,EAAiEH,KAAKpG,IAAtE,EAA4E;UACnEgG,MAAMR,QAAQgC,aAAd,CAAR;;QAEMxB,MAAMI,IAAI,CAACoB,gBAAgB,CAAjB,IAAsBhC,KAAtB,IAA+BA,QAAQiC,IAAvC,CAAV,CAAP;CAPD;;;;;;;;;AAiBA,IAAMzC,SAAS,SAATA,MAAS,CAAShE,KAAT,EAAgB;;KAExBF,SAAS,EAAf;KACM6F,cAAc3F,MAAMlG,MAA1B;KACIyJ,IAAI,CAAR;KACIgB,IAAIuB,QAAR;KACIT,OAAOQ,WAAX;;;;;;KAMIS,QAAQtG,MAAMrE,WAAN,CAAkBiK,SAAlB,CAAZ;KACIU,QAAQ,CAAZ,EAAe;UACN,CAAR;;;MAGI,IAAIC,IAAI,CAAb,EAAgBA,IAAID,KAApB,EAA2B,EAAEC,CAA7B,EAAgC;;MAE3BvG,MAAM8D,UAAN,CAAiByC,CAAjB,KAAuB,IAA3B,EAAiC;WAC1B,WAAN;;SAEMxM,IAAP,CAAYiG,MAAM8D,UAAN,CAAiByC,CAAjB,CAAZ;;;;;;MAMI,IAAIhF,QAAQ+E,QAAQ,CAAR,GAAYA,QAAQ,CAApB,GAAwB,CAAzC,EAA4C/E,QAAQoE,WAApD,4BAA4F;;;;;;;MAOvFO,OAAO3C,CAAX;OACK,IAAI4C,IAAI,CAAR,EAAWf,IAAIpG,IAApB,qBAA8CoG,KAAKpG,IAAnD,EAAyD;;OAEpDuC,SAASoE,WAAb,EAA0B;YACnB,eAAN;;;OAGKS,QAAQC,aAAarG,MAAM8D,UAAN,CAAiBvC,OAAjB,CAAb,CAAd;;OAEI6E,SAASpH,IAAT,IAAiBoH,QAAQpB,MAAM,CAACS,SAASlC,CAAV,IAAe4C,CAArB,CAA7B,EAAsD;YAC/C,UAAN;;;QAGIC,QAAQD,CAAb;OACMhB,IAAIC,KAAKC,IAAL,GAAYC,IAAZ,GAAoBF,KAAKC,OAAOE,IAAZ,GAAmBA,IAAnB,GAA0BH,IAAIC,IAA5D;;OAEIe,QAAQjB,CAAZ,EAAe;;;;OAITD,aAAalG,OAAOmG,CAA1B;OACIgB,IAAInB,MAAMS,SAASP,UAAf,CAAR,EAAoC;YAC7B,UAAN;;;QAGIA,UAAL;;;MAIKe,MAAMnG,OAAOhG,MAAP,GAAgB,CAA5B;SACO4K,MAAMnB,IAAI2C,IAAV,EAAgBD,GAAhB,EAAqBC,QAAQ,CAA7B,CAAP;;;;MAIIlB,MAAMzB,IAAI0C,GAAV,IAAiBR,SAASlB,CAA9B,EAAiC;WAC1B,UAAN;;;OAGIS,MAAMzB,IAAI0C,GAAV,CAAL;OACKA,GAAL;;;SAGOD,MAAP,CAAczC,GAAd,EAAmB,CAAnB,EAAsBgB,CAAtB;;;QAIM3I,OAAOmK,aAAP,eAAwBjG,MAAxB,CAAP;CAjFD;;;;;;;;;AA2FA,IAAMiE,SAAS,SAATA,MAAS,CAAS/D,KAAT,EAAgB;KACxBF,SAAS,EAAf;;;SAGQoE,WAAWlE,KAAX,CAAR;;;KAGI2F,cAAc3F,MAAMlG,MAAxB;;;KAGIyK,IAAIuB,QAAR;KACItB,QAAQ,CAAZ;KACIa,OAAOQ,WAAX;;;;;;;;uBAG2B7F,KAA3B,8HAAkC;OAAvBwF,cAAuB;;OAC7BA,iBAAe,IAAnB,EAAyB;WACjBzL,IAAP,CAAY8K,mBAAmBW,cAAnB,CAAZ;;;;;;;;;;;;;;;;;;KAIEZ,cAAc9E,OAAOhG,MAAzB;KACI2K,iBAAiBG,WAArB;;;;;;KAMIA,WAAJ,EAAiB;SACT7K,IAAP,CAAY6L,SAAZ;;;;QAIMnB,iBAAiBkB,WAAxB,EAAqC;;;;MAIhCD,IAAID,MAAR;;;;;;yBAC2BzF,KAA3B,mIAAkC;QAAvBwF,YAAuB;;QAC7BA,gBAAgBjB,CAAhB,IAAqBiB,eAAeE,CAAxC,EAA2C;SACtCF,YAAJ;;;;;;;;;;;;;;;;;;;;;MAMIb,wBAAwBF,iBAAiB,CAA/C;MACIiB,IAAInB,CAAJ,GAAQS,MAAM,CAACS,SAASjB,KAAV,IAAmBG,qBAAzB,CAAZ,EAA6D;WACtD,UAAN;;;WAGQ,CAACe,IAAInB,CAAL,IAAUI,qBAAnB;MACIe,CAAJ;;;;;;;yBAE2B1F,KAA3B,mIAAkC;QAAvBwF,aAAuB;;QAC7BA,gBAAejB,CAAf,IAAoB,EAAEC,KAAF,GAAUiB,MAAlC,EAA0C;aACnC,UAAN;;QAEGD,iBAAgBjB,CAApB,EAAuB;;SAElBQ,IAAIP,KAAR;UACK,IAAIY,IAAIpG,IAAb,qBAAuCoG,KAAKpG,IAA5C,EAAkD;UAC3CmG,IAAIC,KAAKC,IAAL,GAAYC,IAAZ,GAAoBF,KAAKC,OAAOE,IAAZ,GAAmBA,IAAnB,GAA0BH,IAAIC,IAA5D;UACIN,IAAII,CAAR,EAAW;;;UAGLF,UAAUF,IAAII,CAApB;UACMD,aAAalG,OAAOmG,CAA1B;aACOpL,IAAP,CACC8K,mBAAmBC,aAAaK,IAAIF,UAAUC,UAA3B,EAAuC,CAAvC,CAAnB,CADD;UAGIF,MAAMC,UAAUC,UAAhB,CAAJ;;;YAGMnL,IAAP,CAAY8K,mBAAmBC,aAAaC,CAAb,EAAgB,CAAhB,CAAnB,CAAZ;YACOL,MAAMF,KAAN,EAAaG,qBAAb,EAAoCF,kBAAkBG,WAAtD,CAAP;aACQ,CAAR;OACEH,cAAF;;;;;;;;;;;;;;;;;;IAIAD,KAAF;IACED,CAAF;;QAGMzE,OAAOjG,IAAP,CAAY,EAAZ,CAAP;CArFD;;;;;;;;;;;;;AAmGA,IAAMyB,YAAY,SAAZA,SAAY,CAAS0E,KAAT,EAAgB;QAC1BqE,UAAUrE,KAAV,EAAiB,UAASoE,MAAT,EAAiB;SACjCE,cAAczE,IAAd,CAAmBuE,MAAnB,IACJJ,OAAOI,OAAO5I,KAAP,CAAa,CAAb,EAAgB/C,WAAhB,EAAP,CADI,GAEJ2L,MAFH;EADM,CAAP;CADD;;;;;;;;;;;;;AAmBA,IAAMhJ,UAAU,SAAVA,OAAU,CAAS4E,KAAT,EAAgB;QACxBqE,UAAUrE,KAAV,EAAiB,UAASoE,MAAT,EAAiB;SACjCD,cAActE,IAAd,CAAmBuE,MAAnB,IACJ,SAASL,OAAOK,MAAP,CADL,GAEJA,MAFH;EADM,CAAP;CADD;;;;;AAWA,IAAMjJ,WAAW;;;;;;YAML,OANK;;;;;;;;SAcR;YACG+I,UADH;YAEGD;EAhBK;WAkBND,MAlBM;WAmBND,MAnBM;YAoBL3I,OApBK;cAqBHE;CArBd,CAwBA;;ADvbA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,AACA,AACA,AACA,AAiDA,AAAO,IAAMzD,UAA6C,EAAnD;AAEP,AAAA,SAAAyC,UAAA,CAA2BuJ,GAA3B,EAAA;QACOJ,IAAII,IAAIC,UAAJ,CAAe,CAAf,CAAV;QACI5I,UAAJ;QAEIuI,IAAI,EAAR,EAAYvI,IAAI,OAAOuI,EAAE5F,QAAF,CAAW,EAAX,EAAezD,WAAf,EAAX,CAAZ,KACK,IAAIqJ,IAAI,GAAR,EAAavI,IAAI,MAAMuI,EAAE5F,QAAF,CAAW,EAAX,EAAezD,WAAf,EAAV,CAAb,KACA,IAAIqJ,IAAI,IAAR,EAAcvI,IAAI,MAAM,CAAEuI,KAAK,CAAN,GAAW,GAAZ,EAAiB5F,QAAjB,CAA0B,EAA1B,EAA8BzD,WAA9B,EAAN,GAAoD,GAApD,GAA0D,CAAEqJ,IAAI,EAAL,GAAW,GAAZ,EAAiB5F,QAAjB,CAA0B,EAA1B,EAA8BzD,WAA9B,EAA9D,CAAd,KACAc,IAAI,MAAM,CAAEuI,KAAK,EAAN,GAAY,GAAb,EAAkB5F,QAAlB,CAA2B,EAA3B,EAA+BzD,WAA/B,EAAN,GAAqD,GAArD,GAA2D,CAAGqJ,KAAK,CAAN,GAAW,EAAZ,GAAkB,GAAnB,EAAwB5F,QAAxB,CAAiC,EAAjC,EAAqCzD,WAArC,EAA3D,GAAgH,GAAhH,GAAsH,CAAEqJ,IAAI,EAAL,GAAW,GAAZ,EAAiB5F,QAAjB,CAA0B,EAA1B,EAA8BzD,WAA9B,EAA1H;WAEEc,CAAP;;AAGD,AAAA,SAAAuB,WAAA,CAA4BD,GAA5B,EAAA;QACK6G,SAAS,EAAb;QACIE,IAAI,CAAR;QACMK,KAAKpH,IAAI1C,MAAf;WAEOyJ,IAAIK,EAAX,EAAe;YACRH,IAAI1C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAV;YAEIE,IAAI,GAAR,EAAa;sBACF7H,OAAO4H,YAAP,CAAoBC,CAApB,CAAV;iBACK,CAAL;SAFD,MAIK,IAAIA,KAAK,GAAL,IAAYA,IAAI,GAApB,EAAyB;gBACxBG,KAAKL,CAAN,IAAY,CAAhB,EAAmB;oBACZG,KAAK3C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAX;0BACU3H,OAAO4H,YAAP,CAAqB,CAACC,IAAI,EAAL,KAAY,CAAb,GAAmBC,KAAK,EAA5C,CAAV;aAFD,MAGO;0BACIlH,IAAI8G,MAAJ,CAAWC,CAAX,EAAc,CAAd,CAAV;;iBAEI,CAAL;SAPI,MASA,IAAIE,KAAK,GAAT,EAAc;gBACbG,KAAKL,CAAN,IAAY,CAAhB,EAAmB;oBACZG,KAAK3C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAX;oBACMI,KAAK5C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAX;0BACU3H,OAAO4H,YAAP,CAAqB,CAACC,IAAI,EAAL,KAAY,EAAb,GAAoB,CAACC,KAAK,EAAN,KAAa,CAAjC,GAAuCC,KAAK,EAAhE,CAAV;aAHD,MAIO;0BACInH,IAAI8G,MAAJ,CAAWC,CAAX,EAAc,CAAd,CAAV;;iBAEI,CAAL;SARI,MAUA;sBACM/G,IAAI8G,MAAJ,CAAWC,CAAX,EAAc,CAAd,CAAV;iBACK,CAAL;;;WAIKF,MAAP;;AAGD,SAAAD,2BAAA,CAAqC3J,UAArC,EAA+DkG,QAA/D,EAAA;aACAxF,gBAAC,CAA0BqC,GAA1B,EAAD;YACQF,SAASG,YAAYD,GAAZ,CAAf;eACQ,CAACF,OAAOzD,KAAP,CAAa8G,SAASpD,UAAtB,CAAD,GAAqCC,GAArC,GAA2CF,MAAnD;;QAGG7C,WAAW1B,MAAf,EAAuB0B,WAAW1B,MAAX,GAAoB6D,OAAOnC,WAAW1B,MAAlB,EAA0BkC,OAA1B,CAAkC0F,SAASzF,WAA3C,EAAwDC,gBAAxD,EAA0E1B,WAA1E,GAAwFwB,OAAxF,CAAgG0F,SAASwD,UAAzG,EAAqH,EAArH,CAApB;QACnB1J,WAAWwF,QAAX,KAAwBlG,SAA5B,EAAuCU,WAAWwF,QAAX,GAAsBrD,OAAOnC,WAAWwF,QAAlB,EAA4BhF,OAA5B,CAAoC0F,SAASzF,WAA7C,EAA0DC,gBAA1D,EAA4EF,OAA5E,CAAoF0F,SAASuD,YAA7F,EAA2G5I,UAA3G,EAAuHL,OAAvH,CAA+H0F,SAASzF,WAAxI,EAAqJE,WAArJ,CAAtB;QACnCX,WAAWmE,IAAX,KAAoB7E,SAAxB,EAAmCU,WAAWmE,IAAX,GAAkBhC,OAAOnC,WAAWmE,IAAlB,EAAwB3D,OAAxB,CAAgC0F,SAASzF,WAAzC,EAAsDC,gBAAtD,EAAwE1B,WAAxE,GAAsFwB,OAAtF,CAA8F0F,SAASsD,QAAvG,EAAiH3I,UAAjH,EAA6HL,OAA7H,CAAqI0F,SAASzF,WAA9I,EAA2JE,WAA3J,CAAlB;QAC/BX,WAAWP,IAAX,KAAoBH,SAAxB,EAAmCU,WAAWP,IAAX,GAAkB0C,OAAOnC,WAAWP,IAAlB,EAAwBe,OAAxB,CAAgC0F,SAASzF,WAAzC,EAAsDC,gBAAtD,EAAwEF,OAAxE,CAAiFR,WAAW1B,MAAX,GAAoB4H,SAASoD,QAA7B,GAAwCpD,SAASqD,iBAAlI,EAAsJ1I,UAAtJ,EAAkKL,OAAlK,CAA0K0F,SAASzF,WAAnL,EAAgME,WAAhM,CAAlB;QAC/BX,WAAWE,KAAX,KAAqBZ,SAAzB,EAAoCU,WAAWE,KAAX,GAAmBiC,OAAOnC,WAAWE,KAAlB,EAAyBM,OAAzB,CAAiC0F,SAASzF,WAA1C,EAAuDC,gBAAvD,EAAyEF,OAAzE,CAAiF0F,SAASmD,SAA1F,EAAqGxI,UAArG,EAAiHL,OAAjH,CAAyH0F,SAASzF,WAAlI,EAA+IE,WAA/I,CAAnB;QAChCX,WAAW8D,QAAX,KAAwBxE,SAA5B,EAAuCU,WAAW8D,QAAX,GAAsB3B,OAAOnC,WAAW8D,QAAlB,EAA4BtD,OAA5B,CAAoC0F,SAASzF,WAA7C,EAA0DC,gBAA1D,EAA4EF,OAA5E,CAAoF0F,SAASkD,YAA7F,EAA2GvI,UAA3G,EAAuHL,OAAvH,CAA+H0F,SAASzF,WAAxI,EAAqJE,WAArJ,CAAtB;WAEhCX,UAAP;;AACA;AAED,SAAAgJ,kBAAA,CAA4BjG,GAA5B,EAAA;WACQA,IAAIvC,OAAJ,CAAY,SAAZ,EAAuB,IAAvB,KAAgC,GAAvC;;AAGD,SAAAyG,cAAA,CAAwB9C,IAAxB,EAAqC+B,QAArC,EAAA;QACOnG,UAAUoE,KAAK/E,KAAL,CAAW8G,SAAS2C,WAApB,KAAoC,EAApD;;iCACoB9I,OAFrB;QAEUmJ,OAFV;;QAIKA,OAAJ,EAAa;eACLA,QAAQ1G,KAAR,CAAc,GAAd,EAAmBuG,GAAnB,CAAuBC,kBAAvB,EAA2C5I,IAA3C,CAAgD,GAAhD,CAAP;KADD,MAEO;eACC+D,IAAP;;;AAIF,SAAA6C,cAAA,CAAwB7C,IAAxB,EAAqC+B,QAArC,EAAA;QACOnG,UAAUoE,KAAK/E,KAAL,CAAW8G,SAASC,WAApB,KAAoC,EAApD;;kCAC0BpG,OAF3B;QAEUmJ,OAFV;QAEmBxB,IAFnB;;QAIKwB,OAAJ,EAAa;oCACUA,QAAQlK,WAAR,GAAsBwD,KAAtB,CAA4B,IAA5B,EAAkC2G,OAAlC,EADV;;YACLL,IADK;YACCG,KADD;;YAENR,cAAcQ,QAAQA,MAAMzG,KAAN,CAAY,GAAZ,EAAiBuG,GAAjB,CAAqBC,kBAArB,CAAR,GAAmD,EAAvE;YACMN,aAAaI,KAAKtG,KAAL,CAAW,GAAX,EAAgBuG,GAAhB,CAAoBC,kBAApB,CAAnB;YACMR,yBAAyBtC,SAAS2C,WAAT,CAAqBzC,IAArB,CAA0BsC,WAAWA,WAAWrI,MAAX,GAAoB,CAA/B,CAA1B,CAA/B;YACMkI,aAAaC,yBAAyB,CAAzB,GAA6B,CAAhD;YACMG,kBAAkBD,WAAWrI,MAAX,GAAoBkI,UAA5C;YACMpI,SAASyI,MAAcL,UAAd,CAAf;aAEK,IAAIlH,IAAI,CAAb,EAAgBA,IAAIkH,UAApB,EAAgC,EAAElH,CAAlC,EAAqC;mBAC7BA,CAAP,IAAYoH,YAAYpH,CAAZ,KAAkBqH,WAAWC,kBAAkBtH,CAA7B,CAAlB,IAAqD,EAAjE;;YAGGmH,sBAAJ,EAA4B;mBACpBD,aAAa,CAApB,IAAyBtB,eAAe9G,OAAOoI,aAAa,CAApB,CAAf,EAAuCrC,QAAvC,CAAzB;;YAGK+B,gBAAgB9H,OAAOmI,MAAP,CAAmD,UAACH,GAAD,EAAME,KAAN,EAAaP,KAAb,EAA3E;gBACO,CAACO,KAAD,IAAUA,UAAU,GAAxB,EAA6B;oBACtBD,cAAcD,IAAIA,IAAI9H,MAAJ,GAAa,CAAjB,CAApB;oBACI+H,eAAeA,YAAYN,KAAZ,GAAoBM,YAAY/H,MAAhC,KAA2CyH,KAA9D,EAAqE;gCACxDzH,MAAZ;iBADD,MAEO;wBACFC,IAAJ,CAAS,EAAEwH,YAAF,EAASzH,QAAS,CAAlB,EAAT;;;mBAGK8H,GAAP;SATqB,EAUnB,EAVmB,CAAtB;YAYMN,oBAAoBI,cAAcC,IAAd,CAAmB,UAACF,CAAD,EAAID,CAAJ;mBAAUA,EAAE1H,MAAF,GAAW2H,EAAE3H,MAAvB;SAAnB,EAAkD,CAAlD,CAA1B;YAEIoH,gBAAJ;YACII,qBAAqBA,kBAAkBxH,MAAlB,GAA2B,CAApD,EAAuD;gBAChDsH,WAAWxH,OAAO4B,KAAP,CAAa,CAAb,EAAgB8F,kBAAkBC,KAAlC,CAAjB;gBACMF,UAAUzH,OAAO4B,KAAP,CAAa8F,kBAAkBC,KAAlB,GAA0BD,kBAAkBxH,MAAzD,CAAhB;sBACUsH,SAASvH,IAAT,CAAc,GAAd,IAAqB,IAArB,GAA4BwH,QAAQxH,IAAR,CAAa,GAAb,CAAtC;SAHD,MAIO;sBACID,OAAOC,IAAP,CAAY,GAAZ,CAAV;;YAGGsH,IAAJ,EAAU;uBACE,MAAMA,IAAjB;;eAGMD,OAAP;KA5CD,MA6CO;eACCtD,IAAP;;;AAIF,IAAMqD,YAAY,iIAAlB;AACA,IAAMD,wBAA4C,EAAD,CAAKnI,KAAL,CAAW,OAAX,EAAqB,CAArB,MAA4BE,SAA7E;AAEA,AAAA,SAAAQ,KAAA,CAAsBqH,SAAtB,EAAA;QAAwClI,OAAxC,uEAA6D,EAA7D;;QACOe,aAA2B,EAAjC;QACMkG,WAAYjH,QAAQuC,GAAR,KAAgB,KAAhB,GAAwB8C,YAAxB,GAAuCD,YAAzD;QAEIpF,QAAQ+G,SAAR,KAAsB,QAA1B,EAAoCmB,YAAY,CAAClI,QAAQX,MAAR,GAAiBW,QAAQX,MAAR,GAAiB,GAAlC,GAAwC,EAAzC,IAA+C,IAA/C,GAAsD6I,SAAlE;QAE9BpH,UAAUoH,UAAU/H,KAAV,CAAgBoI,SAAhB,CAAhB;QAEIzH,OAAJ,EAAa;YACRwH,qBAAJ,EAA2B;;uBAEfjJ,MAAX,GAAoByB,QAAQ,CAAR,CAApB;uBACWyF,QAAX,GAAsBzF,QAAQ,CAAR,CAAtB;uBACWoE,IAAX,GAAkBpE,QAAQ,CAAR,CAAlB;uBACWkE,IAAX,GAAkBqD,SAASvH,QAAQ,CAAR,CAAT,EAAqB,EAArB,CAAlB;uBACWN,IAAX,GAAkBM,QAAQ,CAAR,KAAc,EAAhC;uBACWG,KAAX,GAAmBH,QAAQ,CAAR,CAAnB;uBACW+D,QAAX,GAAsB/D,QAAQ,CAAR,CAAtB;;gBAGIqH,MAAMpH,WAAWiE,IAAjB,CAAJ,EAA4B;2BAChBA,IAAX,GAAkBlE,QAAQ,CAAR,CAAlB;;SAZF,MAcO;;;uBAEKzB,MAAX,GAAoByB,QAAQ,CAAR,KAAcT,SAAlC;uBACWkG,QAAX,GAAuB2B,UAAUE,OAAV,CAAkB,GAAlB,MAA2B,CAAC,CAA5B,GAAgCtH,QAAQ,CAAR,CAAhC,GAA6CT,SAApE;uBACW6E,IAAX,GAAmBgD,UAAUE,OAAV,CAAkB,IAAlB,MAA4B,CAAC,CAA7B,GAAiCtH,QAAQ,CAAR,CAAjC,GAA8CT,SAAjE;uBACW2E,IAAX,GAAkBqD,SAASvH,QAAQ,CAAR,CAAT,EAAqB,EAArB,CAAlB;uBACWN,IAAX,GAAkBM,QAAQ,CAAR,KAAc,EAAhC;uBACWG,KAAX,GAAoBiH,UAAUE,OAAV,CAAkB,GAAlB,MAA2B,CAAC,CAA5B,GAAgCtH,QAAQ,CAAR,CAAhC,GAA6CT,SAAjE;uBACWwE,QAAX,GAAuBqD,UAAUE,OAAV,CAAkB,GAAlB,MAA2B,CAAC,CAA5B,GAAgCtH,QAAQ,CAAR,CAAhC,GAA6CT,SAApE;;gBAGI8H,MAAMpH,WAAWiE,IAAjB,CAAJ,EAA4B;2BAChBA,IAAX,GAAmBkD,UAAU/H,KAAV,CAAgB,+BAAhB,IAAmDW,QAAQ,CAAR,CAAnD,GAAgET,SAAnF;;;YAIEU,WAAWmE,IAAf,EAAqB;;uBAETA,IAAX,GAAkB6C,eAAeC,eAAejH,WAAWmE,IAA1B,EAAgC+B,QAAhC,CAAf,EAA0DA,QAA1D,CAAlB;;;YAIGlG,WAAW1B,MAAX,KAAsBgB,SAAtB,IAAmCU,WAAWwF,QAAX,KAAwBlG,SAA3D,IAAwEU,WAAWmE,IAAX,KAAoB7E,SAA5F,IAAyGU,WAAWiE,IAAX,KAAoB3E,SAA7H,IAA0I,CAACU,WAAWP,IAAtJ,IAA8JO,WAAWE,KAAX,KAAqBZ,SAAvL,EAAkM;uBACtL0G,SAAX,GAAuB,eAAvB;SADD,MAEO,IAAIhG,WAAW1B,MAAX,KAAsBgB,SAA1B,EAAqC;uBAChC0G,SAAX,GAAuB,UAAvB;SADM,MAEA,IAAIhG,WAAW8D,QAAX,KAAwBxE,SAA5B,EAAuC;uBAClC0G,SAAX,GAAuB,UAAvB;SADM,MAEA;uBACKA,SAAX,GAAuB,KAAvB;;;YAIG/G,QAAQ+G,SAAR,IAAqB/G,QAAQ+G,SAAR,KAAsB,QAA3C,IAAuD/G,QAAQ+G,SAAR,KAAsBhG,WAAWgG,SAA5F,EAAuG;uBAC3F9G,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,kBAAkBD,QAAQ+G,SAA1B,GAAsC,aAA7E;;;YAIKrG,gBAAgBvB,QAAQ,CAACa,QAAQX,MAAR,IAAkB0B,WAAW1B,MAA7B,IAAuC,EAAxC,EAA4CU,WAA5C,EAAR,CAAtB;;YAGI,CAACC,QAAQsD,cAAT,KAA4B,CAAC5C,aAAD,IAAkB,CAACA,cAAc4C,cAA7D,CAAJ,EAAkF;;gBAE7EvC,WAAWmE,IAAX,KAAoBlF,QAAQ2E,UAAR,IAAuBjE,iBAAiBA,cAAciE,UAA1E,CAAJ,EAA4F;;oBAEvF;+BACQO,IAAX,GAAkBzC,SAASC,OAAT,CAAiB3B,WAAWmE,IAAX,CAAgB3D,OAAhB,CAAwB0F,SAASzF,WAAjC,EAA8CuC,WAA9C,EAA2DhE,WAA3D,EAAjB,CAAlB;iBADD,CAEE,OAAOyC,CAAP,EAAU;+BACAvC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,oEAAoEuC,CAA3G;;;;wCAI0BzB,UAA5B,EAAwCqE,YAAxC;SAXD,MAYO;;wCAEsBrE,UAA5B,EAAwCkG,QAAxC;;;YAIGvG,iBAAiBA,cAAcG,KAAnC,EAA0C;0BAC3BA,KAAd,CAAoBE,UAApB,EAAgCf,OAAhC;;KA3EF,MA6EO;mBACKC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,wBAAvC;;WAGMc,UAAP;;AACA;AAED,SAAAiG,mBAAA,CAA6BjG,UAA7B,EAAuDf,OAAvD,EAAA;QACOiH,WAAYjH,QAAQuC,GAAR,KAAgB,KAAhB,GAAwB8C,YAAxB,GAAuCD,YAAzD;QACMuB,YAA0B,EAAhC;QAEI5F,WAAWwF,QAAX,KAAwBlG,SAA5B,EAAuC;kBAC5BgB,IAAV,CAAeN,WAAWwF,QAA1B;kBACUlF,IAAV,CAAe,GAAf;;QAGGN,WAAWmE,IAAX,KAAoB7E,SAAxB,EAAmC;;kBAExBgB,IAAV,CAAe0G,eAAeC,eAAe9E,OAAOnC,WAAWmE,IAAlB,CAAf,EAAwC+B,QAAxC,CAAf,EAAkEA,QAAlE,EAA4E1F,OAA5E,CAAoF0F,SAASC,WAA7F,EAA0G,UAACe,CAAD,EAAIJ,EAAJ,EAAQC,EAAR;mBAAe,MAAMD,EAAN,IAAYC,KAAK,QAAQA,EAAb,GAAkB,EAA9B,IAAoC,GAAnD;SAA1G,CAAf;;QAGG,OAAO/G,WAAWiE,IAAlB,KAA2B,QAA3B,IAAuC,OAAOjE,WAAWiE,IAAlB,KAA2B,QAAtE,EAAgF;kBACrE3D,IAAV,CAAe,GAAf;kBACUA,IAAV,CAAe6B,OAAOnC,WAAWiE,IAAlB,CAAf;;WAGM2B,UAAUvF,MAAV,GAAmBuF,UAAUxF,IAAV,CAAe,EAAf,CAAnB,GAAwCd,SAA/C;;AACA;AAED,IAAMuH,OAAO,UAAb;AACA,IAAMD,OAAO,aAAb;AACA,IAAMD,OAAO,eAAb;AACA,AACA,IAAMF,OAAO,wBAAb;AAEA,AAAA,SAAAhB,iBAAA,CAAkCc,KAAlC,EAAA;QACOF,SAAuB,EAA7B;WAEOE,MAAMlG,MAAb,EAAqB;YAChBkG,MAAMnH,KAAN,CAAYyH,IAAZ,CAAJ,EAAuB;oBACdN,MAAM/F,OAAN,CAAcqG,IAAd,EAAoB,EAApB,CAAR;SADD,MAEO,IAAIN,MAAMnH,KAAN,CAAYwH,IAAZ,CAAJ,EAAuB;oBACrBL,MAAM/F,OAAN,CAAcoG,IAAd,EAAoB,GAApB,CAAR;SADM,MAEA,IAAIL,MAAMnH,KAAN,CAAYuH,IAAZ,CAAJ,EAAuB;oBACrBJ,MAAM/F,OAAN,CAAcmG,IAAd,EAAoB,GAApB,CAAR;mBACOD,GAAP;SAFM,MAGA,IAAIH,UAAU,GAAV,IAAiBA,UAAU,IAA/B,EAAqC;oBACnC,EAAR;SADM,MAEA;gBACAC,KAAKD,MAAMnH,KAAN,CAAYqH,IAAZ,CAAX;gBACID,EAAJ,EAAQ;oBACDX,IAAIW,GAAG,CAAH,CAAV;wBACQD,MAAMxE,KAAN,CAAY8D,EAAExF,MAAd,CAAR;uBACOC,IAAP,CAAYuF,CAAZ;aAHD,MAIO;sBACA,IAAIS,KAAJ,CAAU,kCAAV,CAAN;;;;WAKID,OAAOjG,IAAP,CAAY,EAAZ,CAAP;;AACA;AAED,AAAA,SAAAR,SAAA,CAA0BI,UAA1B,EAAA;QAAoDf,OAApD,uEAAyE,EAAzE;;QACOiH,WAAYjH,QAAQuC,GAAR,GAAc8C,YAAd,GAA6BD,YAA/C;QACMuB,YAA0B,EAAhC;;QAGMjG,gBAAgBvB,QAAQ,CAACa,QAAQX,MAAR,IAAkB0B,WAAW1B,MAA7B,IAAuC,EAAxC,EAA4CU,WAA5C,EAAR,CAAtB;;QAGIW,iBAAiBA,cAAcC,SAAnC,EAA8CD,cAAcC,SAAd,CAAwBI,UAAxB,EAAoCf,OAApC;QAE1Ce,WAAWmE,IAAf,EAAqB;;YAEhB+B,SAASC,WAAT,CAAqBC,IAArB,CAA0BpG,WAAWmE,IAArC,CAAJ,EAAgD;;;;aAK3C,IAAIlF,QAAQ2E,UAAR,IAAuBjE,iBAAiBA,cAAciE,UAA1D,EAAuE;;oBAEvE;+BACQO,IAAX,GAAmB,CAAClF,QAAQuC,GAAT,GAAeE,SAASC,OAAT,CAAiB3B,WAAWmE,IAAX,CAAgB3D,OAAhB,CAAwB0F,SAASzF,WAAjC,EAA8CuC,WAA9C,EAA2DhE,WAA3D,EAAjB,CAAf,GAA4G0C,SAASG,SAAT,CAAmB7B,WAAWmE,IAA9B,CAA/H;iBADD,CAEE,OAAO1C,CAAP,EAAU;+BACAvC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,iDAAiD,CAACD,QAAQuC,GAAT,GAAe,OAAf,GAAyB,SAA1E,IAAuF,iBAAvF,GAA2GC,CAAlJ;;;;;gCAMyBzB,UAA5B,EAAwCkG,QAAxC;QAEIjH,QAAQ+G,SAAR,KAAsB,QAAtB,IAAkChG,WAAW1B,MAAjD,EAAyD;kBAC9CgC,IAAV,CAAeN,WAAW1B,MAA1B;kBACUgC,IAAV,CAAe,GAAf;;QAGKwF,YAAYG,oBAAoBjG,UAApB,EAAgCf,OAAhC,CAAlB;QACI6G,cAAcxG,SAAlB,EAA6B;YACxBL,QAAQ+G,SAAR,KAAsB,QAA1B,EAAoC;sBACzB1F,IAAV,CAAe,IAAf;;kBAGSA,IAAV,CAAewF,SAAf;YAEI9F,WAAWP,IAAX,IAAmBO,WAAWP,IAAX,CAAgBiG,MAAhB,CAAuB,CAAvB,MAA8B,GAArD,EAA0D;sBAC/CpF,IAAV,CAAe,GAAf;;;QAIEN,WAAWP,IAAX,KAAoBH,SAAxB,EAAmC;YAC9BuG,IAAI7F,WAAWP,IAAnB;YAEI,CAACR,QAAQ8G,YAAT,KAA0B,CAACpG,aAAD,IAAkB,CAACA,cAAcoG,YAA3D,CAAJ,EAA8E;gBACzEN,kBAAkBI,CAAlB,CAAJ;;YAGGC,cAAcxG,SAAlB,EAA6B;gBACxBuG,EAAErF,OAAF,CAAU,OAAV,EAAmB,MAAnB,CAAJ,CAD4B;;kBAInBF,IAAV,CAAeuF,CAAf;;QAGG7F,WAAWE,KAAX,KAAqBZ,SAAzB,EAAoC;kBACzBgB,IAAV,CAAe,GAAf;kBACUA,IAAV,CAAeN,WAAWE,KAA1B;;QAGGF,WAAW8D,QAAX,KAAwBxE,SAA5B,EAAuC;kBAC5BgB,IAAV,CAAe,GAAf;kBACUA,IAAV,CAAeN,WAAW8D,QAA1B;;WAGM8B,UAAUxF,IAAV,CAAe,EAAf,CAAP,CAxED;;AAyEC;AAED,AAAA,SAAA2E,iBAAA,CAAkCQ,IAAlC,EAAsDD,QAAtD,EAAA;QAA8ErG,OAA9E,uEAAmG,EAAnG;QAAuG0G,iBAAvG;;QACON,SAAuB,EAA7B;QAEI,CAACM,iBAAL,EAAwB;eAChB7F,MAAMF,UAAU2F,IAAV,EAAgBtG,OAAhB,CAAN,EAAgCA,OAAhC,CAAP,CADuB;mBAEZa,MAAMF,UAAU0F,QAAV,EAAoBrG,OAApB,CAAN,EAAoCA,OAApC,CAAX,CAFuB;;cAIdA,WAAW,EAArB;QAEI,CAACA,QAAQE,QAAT,IAAqBmG,SAAShH,MAAlC,EAA0C;eAClCA,MAAP,GAAgBgH,SAAShH,MAAzB;;eAEOkH,QAAP,GAAkBF,SAASE,QAA3B;eACOrB,IAAP,GAAcmB,SAASnB,IAAvB;eACOF,IAAP,GAAcqB,SAASrB,IAAvB;eACOxE,IAAP,GAAcgG,kBAAkBH,SAAS7F,IAAT,IAAiB,EAAnC,CAAd;eACOS,KAAP,GAAeoF,SAASpF,KAAxB;KAPD,MAQO;YACFoF,SAASE,QAAT,KAAsBlG,SAAtB,IAAmCgG,SAASnB,IAAT,KAAkB7E,SAArD,IAAkEgG,SAASrB,IAAT,KAAkB3E,SAAxF,EAAmG;;mBAE3FkG,QAAP,GAAkBF,SAASE,QAA3B;mBACOrB,IAAP,GAAcmB,SAASnB,IAAvB;mBACOF,IAAP,GAAcqB,SAASrB,IAAvB;mBACOxE,IAAP,GAAcgG,kBAAkBH,SAAS7F,IAAT,IAAiB,EAAnC,CAAd;mBACOS,KAAP,GAAeoF,SAASpF,KAAxB;SAND,MAOO;gBACF,CAACoF,SAAS7F,IAAd,EAAoB;uBACZA,IAAP,GAAc8F,KAAK9F,IAAnB;oBACI6F,SAASpF,KAAT,KAAmBZ,SAAvB,EAAkC;2BAC1BY,KAAP,GAAeoF,SAASpF,KAAxB;iBADD,MAEO;2BACCA,KAAP,GAAeqF,KAAKrF,KAApB;;aALF,MAOO;oBACFoF,SAAS7F,IAAT,CAAciG,MAAd,CAAqB,CAArB,MAA4B,GAAhC,EAAqC;2BAC7BjG,IAAP,GAAcgG,kBAAkBH,SAAS7F,IAA3B,CAAd;iBADD,MAEO;wBACF,CAAC8F,KAAKC,QAAL,KAAkBlG,SAAlB,IAA+BiG,KAAKpB,IAAL,KAAc7E,SAA7C,IAA0DiG,KAAKtB,IAAL,KAAc3E,SAAzE,KAAuF,CAACiG,KAAK9F,IAAjG,EAAuG;+BAC/FA,IAAP,GAAc,MAAM6F,SAAS7F,IAA7B;qBADD,MAEO,IAAI,CAAC8F,KAAK9F,IAAV,EAAgB;+BACfA,IAAP,GAAc6F,SAAS7F,IAAvB;qBADM,MAEA;+BACCA,IAAP,GAAc8F,KAAK9F,IAAL,CAAUsC,KAAV,CAAgB,CAAhB,EAAmBwD,KAAK9F,IAAL,CAAUyC,WAAV,CAAsB,GAAtB,IAA6B,CAAhD,IAAqDoD,SAAS7F,IAA5E;;2BAEMA,IAAP,GAAcgG,kBAAkBJ,OAAO5F,IAAzB,CAAd;;uBAEMS,KAAP,GAAeoF,SAASpF,KAAxB;;;mBAGMsF,QAAP,GAAkBD,KAAKC,QAAvB;mBACOrB,IAAP,GAAcoB,KAAKpB,IAAnB;mBACOF,IAAP,GAAcsB,KAAKtB,IAAnB;;eAEM3F,MAAP,GAAgBiH,KAAKjH,MAArB;;WAGMwF,QAAP,GAAkBwB,SAASxB,QAA3B;WAEOuB,MAAP;;AACA;AAED,AAAA,SAAAD,OAAA,CAAwBJ,OAAxB,EAAwCE,WAAxC,EAA4DjG,OAA5D,EAAA;QACOgG,oBAAoBE,OAAO,EAAE7G,QAAS,MAAX,EAAP,EAA4BW,OAA5B,CAA1B;WACOW,UAAUmF,kBAAkBjF,MAAMkF,OAAN,EAAeC,iBAAf,CAAlB,EAAqDnF,MAAMoF,WAAN,EAAmBD,iBAAnB,CAArD,EAA4FA,iBAA5F,EAA+G,IAA/G,CAAV,EAAgIA,iBAAhI,CAAP;;AACA;AAID,AAAA,SAAAH,SAAA,CAA0BD,GAA1B,EAAmC5F,OAAnC,EAAA;QACK,OAAO4F,GAAP,KAAe,QAAnB,EAA6B;cACtBjF,UAAUE,MAAM+E,GAAN,EAAW5F,OAAX,CAAV,EAA+BA,OAA/B,CAAN;KADD,MAEO,IAAI0F,OAAOE,GAAP,MAAgB,QAApB,EAA8B;cAC9B/E,MAAMF,UAAyBiF,GAAzB,EAA8B5F,OAA9B,CAAN,EAA8CA,OAA9C,CAAN;;WAGM4F,GAAP;;AACA;AAID,AAAA,SAAAD,KAAA,CAAsBH,IAAtB,EAAgCC,IAAhC,EAA0CzF,OAA1C,EAAA;QACK,OAAOwF,IAAP,KAAgB,QAApB,EAA8B;eACtB7E,UAAUE,MAAM2E,IAAN,EAAYxF,OAAZ,CAAV,EAAgCA,OAAhC,CAAP;KADD,MAEO,IAAI0F,OAAOF,IAAP,MAAiB,QAArB,EAA+B;eAC9B7E,UAAyB6E,IAAzB,EAA+BxF,OAA/B,CAAP;;QAGG,OAAOyF,IAAP,KAAgB,QAApB,EAA8B;eACtB9E,UAAUE,MAAM4E,IAAN,EAAYzF,OAAZ,CAAV,EAAgCA,OAAhC,CAAP;KADD,MAEO,IAAI0F,OAAOD,IAAP,MAAiB,QAArB,EAA+B;eAC9B9E,UAAyB8E,IAAzB,EAA+BzF,OAA/B,CAAP;;WAGMwF,SAASC,IAAhB;;AACA;AAED,AAAA,SAAAF,eAAA,CAAgCzB,GAAhC,EAA4C9D,OAA5C,EAAA;WACQ8D,OAAOA,IAAIqB,QAAJ,GAAe5D,OAAf,CAAwB,CAACvB,OAAD,IAAY,CAACA,QAAQuC,GAArB,GAA2B6C,aAAaE,MAAxC,GAAiDD,aAAaC,MAAtF,EAA+F1D,UAA/F,CAAd;;AACA;AAED,AAAA,SAAAe,iBAAA,CAAkCmB,GAAlC,EAA8C9D,OAA9C,EAAA;WACQ8D,OAAOA,IAAIqB,QAAJ,GAAe5D,OAAf,CAAwB,CAACvB,OAAD,IAAY,CAACA,QAAQuC,GAArB,GAA2B6C,aAAa5D,WAAxC,GAAsD6D,aAAa7D,WAA3F,EAAyGuC,WAAzG,CAAd;CACA;;ADziBD,IAAMzD,UAA2B;YACvB,MADuB;gBAGnB,IAHmB;WAKxB,eAAUS,UAAV,EAAoCf,OAApC,EAAT;;YAEM,CAACe,WAAWmE,IAAhB,EAAsB;uBACVjF,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,6BAAvC;;eAGMc,UAAP;KAX+B;eAcpB,mBAAUA,UAAV,EAAoCf,OAApC,EAAb;YACQ+E,SAAS7B,OAAOnC,WAAW1B,MAAlB,EAA0BU,WAA1B,OAA4C,OAA3D;;YAGIgB,WAAWiE,IAAX,MAAqBD,SAAS,GAAT,GAAe,EAApC,KAA2ChE,WAAWiE,IAAX,KAAoB,EAAnE,EAAuE;uBAC3DA,IAAX,GAAkB3E,SAAlB;;;YAIG,CAACU,WAAWP,IAAhB,EAAsB;uBACVA,IAAX,GAAkB,GAAlB;;;;;eAOMO,UAAP;;CA/BF,CAmCA;;ADlCA,IAAMT,YAA2B;YACvB,OADuB;gBAEnBX,QAAKgF,UAFc;WAGxBhF,QAAKkB,KAHmB;eAIpBlB,QAAKgB;CAJlB,CAOA;;ADHA,SAAAsE,QAAA,CAAkBL,YAAlB,EAAA;WACQ,OAAOA,aAAaG,MAApB,KAA+B,SAA/B,GAA2CH,aAAaG,MAAxD,GAAiE7B,OAAO0B,aAAavF,MAApB,EAA4BU,WAA5B,OAA8C,KAAtH;;;AAID,IAAMO,YAA2B;YACvB,IADuB;gBAGnB,IAHmB;WAKxB,eAAUS,UAAV,EAAoCf,OAApC,EAAT;YACQ4E,eAAe7D,UAArB;;qBAGagE,MAAb,GAAsBE,SAASL,YAAT,CAAtB;;qBAGaE,YAAb,GAA4B,CAACF,aAAapE,IAAb,IAAqB,GAAtB,KAA8BoE,aAAa3D,KAAb,GAAqB,MAAM2D,aAAa3D,KAAxC,GAAgD,EAA9E,CAA5B;qBACaT,IAAb,GAAoBH,SAApB;qBACaY,KAAb,GAAqBZ,SAArB;eAEOuE,YAAP;KAhB+B;eAmBpB,mBAAUA,YAAV,EAAqC5E,OAArC,EAAb;;YAEM4E,aAAaI,IAAb,MAAuBC,SAASL,YAAT,IAAyB,GAAzB,GAA+B,EAAtD,KAA6DA,aAAaI,IAAb,KAAsB,EAAvF,EAA2F;yBAC7EA,IAAb,GAAoB3E,SAApB;;;YAIG,OAAOuE,aAAaG,MAApB,KAA+B,SAAnC,EAA8C;yBAChC1F,MAAb,GAAuBuF,aAAaG,MAAb,GAAsB,KAAtB,GAA8B,IAArD;yBACaA,MAAb,GAAsB1E,SAAtB;;;YAIGuE,aAAaE,YAAjB,EAA+B;wCACRF,aAAaE,YAAb,CAA0BvB,KAA1B,CAAgC,GAAhC,CADQ;;gBACvB/C,IADuB;gBACjBS,KADiB;;yBAEjBT,IAAb,GAAqBA,QAAQA,SAAS,GAAjB,GAAuBA,IAAvB,GAA8BH,SAAnD;yBACaY,KAAb,GAAqBA,KAArB;yBACa6D,YAAb,GAA4BzE,SAA5B;;;qBAIYwE,QAAb,GAAwBxE,SAAxB;eAEOuE,YAAP;;CA1CF,CA8CA;;ADvDA,IAAMtE,YAA2B;YACvB,KADuB;gBAEnBb,UAAGkF,UAFgB;WAGxBlF,UAAGoB,KAHqB;eAIpBpB,UAAGkB;CAJhB,CAOA;;ADMA,IAAMoB,IAAkB,EAAxB;AACA,IAAM2C,QAAQ,IAAd;;AAGA,IAAMR,eAAe,4BAA4BQ,QAAQ,2EAAR,GAAsF,EAAlH,IAAwH,GAA7I;AACA,IAAMD,WAAW,aAAjB;AACA,IAAMH,eAAeE,OAAOA,OAAO,YAAYC,QAAZ,GAAuB,GAAvB,GAA6BA,QAA7B,GAAwCA,QAAxC,GAAmD,GAAnD,GAAyDA,QAAzD,GAAoEA,QAA3E,IAAuF,GAAvF,GAA6FD,OAAO,gBAAgBC,QAAhB,GAA2B,GAA3B,GAAiCA,QAAjC,GAA4CA,QAAnD,CAA7F,GAA4J,GAA5J,GAAkKD,OAAO,MAAMC,QAAN,GAAiBA,QAAxB,CAAzK,CAArB;;;;;;;;;;;;AAaA,IAAML,UAAU,uDAAhB;AACA,IAAMG,UAAU,4DAAhB;AACA,IAAMF,UAAUJ,MAAMM,OAAN,EAAe,YAAf,CAAhB;AACA,AACA,AACA,AACA,AAEA,AAEA,IAAMJ,gBAAgB,qCAAtB;AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AAEA,IAAMN,aAAa,IAAIG,MAAJ,CAAWE,YAAX,EAAyB,GAAzB,CAAnB;AACA,IAAM1C,cAAc,IAAIwC,MAAJ,CAAWM,YAAX,EAAyB,GAAzB,CAApB;AACA,IAAMtB,iBAAiB,IAAIgB,MAAJ,CAAWC,MAAM,KAAN,EAAaG,OAAb,EAAsB,OAAtB,EAA+B,OAA/B,EAAwCC,OAAxC,CAAX,EAA6D,GAA7D,CAAvB;AACA,AACA,IAAM1C,aAAa,IAAIqC,MAAJ,CAAWC,MAAM,KAAN,EAAaC,YAAb,EAA2BC,aAA3B,CAAX,EAAsD,GAAtD,CAAnB;AACA,IAAMrC,cAAcH,UAApB;AACA,AACA,AAEA,SAAAF,gBAAA,CAA0BqC,GAA1B,EAAA;QACOF,SAASG,YAAYD,GAAZ,CAAf;WACQ,CAACF,OAAOzD,KAAP,CAAa0D,UAAb,CAAD,GAA4BC,GAA5B,GAAkCF,MAA1C;;AAGD,IAAMtD,YAA8C;YAC1C,QAD0C;WAG3C,kBAAUS,UAAV,EAAoCf,OAApC,EAAT;YACQgC,mBAAmBjB,UAAzB;YACMoB,KAAKH,iBAAiBG,EAAjB,GAAuBH,iBAAiBxB,IAAjB,GAAwBwB,iBAAiBxB,IAAjB,CAAsB+C,KAAtB,CAA4B,GAA5B,CAAxB,GAA2D,EAA7F;yBACiB/C,IAAjB,GAAwBH,SAAxB;YAEI2B,iBAAiBf,KAArB,EAA4B;gBACvBuC,iBAAiB,KAArB;gBACM3B,UAAwB,EAA9B;gBACM8B,UAAU3B,iBAAiBf,KAAjB,CAAuBsC,KAAvB,CAA6B,GAA7B,CAAhB;iBAEK,IAAInB,IAAI,CAAR,EAAWe,KAAKQ,QAAQvC,MAA7B,EAAqCgB,IAAIe,EAAzC,EAA6C,EAAEf,CAA/C,EAAkD;oBAC3CqB,SAASE,QAAQvB,CAAR,EAAWmB,KAAX,CAAiB,GAAjB,CAAf;wBAEQE,OAAO,CAAP,CAAR;yBACM,IAAL;4BACOC,UAAUD,OAAO,CAAP,EAAUF,KAAV,CAAgB,GAAhB,CAAhB;6BACK,IAAInB,KAAI,CAAR,EAAWe,MAAKO,QAAQtC,MAA7B,EAAqCgB,KAAIe,GAAzC,EAA6C,EAAEf,EAA/C,EAAkD;+BAC9Cf,IAAH,CAAQqC,QAAQtB,EAAR,CAAR;;;yBAGG,SAAL;yCACkBF,OAAjB,GAA2BS,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAA3B;;yBAEI,MAAL;yCACkBiC,IAAjB,GAAwBU,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAAxB;;;yCAGiB,IAAjB;gCACQ2C,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAAR,IAAiD2C,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAAjD;;;;gBAKCwD,cAAJ,EAAoBxB,iBAAiBH,OAAjB,GAA2BA,OAA3B;;yBAGJZ,KAAjB,GAAyBZ,SAAzB;aAEK,IAAI+B,MAAI,CAAR,EAAWe,OAAKhB,GAAGf,MAAxB,EAAgCgB,MAAIe,IAApC,EAAwC,EAAEf,GAA1C,EAA6C;gBACtCiB,OAAOlB,GAAGC,GAAH,EAAMmB,KAAN,CAAY,GAAZ,CAAb;iBAEK,CAAL,IAAUZ,kBAAkBU,KAAK,CAAL,CAAlB,CAAV;gBAEI,CAACrD,QAAQsD,cAAb,EAA6B;;oBAExB;yBACE,CAAL,IAAUb,SAASC,OAAT,CAAiBC,kBAAkBU,KAAK,CAAL,CAAlB,EAA2BrD,OAA3B,EAAoCD,WAApC,EAAjB,CAAV;iBADD,CAEE,OAAOyC,CAAP,EAAU;qCACMvC,KAAjB,GAAyB+B,iBAAiB/B,KAAjB,IAA0B,6EAA6EuC,CAAhI;;aALF,MAOO;qBACD,CAAL,IAAUG,kBAAkBU,KAAK,CAAL,CAAlB,EAA2BrD,OAA3B,EAAoCD,WAApC,EAAV;;eAGEqC,GAAH,IAAQiB,KAAKlC,IAAL,CAAU,GAAV,CAAR;;eAGMa,gBAAP;KA5DkD;eA+DvC,sBAAUA,gBAAV,EAA6ChC,OAA7C,EAAb;YACQe,aAAaiB,gBAAnB;YACMG,KAAKiB,QAAQpB,iBAAiBG,EAAzB,CAAX;YACIA,EAAJ,EAAQ;iBACF,IAAIC,IAAI,CAAR,EAAWe,KAAKhB,GAAGf,MAAxB,EAAgCgB,IAAIe,EAApC,EAAwC,EAAEf,CAA1C,EAA6C;oBACtCS,SAASK,OAAOf,GAAGC,CAAH,CAAP,CAAf;oBACMW,QAAQF,OAAOI,WAAP,CAAmB,GAAnB,CAAd;oBACMZ,YAAaQ,OAAOC,KAAP,CAAa,CAAb,EAAgBC,KAAhB,CAAD,CAAyBxB,OAAzB,CAAiCC,WAAjC,EAA8CC,gBAA9C,EAAgEF,OAAhE,CAAwEC,WAAxE,EAAqFE,WAArF,EAAkGH,OAAlG,CAA0GyB,cAA1G,EAA0HpB,UAA1H,CAAlB;oBACIU,SAASO,OAAOC,KAAP,CAAaC,QAAQ,CAArB,CAAb;;oBAGI;6BACO,CAAC/C,QAAQuC,GAAT,GAAeE,SAASC,OAAT,CAAiBC,kBAAkBL,MAAlB,EAA0BtC,OAA1B,EAAmCD,WAAnC,EAAjB,CAAf,GAAoF0C,SAASG,SAAT,CAAmBN,MAAnB,CAA9F;iBADD,CAEE,OAAOE,CAAP,EAAU;+BACAvC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,0DAA0D,CAACD,QAAQuC,GAAT,GAAe,OAAf,GAAyB,SAAnF,IAAgG,iBAAhG,GAAoHC,CAA3J;;mBAGEJ,CAAH,IAAQC,YAAY,GAAZ,GAAkBC,MAA1B;;uBAGU9B,IAAX,GAAkB2B,GAAGhB,IAAH,CAAQ,GAAR,CAAlB;;YAGKU,UAAUG,iBAAiBH,OAAjB,GAA2BG,iBAAiBH,OAAjB,IAA4B,EAAvE;YAEIG,iBAAiBE,OAArB,EAA8BL,QAAQ,SAAR,IAAqBG,iBAAiBE,OAAtC;YAC1BF,iBAAiBC,IAArB,EAA2BJ,QAAQ,MAAR,IAAkBG,iBAAiBC,IAAnC;YAErBf,SAAS,EAAf;aACK,IAAMI,IAAX,IAAmBO,OAAnB,EAA4B;gBACvBA,QAAQP,IAAR,MAAkBS,EAAET,IAAF,CAAtB,EAA+B;uBACvBD,IAAP,CACCC,KAAKC,OAAL,CAAaC,WAAb,EAA0BC,gBAA1B,EAA4CF,OAA5C,CAAoDC,WAApD,EAAiEE,WAAjE,EAA8EH,OAA9E,CAAsFI,UAAtF,EAAkGC,UAAlG,IACA,GADA,GAEAC,QAAQP,IAAR,EAAcC,OAAd,CAAsBC,WAAtB,EAAmCC,gBAAnC,EAAqDF,OAArD,CAA6DC,WAA7D,EAA0EE,WAA1E,EAAuFH,OAAvF,CAA+FO,WAA/F,EAA4GF,UAA5G,CAHD;;;YAOEV,OAAOE,MAAX,EAAmB;uBACPH,KAAX,GAAmBC,OAAOC,IAAP,CAAY,GAAZ,CAAnB;;eAGMJ,UAAP;;CAzGF,CA6GA;;ADnKA,IAAMC,YAAY,iBAAlB;AACA,AAEA;AACA,IAAMV,YAAqD;YACjD,KADiD;WAGlD,kBAAUS,UAAV,EAAoCf,OAApC,EAAT;YACQc,UAAUC,WAAWP,IAAX,IAAmBO,WAAWP,IAAX,CAAgBL,KAAhB,CAAsBa,SAAtB,CAAnC;YACIpB,gBAAgBmB,UAApB;YAEID,OAAJ,EAAa;gBACNzB,SAASW,QAAQX,MAAR,IAAkBO,cAAcP,MAAhC,IAA0C,KAAzD;gBACMoB,MAAMK,QAAQ,CAAR,EAAWf,WAAX,EAAZ;gBACMF,MAAMiB,QAAQ,CAAR,CAAZ;gBACMF,YAAevB,MAAf,UAAyBW,QAAQS,GAAR,IAAeA,GAAxC,CAAN;gBACMC,gBAAgBvB,QAAQyB,SAAR,CAAtB;0BAEcH,GAAd,GAAoBA,GAApB;0BACcZ,GAAd,GAAoBA,GAApB;0BACcW,IAAd,GAAqBH,SAArB;gBAEIK,aAAJ,EAAmB;gCACFA,cAAcG,KAAd,CAAoBjB,aAApB,EAAmCI,OAAnC,CAAhB;;SAZF,MAcO;0BACQC,KAAd,GAAsBL,cAAcK,KAAd,IAAuB,wBAA7C;;eAGML,aAAP;KAzByD;eA4B9C,sBAAUA,aAAV,EAAuCI,OAAvC,EAAb;YACQX,SAASW,QAAQX,MAAR,IAAkBO,cAAcP,MAAhC,IAA0C,KAAzD;YACMoB,MAAMb,cAAca,GAA1B;YACMG,YAAevB,MAAf,UAAyBW,QAAQS,GAAR,IAAeA,GAAxC,CAAN;YACMC,gBAAgBvB,QAAQyB,SAAR,CAAtB;YAEIF,aAAJ,EAAmB;4BACFA,cAAcC,SAAd,CAAwBf,aAAxB,EAAuCI,OAAvC,CAAhB;;YAGKO,gBAAgBX,aAAtB;YACMC,MAAMD,cAAcC,GAA1B;sBACcW,IAAd,IAAwBC,OAAOT,QAAQS,GAAvC,UAA8CZ,GAA9C;eAEOU,aAAP;;CA1CF,CA8CA;;AD5DA,IAAMH,OAAO,0DAAb;AACA,AAEA;AACA,IAAME,YAAsE;YAClE,UADkE;WAGnE,eAAUV,aAAV,EAAuCI,OAAvC,EAAT;YACQF,iBAAiBF,aAAvB;uBACeR,IAAf,GAAsBU,eAAeD,GAArC;uBACeA,GAAf,GAAqBQ,SAArB;YAEI,CAACL,QAAQE,QAAT,KAAsB,CAACJ,eAAeV,IAAhB,IAAwB,CAACU,eAAeV,IAAf,CAAoBe,KAApB,CAA0BC,IAA1B,CAA/C,CAAJ,EAAqF;2BACrEH,KAAf,GAAuBH,eAAeG,KAAf,IAAwB,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeV,IAAf,IAAuB,EAAxB,EAA4BW,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAT,QAAQQ,QAAKN,MAAb,IAAuBM,OAAvB;AAEA,AACAR,QAAQO,UAAML,MAAd,IAAwBK,SAAxB;AAEA,AACAP,QAAQM,UAAGJ,MAAX,IAAqBI,SAArB;AAEA,AACAN,QAAQK,UAAIH,MAAZ,IAAsBG,SAAtB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/uri-js/dist/es5/uri.all.min.d.ts b/node_modules/uri-js/dist/es5/uri.all.min.d.ts
new file mode 100755
index 0000000000000..da51e23527705
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.min.d.ts
@@ -0,0 +1,59 @@
+export interface URIComponents {
+ scheme?: string;
+ userinfo?: string;
+ host?: string;
+ port?: number | string;
+ path?: string;
+ query?: string;
+ fragment?: string;
+ reference?: string;
+ error?: string;
+}
+export interface URIOptions {
+ scheme?: string;
+ reference?: string;
+ tolerant?: boolean;
+ absolutePath?: boolean;
+ iri?: boolean;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+}
+export interface URISchemeHandler {
+ scheme: string;
+ parse(components: ParentComponents, options: Options): Components;
+ serialize(components: Components, options: Options): ParentComponents;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+ absolutePath?: boolean;
+}
+export interface URIRegExps {
+ NOT_SCHEME: RegExp;
+ NOT_USERINFO: RegExp;
+ NOT_HOST: RegExp;
+ NOT_PATH: RegExp;
+ NOT_PATH_NOSCHEME: RegExp;
+ NOT_QUERY: RegExp;
+ NOT_FRAGMENT: RegExp;
+ ESCAPE: RegExp;
+ UNRESERVED: RegExp;
+ OTHER_CHARS: RegExp;
+ PCT_ENCODED: RegExp;
+ IPV4ADDRESS: RegExp;
+ IPV6ADDRESS: RegExp;
+}
+export declare const SCHEMES: {
+ [scheme: string]: URISchemeHandler;
+};
+export declare function pctEncChar(chr: string): string;
+export declare function pctDecChars(str: string): string;
+export declare function parse(uriString: string, options?: URIOptions): URIComponents;
+export declare function removeDotSegments(input: string): string;
+export declare function serialize(components: URIComponents, options?: URIOptions): string;
+export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
+export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
+export declare function normalize(uri: string, options?: URIOptions): string;
+export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
+export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
+export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
+export declare function escapeComponent(str: string, options?: URIOptions): string;
+export declare function unescapeComponent(str: string, options?: URIOptions): string;
diff --git a/node_modules/uri-js/dist/es5/uri.all.min.js b/node_modules/uri-js/dist/es5/uri.all.min.js
new file mode 100755
index 0000000000000..09edffb7ccbb6
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.min.js
@@ -0,0 +1,3 @@
+/** @license URI.js v4.4.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
+!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n=55296&&o<=56319&&n>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function m(e){return e.replace(/^0*(.*)/,"$1")||"0"}function g(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=T(n,2),o=t[1];return o?o.split(".").map(m).join("."):e}function v(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=T(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=T(i,2),s=u[0],f=u[1],c=f?f.split(":").map(m):[],p=s.split(":").map(m),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,v=Array(d),E=0;E1){var A=v.slice(0,y.index),D=v.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=v.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?R:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(K);if(o){W?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=v(g(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=J[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=B.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?R:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(v(g(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(ee))e=e.replace(ee,"/");else if(e.match(re))e=e.replace(re,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(ne);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?R:F,t=[],o=J[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?R.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?R.PCT_ENCODED:F.PCT_ENCODED,d)}function N(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function I(e){var r=d(e);return r.match(he)?r:e}var F=u(!1),R=u(!0),T=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,L=String.fromCharCode,$=function(e){return String.fromCodePoint.apply(String,_(e))},M=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},V=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},k=function(e,r,n){var t=0;for(e=n?z(e/700):e>>1,e+=z(e/r);e>455;t+=36)e=z(e/35);return z(t+36*e/(e+38))},Z=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f=n&&s("invalid-input");var d=M(e.charCodeAt(f++));(d>=36||d>z((P-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(dz(P/m)&&s("overflow"),p*=m}var g=r.length+1;a=k(t-c,g,0==c),z(t/g)>P-o&&s("overflow"),o+=z(t/g),t%=g,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},G=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(L(d))}}catch(U){u=!0,f=U}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,m=l;for(l&&r.push("-");m=t&&Az((P-o)/D)&&s("overflow"),o+=(g-t)*D,t=g;var w=!0,b=!1,x=undefined;try{for(var O,N=e[Symbol.iterator]();!(w=(O=N.next()).done);w=!0){var I=O.value;if(IP&&s("overflow"),I==t){for(var F=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(FA-Z\\x5E-\\x7E]",'[\\"\\\\]'),he=new RegExp(se,"g"),de=new RegExp(ce,"g"),le=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pe),"g"),me=new RegExp(r("[^]",se,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ge=me,ve={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court \n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array